{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"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"},{"id":"D42","name":"Runtime Threat Enforcement","shortDescription":{"text":"Runtime Threat Enforcement"},"helpUri":"https://codehealth.canine.dev/dimensions/D42"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"routes.RegisterUIAPIRoutes (cyclomatic 211): routes.RegisterUIAPIRoutes has cyclomatic complexity 211 (threshold 15). Most of this is not in the body itself: 2 of the 211 points are its own statements and the rest belongs to 28 function literals inside it that branch (lines 414, 1214, 126, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4455971ef290d646ad2fec0b36a3866ef7433696171cdb00af77a64f3c564157"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.ChatEndpoint (cyclomatic 172): openai.ChatEndpoint has cyclomatic complexity 172 (threshold 15). Most of this is not in the body itself: 1 of the 172 points is its own statement and the rest belongs to one function literal inside it that branches (line 133). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"267bcdba0da172bfa87de5c8946132b701090657b036243f6c3c4a152e2369e3"}},{"ruleId":"D1","level":"warning","message":{"text":"routes.RegisterAuthRoutes (cyclomatic 162): routes.RegisterAuthRoutes has cyclomatic complexity 162 (threshold 15). Most of this is not in the body itself: 9 of the 162 points are its own statements and the rest belongs to 33 function literals inside it that branch (lines 297, 656, 580, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01afeedee152f2a4d3bc1c9543e58f67021e0657a31f1b60fa54e4864cce0ca"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 134): (anonymous) has cyclomatic complexity 134 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useChat.js"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca11006edad589b9c3976981c7da62ca2982c5690c4f6ec30142593bddcd9fe"}},{"ruleId":"D1","level":"warning","message":{"text":"RunCMD.Run (cyclomatic 130): RunCMD.Run has cyclomatic complexity 130 (threshold 15). Of this number, 129 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/run.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"443b2746578b8c07e7345a1fdfd332b68797e40e1d38305c9b4cd013cccdd12d"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMsgParser.TryConsumeXMLToolCalls (cyclomatic 129): ChatMsgParser.TryConsumeXMLToolCalls has cyclomatic complexity 129 (threshold 15). Of this number, 109 points are the body\u0027s own statements and 20 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5d3082bc4c053f77aa4af640f87f2e1b352092a350921cd18fe93d6a0ff95a"}},{"ruleId":"D1","level":"warning","message":{"text":"promptGPT (cyclomatic 120): promptGPT has cyclomatic complexity 120 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e433a241ac081ebd6db451d3761e62971072b31cbfb1313a4c5aa4f393070b"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleOpenResponsesStream (cyclomatic 101): openresponses.handleOpenResponsesStream has cyclomatic complexity 101 (threshold 15). Of this number, 74 points are the body\u0027s own statements and 27 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1602}}}],"partialFingerprints":{"codehealthFindingId/v1":"de7b1577074a23bc37e0661f570a216d7858c145c7f7bbdc9fbe1a9501a959c7"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.runRealtimeSession (cyclomatic 85): openai.runRealtimeSession has cyclomatic complexity 85 (threshold 15). Of this number, 83 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fcb9198511bf975b5ba8e47e44b90fa14095e3c7f97f8cfb30aad6ce090d483"}},{"ruleId":"D1","level":"warning","message":{"text":"middleware.mergeOpenAIRequestAndModelConfig (cyclomatic 78): middleware.mergeOpenAIRequestAndModelConfig has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d7243a3ab0caec2800840dff2acf207bfb025dba7099bf385250ccc3ec18a23"}},{"ruleId":"D1","level":"warning","message":{"text":"application.New (cyclomatic 76): application.New has cyclomatic complexity 76 (threshold 15). Of this number, 65 points are the body\u0027s own statements and 11 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/startup.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"915ce4051562601bd774dd6b4e1f14fa7c8e6ec12a7dfe8567fff5bd2c3f6da8"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.triggerResponseAtTurn (cyclomatic 70): openai.triggerResponseAtTurn has cyclomatic complexity 70 (threshold 15). Of this number, 69 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":2249}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e0b8f3e8fecffce45fe6be311f5f9d80f284e202b5b98d115b8793753ed108"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.parseJSONWithStack (cyclomatic 68): functions.parseJSONWithStack has cyclomatic complexity 68 (threshold 15). Of this number, 62 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/json_stack_parser.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d5fbd27b1fdaa00175f99e093c0be0e937b9d7841be5d7cda52e09e28aa93b7"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelConfig.GuessUsecases (cyclomatic 63): ModelConfig.GuessUsecases has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5961fb8b39c8abc7ae795c3a91d367635d54ae5e322a14e4b189260fda6167"}},{"ruleId":"D1","level":"warning","message":{"text":"http.API (cyclomatic 62): http.API has cyclomatic complexity 62 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 28 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/app.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"479f784bd10f7da3858d5832fe19f86a8630e802b19335ec7355256a898c26e7"}},{"ruleId":"D1","level":"warning","message":{"text":"agents.ExecuteChatWithLLM (cyclomatic 58): agents.ExecuteChatWithLLM has cyclomatic complexity 58 (threshold 15). Of this number, 52 points are the body\u0027s own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/executor.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c61998b6ee93f87bbfe51126f2e59225593bd72def8773a672b66c8c8bc352d"}},{"ruleId":"D1","level":"warning","message":{"text":"URI.DownloadFileWithContext (cyclomatic 58): URI.DownloadFileWithContext has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"000d41e2c60e644613df92d74d09ac5c699a2035c36691f8e04c0741c14cff67"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.UpdateSettingsEndpoint (cyclomatic 57): localai.UpdateSettingsEndpoint has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 1 of the 57 points is its own statement and the rest belongs to one function literal inside it that branches (line 30). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/settings.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"df17c45f4d1bfe7f31d6176681d62164886f64fe61258d66f1400d4e790cfffa"}},{"ruleId":"D1","level":"warning","message":{"text":"main.parseVertexGLB (cyclomatic 56): main.parseVertexGLB has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/glb_mesh.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be390874c4940f4cdfb4263c7e3c53c7342d23ba65d1561bf15ec254221f962"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.ModelInference (cyclomatic 55): backend.ModelInference has cyclomatic complexity 55 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 39 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/llm.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"193619fcab41f57c851f5c676e397e6341a6c5a1ea7ba2a037946523f9dbb6ef"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.updateSession (cyclomatic 54): openai.updateSession has cyclomatic complexity 54 (threshold 15). Of this number, 53 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f8b8b6ac6e742c56ac27230c49b0d5750fbbc0956bfc0b03632fcb14b042b1"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 53): (anonymous) has cyclomatic complexity 53 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f9b32028feb52b0aab9415d19cbba1a13941c3727fa35daee71598a6d42bc9"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.InstallModel (cyclomatic 50): gallery.InstallModel has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab64cb304bd776f1f0d2562c2a9d7417b6b6fab126aa5d285a6a8b835f73188b"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatPegMapper.mapNode (cyclomatic 50): ChatPegMapper.mapNode has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d65ba07623133125d4525ffd1e966716725edb4f2ef388d911cd871c8153e5"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 50): (anonymous) has cyclomatic complexity 50 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2561}}}],"partialFingerprints":{"codehealthFindingId/v1":"e10f8f82e4c305bc7b933a010ff0f0cbe95f70857a6e5dd14df3a7ea9544987a"}},{"ruleId":"D1","level":"warning","message":{"text":"anthropic.handleAnthropicStream (cyclomatic 49): anthropic.handleAnthropicStream has cyclomatic complexity 49 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91e0b4ebd07231b5f194af493dc3c756ca69b240f68d9eef6403d7b9be2892d"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.InpaintingEndpoint (cyclomatic 49): openai.InpaintingEndpoint has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 1 of the 49 points is its own statement and the rest belongs to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/inpainting.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a507ccddcecadc2ad32b7009a0ebba71353a8d209a9b1cab2d117cdb3a7e06"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.ResponsesEndpoint (cyclomatic 47): openresponses.ResponsesEndpoint has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96fbe19fcc6ea872569f3d9a1133f1d6c655dfe709e3d1012d1954e349a8dda"}},{"ruleId":"D1","level":"warning","message":{"text":"JSONSchemaConverter.visit (cyclomatic 47): JSONSchemaConverter.visit has cyclomatic complexity 47 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7812ad467be86e8d0be238ac887747bcfab20bf890cd532748f1209b7788a9b"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 47): (anonymous) has cyclomatic complexity 47 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1951}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda47e2a55c5d02eb0d39eaddd1d63921da01512cef4a9200f9780bda7e44fef"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleOpenResponsesNonStream (cyclomatic 46): openresponses.handleOpenResponsesNonStream has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1322}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a2286638138bc039f4b4cf5f570737a3b581c7a3e8dffaab5840390ee6b3b2"}},{"ruleId":"D1","level":"warning","message":{"text":"application.initDistributed (cyclomatic 43): application.initDistributed has cyclomatic complexity 43 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/distributed.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"954b46e221982864aec937470891ffda302c58a477ac3d8c3256297e0f610125"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentJobService.ExecuteJobInternal (cyclomatic 42): AgentJobService.ExecuteJobInternal has cyclomatic complexity 42 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"621842722dd402121bb1217698bc848864ddf8e918cacc2ae2702558f0b4dfba"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.parseJSONWithStackTracking (cyclomatic 42): functions.parseJSONWithStackTracking has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/json_stack_parser.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f20ac00580aa23d54d6b9f0252546c01ecc2fb02edd240206a4824d8d1dcac"}},{"ruleId":"D1","level":"warning","message":{"text":"LLama31SchemaConverter.visit (cyclomatic 42): LLama31SchemaConverter.visit has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/llama31_schema.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50a1dca03916d491642269b63fd1ed3eed00153367f1baddea139af2472af26"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelConfig.Validate (cyclomatic 41): ModelConfig.Validate has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7babddd7532a28b6c89e6d128df7ea21a00fec799540cbfdbba7acddf1e605"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleBackgroundNonStream (cyclomatic 40): openresponses.handleBackgroundNonStream has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e527e2cec965fd131322238d5d392ad6dfdcbe4f230a5075ec0db55b35d8291"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.ParseFunctionCall (cyclomatic 38): functions.ParseFunctionCall has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"40aabbf4dd161d219a6fae6c615ed1572559542706b620c8959891e1c6b75e54"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.commitUtteranceWithTranscript (cyclomatic 36): openai.commitUtteranceWithTranscript has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1747}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d417d266725a0601ef67fd2ebad60fd56588739e96f1d5aefe1171ae54cdf5"}},{"ruleId":"D1","level":"warning","message":{"text":"wrappedModel.Predict (cyclomatic 36): wrappedModel.Predict has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"346e3dfc68f7c490e402ec0d8f55eee10adb5789fa75cdcf5fc6849fad35d691"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.ComputeChoices (cyclomatic 35): openai.ComputeChoices has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/inference.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f7712d90124d9d71a34486c6e822600d708f6fab296739890061f4ccfccee2"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMsgParser.ParseMsgWithXMLToolCalls (cyclomatic 35): ChatMsgParser.ParseMsgWithXMLToolCalls has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"0147eabec9d44a9bbfa3e5a42846ccf22ed9c8d0f908c18d3d5d6d818e0b6a1a"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.ImageEndpoint (cyclomatic 34): openai.ImageEndpoint has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to one function literal inside it that branches (line 78). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/image.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6caaa695b763139fe19bbf41f8acfc48f9d97da40ece49dfaf19235be28b49d"}},{"ruleId":"D1","level":"warning","message":{"text":"peg.parseJSONNumber (cyclomatic 34): peg.parseJSONNumber has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"4431120de26ca676a701ba0a1dca9511adfa33f2898108a923f4e8f96c6b1eeb"}},{"ruleId":"D1","level":"warning","message":{"text":"anthropic.convertAnthropicToOpenAIMessages (cyclomatic 33): anthropic.convertAnthropicToOpenAIMessages has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f634d63d7605a5f0288f18d175dcea175eec0be0277cfb3be308f23aec5505"}},{"ruleId":"D1","level":"warning","message":{"text":"ReplicaReconciler.reconcileModel (cyclomatic 33): ReplicaReconciler.reconcileModel has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7686a844e487d6abbdfeeb6500c542638cf15c9d7907de8f86bc57345e95f53"}},{"ruleId":"D1","level":"warning","message":{"text":"xsysinfo.parseVulkanGPUMemoryText (cyclomatic 33): xsysinfo.parseVulkanGPUMemoryText has cyclomatic complexity 33 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 12 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d7e464c4c2b4d481262fa3be9f16eecc9e9755741bb2bbc71cb65163e40423"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentWorkerCMD.Run (cyclomatic 32): AgentWorkerCMD.Run has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/agent_worker.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd4076435beb10b817fb1397e3b94a07ada2fabe15707acfa511781689560a1"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaCPPImporter.Import (cyclomatic 32): LlamaCPPImporter.Import has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/llama-cpp.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f28a0e5f30d87f60bc5f10a3058e67919aeb7f6b78ad343b8c0168da498893"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.classifierRespond (cyclomatic 32): openai.classifierRespond has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_classifier.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"676aac1279f5af61c704cf62ce37cee1f543cc7c2afa7970a82e0dde1f3f1dc6"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.streamLLMResponse (cyclomatic 32): openai.streamLLMResponse has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 11 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_stream.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ccda9dc409c80d81d8a35b10b13995c8629cfc5b521be9915458035696b1db"}},{"ruleId":"D1","level":"warning","message":{"text":"promptVideo (cyclomatic 32): promptVideo has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/video.js"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"d249ce1cb66f8095f133a6268b10b42ffc3ec14b852b2f6998ec041ad23ce842"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.InstallBackend (cyclomatic 31): gallery.InstallBackend has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"8289870c6955e410dba87bf6896920c45eb23787aa85a6a84af08d48c2fa9564"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.processStreamWithTools (cyclomatic 31): openai.processStreamWithTools has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 274, 419). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat_stream_workers.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"59020ba9cce84d1faa3799fbaa0b197b62ff84c30d4a8d17eee0ebe890d20d3e"}},{"ruleId":"D1","level":"warning","message":{"text":"Config.subscribeFileStaging (cyclomatic 31): Config.subscribeFileStaging has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 142, 85, 117, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/file_staging.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bccf057a7d9a49a27bfa3878de79384ebd5b364c3d2267ef16371a8cf407e121"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.Run (cyclomatic 31): worker.Run has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/worker.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"352f1f385f803e5768dbcafe8b2aa91aaf4c16ffd1e3395e93bfa22f9daf995e"}},{"ruleId":"D1","level":"warning","message":{"text":"parseGlb (cyclomatic 31): parseGlb has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/glb.js"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd130cc3618c26d6c4643935679303377859c4c1b398bb6b2cbac7c23bd4f83"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.materializeLocked (cyclomatic 30): Manager.materializeLocked has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb57422734f542fddbf56cfa00366e8df1539cf34900df2053a74208e53a97a"}},{"ruleId":"D1","level":"warning","message":{"text":"anthropic.handleAnthropicNonStream (cyclomatic 29): anthropic.handleAnthropicNonStream has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28234f5ad6ad1748c584494e098e19b7f331b6888641db00640bebf190126c6"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.CompletionEndpoint (cyclomatic 29): openai.CompletionEndpoint has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 82, 41). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/completion.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5b28879fb092e1bb9b43ab6ef0d8e9718ab885864f0092a345ff5783084624"}},{"ruleId":"D1","level":"warning","message":{"text":"Evaluator.TemplateMessages (cyclomatic 29): Evaluator.TemplateMessages has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/templates/evaluator.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ad603c631001c84b10dd67d5b5f9d8e5ac646559413d91c8584ec4c2d786802"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.vadTick (cyclomatic 28): openai.vadTick has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38d7fbf79fc3cb9b7e3c2c145b66a5b071efcf60ee540f07de8e4b9830967ee"}},{"ruleId":"D1","level":"warning","message":{"text":"nodes.handleRangeUpload (cyclomatic 28): nodes.handleRangeUpload has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb9f74ca263dd65fffff612f8f9ec2cc169337b3655d549f7edeed6203176ac"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartRouter.stageModelFiles (cyclomatic 28): SmartRouter.stageModelFiles has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73dcba4244c5bb4deb50cf4e22e3e83794a0d149cd20906241982469dbb4a61"}},{"ruleId":"D1","level":"warning","message":{"text":"pii.RequestMiddleware (cyclomatic 28): pii.RequestMiddleware has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 135). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/middleware.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afcfb4b824bd59c713ce0a40a6439aba2b566f42c06b1deb87903f6109c81c4"}},{"ruleId":"D1","level":"warning","message":{"text":"oci.extractTarCopyingLinks (cyclomatic 28): oci.extractTarCopyingLinks has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/image.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"84067b255b41841eb63e164321971fb22a3d1b95dbf2c3f240e04af4f642d280"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispASR.Load (cyclomatic 27): CrispASR.Load has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"f177248cd03a534dc8f9b30850d805f0001e3f90993bd75c0446b0b03ff4a6f3"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelConfig.InputModalities (cyclomatic 27): ModelConfig.InputModalities has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_capabilities.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"df37314019a6f45a3d9ddceb80bb2997b869adb096931f29bb27f588cfa0054d"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.TTSEndpoint (cyclomatic 27): localai.TTSEndpoint has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/tts.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf198998b5c79a3e94980bf539b9c0a2213cd0867f3bec120892aadcde21f91"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.VideoEndpoint (cyclomatic 27): localai.VideoEndpoint has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 155). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/video.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d2742189df91f6ce201e0a77e425b48f0327bf02affaef353f1bfadab9269a"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.TranscriptEndpoint (cyclomatic 27): openai.TranscriptEndpoint has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 60). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/transcription.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f36a6a3f8f3ce0868c1aee797d368494f7c31593b86e5e30209102f624d4dbdd"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassifierConfig.Validate (cyclomatic 27): ClassifierConfig.Validate has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/classifier.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f4be67f9ff26226a40da10385a56a1590abca2e01581b066efd348898f7125"}},{"ruleId":"D1","level":"warning","message":{"text":"Spec.Normalize (cyclomatic 27): Spec.Normalize has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/types.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5f19a6811d0fa027360a9a6107f3e1246d49f758ecc759ca02edf0ec4b9680"}},{"ruleId":"D1","level":"warning","message":{"text":"toggleLoader (cyclomatic 27): toggleLoader has cyclomatic complexity 27 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c720bc6797e16453e795c7464da6c2628b06d0ac2aac3fec4fc0a227c7e32fa"}},{"ruleId":"D1","level":"warning","message":{"text":"analyzeYamlContext (cyclomatic 27): analyzeYamlContext has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmYamlComplete.js"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"d781c26891fb42a9468e06965ea60a993071619cca2c4a0c38de207733946a5c"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 27): (anonymous) has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmYamlComplete.js"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed5f7847884176dc93d7cb8b28afeceb7a3be9c24e60e4b6434620263cd02365"}},{"ruleId":"D1","level":"warning","message":{"text":"main.chunkText (cyclomatic 26): main.chunkText has cyclomatic complexity 26 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"99adefbf17adfc316443cdf484c76f224589e13783f1bf36c3ca92593603f808"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.SoundGeneration (cyclomatic 26): backend.SoundGeneration has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/soundgeneration.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"440ba37998e2d1835a14b99e7093d394636192703960cfe8ff34a2d74201ad7f"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.ListSystemBackends (cyclomatic 26): gallery.ListSystemBackends has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"188ff337d08f0d0c10ba86a5bb1c9276d025a72fb716fdd5b264cacd22feed98"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.InstallModelFromGallery (cyclomatic 26): gallery.InstallModelFromGallery has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 13 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"e76c266575f7f210768c25493252d0cebd81d22e187cc9773523294b26de415b"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.CheckUpgradesAgainst (cyclomatic 26): gallery.CheckUpgradesAgainst has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/upgrade.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"f366da16d6a3e4717012b87108033b97a6bd283ff491d47de8553cdb743b9bd8"}},{"ruleId":"D1","level":"warning","message":{"text":"OAuthManager.CallbackHandler (cyclomatic 26): OAuthManager.CallbackHandler has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 184). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/oauth.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"0419cd4b93ff547dbbd0994b2027a110f447f8f34d5979301982c91db2a85943"}},{"ruleId":"D1","level":"warning","message":{"text":"anthropic.MessagesEndpoint (cyclomatic 26): anthropic.MessagesEndpoint has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 33). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"639f17231b9f5bef0fa5d7ee1e7cf3ea7076aa527695805d8732f56e13c63a55"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.RegisterNodeEndpoint (cyclomatic 26): localai.RegisterNodeEndpoint has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27f5fb45ac951b08af177805930f43708e1d59df2c881bf19935d23f41fb6ca"}},{"ruleId":"D1","level":"warning","message":{"text":"FineTuneService.ExportModel (cyclomatic 26): FineTuneService.ExportModel has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 593). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61b4624fa4c67a446dd47bae934d3daa4b3345927d0fb90fdf898fd113861e4"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudProxy.Forward (cyclomatic 25): CloudProxy.Forward has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/proxy.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb6b56edcb874822ba49cfcdf94d6514c19bf2422403e6e8d2c3874af473d37"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalVQE.AudioTransformStream (cyclomatic 25): LocalVQE.AudioTransformStream has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eeae713ff4df83d651fc5cefeacffb010f3c90d2f619f69f58b8961f6bc5b70"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.ModelTTSStream (cyclomatic 25): backend.ModelTTSStream has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/tts.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"807a36398ff3facd8bd4ad6507d342a9a7d8f526ca151b21928fd84d145d0446"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.handleMCPCIJob (cyclomatic 25): cli.handleMCPCIJob has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/agent_worker.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4eedcc661a91221a4b10f0b6710c37bc184664207eb744d30c42b7c68235604"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.Model3DEndpoint (cyclomatic 25): localai.Model3DEndpoint has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88097973500e10a239b810cd50e32fcc1fe3e1e42ead86b7c14df0d9dbf1f61"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleWSResponseCreate (cyclomatic 25): openresponses.handleWSResponseCreate has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/websocket.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"14eff281c01c857fc1f686264c3f04e777f301ffcc4de4b4fa1ba5e4b4071229"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartRouter.scheduleNewModel (cyclomatic 25): SmartRouter.scheduleNewModel has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b99562382acc975f81a38051d20d1b6bdaff7c994ebcfecf40553b696f72b4"}},{"ruleId":"D1","level":"warning","message":{"text":"promptDallE (cyclomatic 25): promptDallE has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/image.js"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"904e039786b9408537540c4f445bcf5205b4964c20ba808ef1ff320ef25f6ba0"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudProxy.predictAnthropicStreamRich (cyclomatic 24): CloudProxy.predictAnthropicStreamRich has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"41dcc90a79c613ac537ca26ba29ce8e4dd4cc24e9db92e9c56e6b9716cc93d40"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.AudioTransformStreamEndpoint (cyclomatic 24): localai.AudioTransformStreamEndpoint has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 246). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"38181874240e5c0cb29edfcefe0c092fae338a3ed9acf51a889a80e8f63b535b"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.CORSProxyEndpoint (cyclomatic 24): localai.CORSProxyEndpoint has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 28). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/cors_proxy.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e20903adcc7cb5dc7c846ba922686be954f3b6620b63463fee39b0656c0031"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.convertORMessageItem (cyclomatic 24): openresponses.convertORMessageItem has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b321eabb4fc12b058bc42cf0b90ee70ad253795daceb7ef2f0cdbf3fb01c42"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleBackgroundStream (cyclomatic 24): openresponses.handleBackgroundStream has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"f57d0c78f11eadae3f68d8a3994755dd7b7fe689fcfcae212e426729965fbca3"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigService.EditYAML (cyclomatic 24): ConfigService.EditYAML has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/modeladmin/config.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"f24fc92068b91f4fca7460955e47d11f8cb74b5c22eef2c67785a73bb642ff56"}},{"ruleId":"D1","level":"warning","message":{"text":"piiadapter.OpenAI (cyclomatic 24): piiadapter.OpenAI has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 67, 30). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/openai.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a8ef8b17fa87f77e5ea3557a7277206d0ba613b6badf57523af5976095d22a"}},{"ruleId":"D1","level":"warning","message":{"text":"ParakeetCpp.AudioTranscriptionLive (cyclomatic 23): ParakeetCpp.AudioTranscriptionLive has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/parakeet-cpp/live.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7487769cdb4a73366f16eec3e3762fb33746d0dfdd82c5a89b51dbabef554d35"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.DeleteBackendFromSystem (cyclomatic 23): gallery.DeleteBackendFromSystem has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2eff9e1a27fbe50f933417d1fd09e7b0d7bb6b737b4ea9b282187ab17d3d6de"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.UpgradeBackend (cyclomatic 23): gallery.UpgradeBackend has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/upgrade.go"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca2b9369f0ac80100e45da06e2a99d6a920de64871f21d0e69a3a63793ba554"}},{"ruleId":"D1","level":"warning","message":{"text":"VibeVoiceCppImporter.Import (cyclomatic 23): VibeVoiceCppImporter.Import has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/vibevoice-cpp.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d548c789032c22cd4c7ff913f7200aa5e6027dac0dd7c3d8e23c236a35362125"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.ResolveSnapshot (cyclomatic 23): Client.ResolveSnapshot has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/huggingface-api/snapshot.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"63636c742a70a7528a1af9ba453962322cc0e8a381331c3e5a014cc91a8853ab"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.Ensure (cyclomatic 23): Manager.Ensure has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"725d604050e2ffe14d558969b7f23bf01a1bba67a93f34b8fbc32500e13cfc15"}},{"ruleId":"D1","level":"warning","message":{"text":"add (cyclomatic 23): add has cyclomatic complexity 23 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2458}}}],"partialFingerprints":{"codehealthFindingId/v1":"54819c4e9ac23ff5129cb83945bc2f8279a119e76fe2b5327afc6f0156d15829"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 22): main.main has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/gen_inference_defaults/main.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd0ce6a99605a3c57b14edc320e0072cb09b76192e33f0c998e61b9598372866"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelConfigLoader.preloadOne (cyclomatic 22): ModelConfigLoader.preloadOne has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config_loader.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1147b31fee03348eb92daf8ecaf77a3177ddbd774b31f18610729d4d2b955ca"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.AudioTransformEndpoint (cyclomatic 22): localai.AudioTransformEndpoint has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 122). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"3acc0d91b8666a32a48ed6409c2ed33c57227d1c4e49ef37519c497f2bcd7f72"}},{"ruleId":"D1","level":"warning","message":{"text":"QuantizationService.ImportModel (cyclomatic 22): QuantizationService.ImportModel has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/quantization/service.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cdfd4efa64ee95b9d977062466acad23d03e528d38dc71908b1f84ba80ea9e0"}},{"ruleId":"D1","level":"warning","message":{"text":"reasoning.ExtractReasoning (cyclomatic 22): reasoning.ExtractReasoning has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/reasoning/reasoning.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"47928420380bd74c47c94632f9ae25f4530c3e84f880ebe441c032d7b5777f78"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispASR.AudioTranscription (cyclomatic 21): CrispASR.AudioTranscription has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1629f09ead9db54e9ab1c59b9081b283201ef9874cd24ae21573bdd8abcbe1"}},{"ruleId":"D1","level":"warning","message":{"text":"config.ApplyGenericDefaults (cyclomatic 21): config.ApplyGenericDefaults has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/generic_defaults.go"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2ed2debe52f9347416d53d2d023c445a8d6e6c2e9aa71257e26c007dc86621"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.swaggerToMarkdown (cyclomatic 21): localai.swaggerToMarkdown has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/api_instructions.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"38eea47d6904bfa68a0a3f5ea6b9939457a4f4cf769aed1e123b53947c5c52fc"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.ImportModelEndpoint (cyclomatic 21): localai.ImportModelEndpoint has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 129). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/import_model.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f81659426ddc22dae1b5279f03ed8388f821fe5a12959dba2d28b6b2256dbf"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.newModel (cyclomatic 21): openai.newModel has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"72cda498def06d68893c3af7070593dd6d43ebf31a63fe896b0f490a0547cce5"}},{"ruleId":"D1","level":"warning","message":{"text":"wrappedModel.classifierFor (cyclomatic 21): wrappedModel.classifierFor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a56964fc0b07a99f69605fc8cb431617e6662a1cddd7271ef57d6399f27c2ef"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.convertORInputToMessages (cyclomatic 21): openresponses.convertORInputToMessages has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"b214a3b111a1c6cab59b30f054c4defbb37745830d51c2f0c940a11c2a19d80e"}},{"ruleId":"D1","level":"warning","message":{"text":"GalleryService.backendHandler (cyclomatic 21): GalleryService.backendHandler has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/backends.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f82355182b5fd7a08964344bcac8d39dd87db2eaa786e9cf46ca366f3af4581"}},{"ruleId":"D1","level":"warning","message":{"text":"GalleryService.modelHandler (cyclomatic 21): GalleryService.modelHandler has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/models.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"277f5cfddbad169c83b651a8ac5ce9de1e49b4565d882580ccdb45045fe4b78a"}},{"ruleId":"D1","level":"warning","message":{"text":"DistributedBackendManager.UpgradeBackend (cyclomatic 21): DistributedBackendManager.UpgradeBackend has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f4ea766b01faae09918ad69afba767bdd99eba42b909c20d4ebd134c1a29f5"}},{"ruleId":"D1","level":"warning","message":{"text":"ReplicaReconciler.drainPendingBackendOps (cyclomatic 21): ReplicaReconciler.drainPendingBackendOps has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"060c539dc6b8c39e2cb42b2d22736c86dc60e7f53d8238416d532645c616f5d9"}},{"ruleId":"D1","level":"warning","message":{"text":"piiadapter.Anthropic (cyclomatic 21): piiadapter.Anthropic has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 23, 56). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/anthropic.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d6f9fb21a581771f8aba02a58dc0902ea9b503f6389943d0fc3f1dcc099c36"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoader.Load (cyclomatic 21): ModelLoader.Load has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/initializers.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"89337eb2009a3ac4fafd39d6315b2f314dff8a66ef018b6c6a1c64ba99d5c1ee"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudProxy.predictOpenAIStreamRich (cyclomatic 20): CloudProxy.predictOpenAIStreamRich has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_openai.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a19bf3336021cb0bd1499eddd462860a8b337d4457a21bbb9782fca07fafd7c"}},{"ruleId":"D1","level":"warning","message":{"text":"Trellis2.Generate3D (cyclomatic 20): Trellis2.Generate3D has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/trellis2.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"4675c39b542bad3a2490a2118fb70bfee54c474f110ade0bf3c6cd5e9f346a43"}},{"ruleId":"D1","level":"warning","message":{"text":"main.chatRequestJSON (cyclomatic 20): main.chatRequestJSON has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/vllm-cpp/chat.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee0bf2e85ea63c80ce3627cff67b578ff9d2885753a7b5b811243c7db95ee55"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.AgentResponsesInterceptor (cyclomatic 20): localai.AgentResponsesInterceptor has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_responses.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"905e076b9be9c73adfc5cdf0856e4c781f306ca9d8c14ea14438fbc34c25dea4"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.handleStreamResume (cyclomatic 20): openresponses.handleStreamResume has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":3049}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cc149eb2ae96ebbe08653776aa8f54c023525c79ff3dce04efaa4605bc6fa04"}},{"ruleId":"D1","level":"warning","message":{"text":"middleware.buildClassifier (cyclomatic 20): middleware.buildClassifier has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/route_model.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"308a893d012b9db2c60f40a1126f3cca209353790974f978f1c9ce17fb509f67"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudproxy.ForwardViaBackend (cyclomatic 20): cloudproxy.ForwardViaBackend has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/cloudproxy/backend_forward.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e38ca876bb0838ce228ebff60e24341e89efa96ee6ca8fba577103ca77b0ae"}},{"ruleId":"D1","level":"warning","message":{"text":"piiDispatcher.serve (cyclomatic 20): piiDispatcher.serve has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/cloudproxy/mitm/handler.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"707140d8e647dfe53bb63720e7a7b0af5d5ca9eb28f5e11bf98c8babb6d89a66"}},{"ruleId":"D1","level":"warning","message":{"text":"HealthMonitor.doCheckAll (cyclomatic 20): HealthMonitor.doCheckAll has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/health.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc0ec18d8544987ecb00128fbe2362245abed127915f6fd0244280de57ba6fe"}},{"ruleId":"D1","level":"warning","message":{"text":"memoryEventStore.List (cyclomatic 20): memoryEventStore.List has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 82). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/store.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a8ecd03fce9a8b3055d672eb28eefc6a5bd7a50a8b4ef08d0a86cfadec90790"}},{"ruleId":"D1","level":"warning","message":{"text":"backendSupervisor.installBackend (cyclomatic 20): backendSupervisor.installBackend has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/install.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"42582499e9d9497f168a5a44bf52d09d5a140291e2488e3fb61ef9362bb30dec"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMsgParser.TryConsumeJSON (cyclomatic 20): ChatMsgParser.TryConsumeJSON has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b16bd7c35c3e64f9050bfd50d213175b3bd954d7df0cbd10570193b015ec94"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMsgParser.tryConsumeJSONPrimitive (cyclomatic 20): ChatMsgParser.tryConsumeJSONPrimitive has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"2459cde54fd0f41705c344bc77d7ed685651629d8fd0d0e7c1bbc5f24e85f3ec"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.SetScheduling (cyclomatic 20): Client.SetScheduling has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/inproc/client.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa9437badf266ccb31947bf9f0eefcbd5c160b1f6d76e50d91ec684ed9ce888"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoader.deleteProcess (cyclomatic 20): ModelLoader.deleteProcess has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/process.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f3b25e9c9c7f525425cbb4ad56461db3e6949918f631dea066160300a9a7d1"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemState.getSystemCapabilities (cyclomatic 20): SystemState.getSystemCapabilities has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/system/capabilities.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"290240652b5639adc677bc9210b2ff4ef59364ef62dd08e515d54abd964a5a85"}},{"ruleId":"D1","level":"warning","message":{"text":"vram.ParseSizeString (cyclomatic 20): vram.ParseSizeString has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vram/estimate.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c62e0c7eddb4bf4fa2dcae715eda860a0b0748e4f2c014b32d486b3a516e28a"}},{"ruleId":"D1","level":"warning","message":{"text":"updateUIForActiveChat (cyclomatic 20): updateUIForActiveChat has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b9fa3572638ce818949d4504e91f10a276948bfe86a4da6ae757ffa0922be0"}},{"ruleId":"D1","level":"warning","message":{"text":"inferMetadataType (cyclomatic 20): inferMetadataType has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/artifacts.js"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5dd587568636cecb37ebce68ad425ccd4227c55bf4972fb7e52956193696c1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.resolveModels (cyclomatic 19): main.resolveModels has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/trellis2.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e963814bbd151b09c96e86594bc27ed970ebbb9b9be851232bcb1fccd77af4"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.grpcModelOpts (cyclomatic 19): backend.grpcModelOpts has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/options.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4963c72ebc7399539a0861cb70040d90fe31e8c549925fa8b403ffcbf269b6"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.buildORResponse (cyclomatic 19): openresponses.buildORResponse has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2788}}}],"partialFingerprints":{"codehealthFindingId/v1":"1523b28d1a015bbd82bde342c15804c525b026ce0f0b17cf6d3abe1a83805f8b"}},{"ruleId":"D1","level":"warning","message":{"text":"GalleryService.Start (cyclomatic 19): GalleryService.Start has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 585). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2abe65816a7a9d50fcb214537dc4868b51c77a9c7c009b10eed1d3f031614d"}},{"ruleId":"D1","level":"warning","message":{"text":"nodes.StartFileTransferServerWithReadiness (cyclomatic 19): nodes.StartFileTransferServerWithReadiness has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 103, 143, 90, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15addfca5a5a0c19e859dd7f544d953f91af3f62f0e054b8587a24c9b949ea1"}},{"ruleId":"D1","level":"warning","message":{"text":"HTTPFileStager.doUpload (cyclomatic 19): HTTPFileStager.doUpload has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_stager_http.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8928facf4bc4db6ff7610759c8f9929378fce2b08d8846fd0468a5498153031"}},{"ruleId":"D1","level":"warning","message":{"text":"NodeRegistry.Register (cyclomatic 19): NodeRegistry.Register has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae42997135814dd719c39a7261fd90d9b4f6da5a2f0073c4468e8d25654deb3d"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartRouter.scheduleAndLoad (cyclomatic 19): SmartRouter.scheduleAndLoad has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f224ee3b5eacb41fe5110dee0650b0f1a11f930e36c002d46f0498b9119f7e6"}},{"ruleId":"D1","level":"warning","message":{"text":"piipattern.anchorLen (cyclomatic 19): piipattern.anchorLen has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piipattern/grammar.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"61dd14dc1792eb386d3ce53d49d655500c4465f600482aced827abd41c64166f"}},{"ruleId":"D1","level":"warning","message":{"text":"memoryDecisionStore.List (cyclomatic 19): memoryDecisionStore.List has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 109). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/router/decisions.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eea97bf1e3cdab3398b0116be2ff8cd1d415575f63c467190a99990de7bb7e5"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.ParseXMLIterative (cyclomatic 19): functions.ParseXMLIterative has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04a49d23ffe0951265d815b2ae6fa67d5aa55ebc30d9238979e6f02b0378c71"}},{"ruleId":"D1","level":"warning","message":{"text":"Rules.ToGrammar (cyclomatic 19): Rules.ToGrammar has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/rules.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a84713d0c500ece6b80c070e0ffb59e9ef78d05c4cf7a700ff4a38247a8c732"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoader.startProcess (cyclomatic 19): ModelLoader.startProcess has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 298, 311, 283, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/process.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"910f2296a1182e7ea963729e8e6a91ad6d7420a3e974d722f028896dc4bac349"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildAnthropicRequest (cyclomatic 18): main.buildAnthropicRequest has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c7201f54039b5a442dc40d9a29894c5261ef805ef810578dbba828b6485a68"}},{"ruleId":"D1","level":"warning","message":{"text":"DepthAnythingCpp.Depth (cyclomatic 18): DepthAnythingCpp.Depth has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/depth-anything-cpp/godepthanythingcpp.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1425d9e756aaa91c87f81840833a38cd6ff9128e39ab11a5ae2f9400decae9e"}},{"ruleId":"D1","level":"warning","message":{"text":"LLM.Load (cyclomatic 18): LLM.Load has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/llm/llama/llama.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9ef76343b6724e0edfe08140f7f490acff36198910c1555628215310459110"}},{"ruleId":"D1","level":"warning","message":{"text":"main.findZipformerTriple (cyclomatic 18): main.findZipformerTriple has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"7360b6c308351c8904a82e1aa4c4d10fac28982e3d4ff97ced42ea5408832d76"}},{"ruleId":"D1","level":"warning","message":{"text":"ReleaseManager.downloadFileWithRetry (cyclomatic 18): ReleaseManager.downloadFileWithRetry has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/release_manager.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d6b6383f7cf305a028f875758d5341232384fd640fab30a8de74e1324e174f"}},{"ruleId":"D1","level":"warning","message":{"text":"Application.StartP2P (cyclomatic 18): Application.StartP2P has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/p2p.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b6292c360cc950600edd2bbf7af245682e6b6807cc777f49f571d825b71b4e"}},{"ruleId":"D1","level":"warning","message":{"text":"backend.estimateModelSizeBytes (cyclomatic 18): backend.estimateModelSizeBytes has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/options.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"85aa74ab5b6dd7a7da52749981721fb1efe6cfceaea9abd923c972ff5778bebd"}},{"ruleId":"D1","level":"warning","message":{"text":"gallery.WarmEstimateCache (cyclomatic 18): gallery.WarmEstimateCache has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 104). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/estimate_warm.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ae3812bcf45017d910ebbf6c6357f8ae3424b2d144eefe56fd77f8f90327ba4"}},{"ruleId":"D1","level":"warning","message":{"text":"importers.DiscoverModelConfig (cyclomatic 18): importers.DiscoverModelConfig has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/importers.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8067ab4ff70e31508069eb0c4bbb2fa0e01f3ed5adafbd555542aba032a69ec"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.Middleware (cyclomatic 18): auth.Middleware has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 40). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/middleware.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fedba722282ec1c4939340b03a59fbd80c3dfa2918538e22214e5642827133b"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.updateTransSession (cyclomatic 18): openai.updateTransSession has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d43303c2167420a8e2c59aa931dc858ee3119019ed9685a1d4daa0295776da1"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.RealtimeCalls (cyclomatic 18): openai.RealtimeCalls has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_webrtc.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b61ec628e91a615effb1b7460b4d185ef5f333cbb4115f9c4dbbf5b7e4a1e9e"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.UpscaleEndpoint (cyclomatic 18): openai.UpscaleEndpoint has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/upscale.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d2dcb6e6ed2d00b7c95e1fbb2b11ac8517869680abc880205854f7d57513c6"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.convertORToolsToFunctions (cyclomatic 18): openresponses.convertORToolsToFunctions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"14c685e4d4098be8bffa115723cfb8a7161f2cd3042b6a11cdc6e6c83eec7cbc"}},{"ruleId":"D1","level":"warning","message":{"text":"middleware.tokensFromBody (cyclomatic 18): middleware.tokensFromBody has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/usage.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b9906388335c297cfdaa822e59894afef92ad9c9cb971c4073216a58bbac23a"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestExtractor.SetModelAndConfig (cyclomatic 18): RequestExtractor.SetModelAndConfig has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 124). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbaf21e183638d5747c0e7a4d092401877ed976a2a2f8ba871e19fe7c1e0cc35"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentJobService.ExecuteJob (cyclomatic 18): AgentJobService.ExecuteJob has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71a1c37fd998289015f93c0f70fdc53d3ee0477bdec1473c960576307dc7d3d"}},{"ruleId":"D1","level":"warning","message":{"text":"Dispatcher.processJob (cyclomatic 18): Dispatcher.processJob has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/jobs/dispatcher.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"166ee4bbb873cac7295273f40fe3eae6643f4bd9f91f8ebe3d0f1e9cc16075ce"}},{"ruleId":"D1","level":"warning","message":{"text":"DistributedBackendManager.enqueueAndDrainBackendOp (cyclomatic 18): DistributedBackendManager.enqueueAndDrainBackendOp has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c664abd0ebf74f9d66a9206fb4ab05ae1f96a68302101630bb88b3dd610c07"}},{"ruleId":"D1","level":"warning","message":{"text":"prefixcache.Select (cyclomatic 18): prefixcache.Select has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/prefixcache/select.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"beee479fba20f5859d4bfe32165edee0e22b3f1c640ff7aa896dfdfdb1ecfa53"}},{"ruleId":"D1","level":"warning","message":{"text":"URI.ContentLength (cyclomatic 18): URI.ContentLength has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"792a15e04338043036807dc9086b26a6a545165535be085b199dc8d8604f3dfe"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelLoader.spawnGRPCModel (cyclomatic 18): ModelLoader.spawnGRPCModel has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/initializers.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"8908e9028b0291d090e46c97941e6c17dbd46b066c4647777da0e2ccf9b73434"}},{"ruleId":"D1","level":"warning","message":{"text":"t (cyclomatic 18): t has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/assets/highlightjs.js"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18e8d094f775b95a478b97a31aa9f7745a30078a1ffc6d4493b123e63be06fa"}},{"ruleId":"D1","level":"warning","message":{"text":"N (cyclomatic 18): N has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/assets/highlightjs.js"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"2789880f9252ca71ed662f94d832b1a7e65006d1e1eb570d4d0d158db667d381"}},{"ruleId":"D1","level":"warning","message":{"text":"sanitiseServer (cyclomatic 18): sanitiseServer has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/mcpClientStorage.js"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca9a1aa2e441f16f5f8bee01ab9391589bdbbc2669c9b7544da4b3161e615d4"}},{"ruleId":"D1","level":"warning","message":{"text":"tokenToPlainText (cyclomatic 18): tokenToPlainText has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/markdown.js"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"f61bf5c62bd1603610bb3d6ac4072478ac4a22d86c16c0ae063a9df2cd2a76af"}},{"ruleId":"D1","level":"warning","message":{"text":"CrispASR.AudioTranscriptionStream (cyclomatic 17): CrispASR.AudioTranscriptionStream has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e33ef1c0260865412ec7afad533e425df7d1d3e642a29ed1af3e713616166e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildPredictOptions (cyclomatic 17): main.buildPredictOptions has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/llm/llama/llama.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f48d16d79247246cb25a9b36216e819b02c612b31a7c6cddebe20e2af9ecaff"}},{"ruleId":"D1","level":"warning","message":{"text":"RFDetrCpp.Detect (cyclomatic 17): RFDetrCpp.Detect has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/rfdetr-cpp/gorfdetrcpp.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"3086ab2c84760ee74df13431407212fb6df8175c0361cba1d3d78780cca1f9aa"}},{"ruleId":"D1","level":"warning","message":{"text":"main.glbAccessorData (cyclomatic 17): main.glbAccessorData has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/glb_mesh.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"971e34dd05a6e8b8412b619bfc5508cdead3ccd62250a236da782eb5e7adc4a0"}},{"ruleId":"D1","level":"warning","message":{"text":"config.VoiceCloningForModel (cyclomatic 17): config.VoiceCloningForModel has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/backend_capabilities.go"},"region":{"startLine":934}}}],"partialFingerprints":{"codehealthFindingId/v1":"175cca8e4875762b4a2f1647c2f6dc069ba3320fc6b558b6c16edce69baf54f7"}},{"ruleId":"D1","level":"warning","message":{"text":"config.ApplyInferenceDefaults (cyclomatic 17): config.ApplyInferenceDefaults has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/inference_defaults.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"832ce66a6dd5acfebcf3bf30cfa7349ecb48081973d95c16abdf42234e7d1d47"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelConfig.PrimaryArtifactSpec (cyclomatic 17): ModelConfig.PrimaryArtifactSpec has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_artifact_inference.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa6a08d164706d414b65da7c6a3ff4e6a55292839a0c36c59a79ee6636b5a53f"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscoveryServer.retrieveNetworkData (cyclomatic 17): DiscoveryServer.retrieveNetworkData has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/explorer/discovery.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4eead32560f6066c48cf50a1e63156f7c87fbd8c99d9622b9a22734f997ca4"}},{"ruleId":"D1","level":"warning","message":{"text":"localai.filterSwaggerByTags (cyclomatic 17): localai.filterSwaggerByTags has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/api_instructions.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"76daa874612cf26d7ab93520d68f5f7db45ad6129a01cd90efb643225bb7d9ff"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.emitSpeech (cyclomatic 17): openai.emitSpeech has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_speech.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd8b3ca74c6af38d3398c98aba9090c4384c81e10c76ed740aa3b7b3f878905d"}},{"ruleId":"D1","level":"warning","message":{"text":"middleware.MergeOpenResponsesConfig (cyclomatic 17): middleware.MergeOpenResponsesConfig has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"432ff79e23bb321e247436a6a0f6a1d277a872493d8ad526067d49dbadefa8d2"}},{"ruleId":"D1","level":"warning","message":{"text":"GalleryService.SubscribeBroadcasts (cyclomatic 17): GalleryService.SubscribeBroadcasts has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b243be5e984bf00cb970002634a51c33250f9d5dfff64276b5f7d2caa9ca7f8"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartRouter.buildPreference (cyclomatic 17): SmartRouter.buildPreference has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"4836ce277042a1a29ecb9d48eac22284312daeff460ae4169f5362d2af094cff"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.Create (cyclomatic 17): Store.Create has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/voiceprofile/store.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"960f00effe808f732ee61004fa8dbdb408d68cb534bfde11a2891fb78c75b83d"}},{"ruleId":"D1","level":"warning","message":{"text":"backendSupervisor.startBackend (cyclomatic 17): backendSupervisor.startBackend has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/supervisor.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc4ce80ded986be84bae7ba67ee2c659995a9ef84da4e3034eb90e9429c1394"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.eraseSpaces (cyclomatic 17): functions.eraseSpaces has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dce4fd300fc62110bde63e377e92122e2773263534a8f4e8cc15c46c199994"}},{"ruleId":"D1","level":"warning","message":{"text":"peg.parseJSONObject (cyclomatic 17): peg.parseJSONObject has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"49302eca1a002a4b3aaea8aa9235e7f9c4fa90c140554a76a2d8d220c34fd8b0"}},{"ruleId":"D1","level":"warning","message":{"text":"modelartifacts.committedResult (cyclomatic 17): modelartifacts.committedResult has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fbe6fb78e9ed58d735961005a88bc9de3f6fa108b45b4e3b6c14dc4e3c84bae"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.ExtractArchive (cyclomatic 17): utils.ExtractArchive has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/utils/untar.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"586bd84050abe54b4a8c5f129d1f27f36750be9802c42369fbd25059be9f1d56"}},{"ruleId":"D1","level":"warning","message":{"text":"xsysinfo.getNVIDIAGPUMemory (cyclomatic 17): xsysinfo.getNVIDIAGPUMemory has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4815ac3c7c9bcebda85f84e4f4b4d9ae358c2e6f4fc8a4214f7ccd2a26c7a3b"}},{"ruleId":"D1","level":"warning","message":{"text":"updateTokenUsage (cyclomatic 17): updateTokenUsage has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2392}}}],"partialFingerprints":{"codehealthFindingId/v1":"e309f9c7ecb278170aa961c0be7e8f07a7bb2b56b1c7e7f84550012c42a201ca"}},{"ruleId":"D1","level":"warning","message":{"text":"h (cyclomatic 17): h has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/assets/highlightjs.js"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"39f0b56e3245615be40f5984db801445cdb1ccb7920f09584fca760a3fb4f80a"}},{"ruleId":"D1","level":"warning","message":{"text":"run (cyclomatic 17): run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useSpectrogram.js"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b3afa710730df8ca851ae81d3d3ec19684d58a6b6131ad47f75f4fa7d34beb"}},{"ruleId":"D1","level":"warning","message":{"text":"SherpaBackend.runOnlineASR (cyclomatic 16): SherpaBackend.runOnlineASR has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"831254a64a898708830de1b99dfb3de788d3f42ed6c6e838504f268563744703"}},{"ruleId":"D1","level":"warning","message":{"text":"Whisper.AudioTranscription (cyclomatic 16): Whisper.AudioTranscription has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/whisper/gowhisper.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d711c99f14891ac804d20c7609fc129d78908165872678f90c60e26eab26dfa"}},{"ruleId":"D1","level":"warning","message":{"text":"Whisper.AudioTranscriptionStream (cyclomatic 16): Whisper.AudioTranscriptionStream has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/whisper/gowhisper.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bf6d732f40e39b56c33aa0862512122992cf681b10e63988a91bf0be09bcd6"}},{"ruleId":"D1","level":"warning","message":{"text":"application.startMITMLocked (cyclomatic 16): application.startMITMLocked has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/mitm.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5e9f4e956c58dd9d8ab75779de31b0d0f6874de4016c9be892aa0859631df3"}},{"ruleId":"D1","level":"warning","message":{"text":"UpgradeChecker.runCheck (cyclomatic 16): UpgradeChecker.runCheck has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/upgrade_checker.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"3666a6246da550e38d72d0287396c65f2090210670cf9732598c0b90e1fcd4e5"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.generateBashCompletion (cyclomatic 16): cli.generateBashCompletion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a7ec3b6e441d32f655ca798741b2fe37d4875ffc87c635c18dc3ccbcbfb6842"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.generateZshCompletion (cyclomatic 16): cli.generateZshCompletion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa82e3b2e54b3ca8f0601a676ef993266700b7ac5d71c1885b3fdaddc483be5"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptCMD.Run (cyclomatic 16): TranscriptCMD.Run has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/transcript.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf43e4986cdd718dc81579e7fa366208ed158d409bde8136506e64e4d9489c54"}},{"ruleId":"D1","level":"warning","message":{"text":"config.guessGGUFFromFile (cyclomatic 16): config.guessGGUFFromFile has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/gguf.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"0686a1922c8c92b7653c2e42cd0340909b94214eff4354ecf82fa8d72061de7d"}},{"ruleId":"D1","level":"warning","message":{"text":"meta.applyOverride (cyclomatic 16): meta.applyOverride has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/meta/build.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"706ab350400f82043f93981709cbb0b111cd8760d02198f39d47916d6e31cf3b"}},{"ruleId":"D1","level":"warning","message":{"text":"meta.walkStruct (cyclomatic 16): meta.walkStruct has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/meta/reflect.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda6a8721b3b2b51ff694ef56ff8936677e72ad4ef5529d7d9d08e8c4de42fe9"}},{"ruleId":"D1","level":"warning","message":{"text":"RFDetrImporter.Import (cyclomatic 16): RFDetrImporter.Import has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/rfdetr.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52f4082552b1bc335051d0aad7c41ce6c0089a0eb5a8ebf3c9f19f3e24b1c5b"}},{"ruleId":"D1","level":"warning","message":{"text":"StableDiffusionGGMLImporter.Match (cyclomatic 16): StableDiffusionGGMLImporter.Match has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/stablediffusion-ggml.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ecce0a287ce65d5dd8e0489f3e319e300f1942b318bdad497ea6fd26c3856b"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.QuotaExceeded (cyclomatic 16): auth.QuotaExceeded has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/quota.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1e31087c237aa8c242c7be20f38cb23a8d22ab072239b5b95ab7ce8b183427a"}},{"ruleId":"D1","level":"warning","message":{"text":"mcp.NamedSessionsFromMCPConfig (cyclomatic 16): mcp.NamedSessionsFromMCPConfig has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"6926b2ed2092878eeb09773f1ee9c8e390096606cc6894ea30a2a513dbda6b0e"}},{"ruleId":"D1","level":"warning","message":{"text":"openai.DiarizationEndpoint (cyclomatic 16): openai.DiarizationEndpoint has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 52). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/diarization.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a02b01fa99ae846feceec581cce8f2c0772fc8f09b1b15ed2a92ef349ab14f"}},{"ruleId":"D1","level":"warning","message":{"text":"types.validateSlots (cyclomatic 16): types.validateSlots has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/classifier.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d5d0ee05e0d0898c9d82240c1c5db9eed8a31a5800e87c08349e4578b7ba76"}},{"ruleId":"D1","level":"warning","message":{"text":"openresponses.forwardEvents (cyclomatic 16): openresponses.forwardEvents has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/websocket.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"18eb1b267347652f959df66a9cd4d40e2d7be59affd68ff04eab471928076f1d"}},{"ruleId":"D1","level":"warning","message":{"text":"agents.KBAutoSearchPrompt (cyclomatic 16): agents.KBAutoSearchPrompt has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/knowledge.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd62a6ec9338295c8e6f59e9a41864e953b419913bf9ed16a7234588d2ccd2f"}},{"ruleId":"D1","level":"warning","message":{"text":"FileStagingClient.GenerateVideo (cyclomatic 16): FileStagingClient.GenerateVideo has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_staging_client.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"abef34dcc3f74b4b793547223f660aaf54e95acd223fb08cdb4d453c54f49761"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartRouter.Route (cyclomatic 16): SmartRouter.Route has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece3bc7e05da062a043b729d23d5e3a6c2d853bab77175b0aea3cc721536435e"}},{"ruleId":"D1","level":"warning","message":{"text":"functions.ParseFunctionCallPEG (cyclomatic 16): functions.ParseFunctionCallPEG has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1f14d823f43e38833c075bbb80413aa1897cb45bfe0f2e026594c00ec30342"}},{"ruleId":"D1","level":"warning","message":{"text":"peg.parseJSONString (cyclomatic 16): peg.parseJSONString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a0816a8fb1b8c45b2182ae3bc36815faf76fa603f3d07518824048c459833d"}},{"ruleId":"D1","level":"warning","message":{"text":"localaitools.registerModelTools (cyclomatic 16): localaitools.registerModelTools has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 48, 71, 87, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/tools_models.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"519c90730774ffce1b404676d1243d68c2914eba8954737be935a5487a6e9e5e"}},{"ruleId":"D1","level":"warning","message":{"text":"localaitools.registerSchedulingTools (cyclomatic 16): localaitools.registerSchedulingTools has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 42, 24, 68, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/tools_scheduling.go"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"168a5ebf0ed2459377fd625040d1a24ae02c505015f9b9370c4647bb2792bc27"}},{"ruleId":"D1","level":"warning","message":{"text":"Verifier.VerifyImage (cyclomatic 16): Verifier.VerifyImage has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/cosignverify/verify.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"31677acdbe114688b432c40441b46fe13dd521d944207b1e96b8c8303689024c"}},{"ruleId":"D1","level":"warning","message":{"text":"token (cyclomatic 16): token has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmGoTemplate.js"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea6222f1979c170fb7ac47bbae467e91182ab53af7f8e689a5c26042d942e5b"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.ChatEndpoint (cognitive 482): openai.ChatEndpoint has cognitive complexity 482 (threshold 15). Drivers by points: if/else 359, loops 64, boolean chains 39, match/switch 18, jumps 2 (nesting depth added 308). Most of this is not in the body itself: 0 of the 482 points are its own statements and the rest belongs to one function literal inside it that branches (line 133). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1598a46409bbfb5aee4bfc47c9d6517e5cb9ecaa85609ba5f96f7e5131aa7e3"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMsgParser.TryConsumeXMLToolCalls (cognitive 439): ChatMsgParser.TryConsumeXMLToolCalls has cognitive complexity 439 (threshold 15). Drivers by points: if/else 397, boolean chains 27, loops 15 (nesting depth added 298). Of this number, 390 points are the body\u0027s own statements and 49 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40fcf5d845af7c712d4f7699e958a212c13e52ee99ff466a22aab21e1e4092e"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 313): (anonymous) has cognitive complexity 313 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useChat.js"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a905b055e968ad59da9ed252efaecf3dc6eebd8ea3e91f75f70d267192d8eb"}},{"ruleId":"D2","level":"warning","message":{"text":"routes.RegisterUIAPIRoutes (cognitive 310): routes.RegisterUIAPIRoutes has cognitive complexity 310 (threshold 15). Drivers by points: if/else 223, loops 64, boolean chains 20, match/switch 3 (nesting depth added 109). Most of this is not in the body itself: 1 of the 310 points is its own statement and the rest belongs to 28 function literals inside it that branch (lines 126, 414, 1214, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe29c79ec677ec4a414da9ed9a4f307062b3da868ea7319e4c29c9809065897"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleOpenResponsesStream (cognitive 257): openresponses.handleOpenResponsesStream has cognitive complexity 257 (threshold 15). Drivers by points: if/else 199, loops 36, boolean chains 22 (nesting depth added 151). Of this number, 168 points are the body\u0027s own statements and 89 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1602}}}],"partialFingerprints":{"codehealthFindingId/v1":"736fcf6ce5f49e032ffac86e24c4529a675ddd39917e27cd5a47f9d6e78788d8"}},{"ruleId":"D2","level":"warning","message":{"text":"promptGPT (cognitive 217): promptGPT has cognitive complexity 217 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"b98b1966c25e00beced9c86828b2579d45f03d01bff24e485e2a848c6b76326f"}},{"ruleId":"D2","level":"warning","message":{"text":"routes.RegisterAuthRoutes (cognitive 196): routes.RegisterAuthRoutes has cognitive complexity 196 (threshold 15). Drivers by points: if/else 171, boolean chains 17, loops 6, match/switch 2 (nesting depth added 33). Most of this is not in the body itself: 13 of the 196 points are its own statements and the rest belongs to 33 function literals inside it that branch (lines 297, 130, 656, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42fa0f691ecbcc4a15fddf1a6d9770378463dccf3170452d6093cdb86eca0c1"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 162): (anonymous) has cognitive complexity 162 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e340d37de6ebac2da5462d8eebe137aaf10d8de0af035ea31ca1148edbaf24c"}},{"ruleId":"D2","level":"warning","message":{"text":"RunCMD.Run (cognitive 158): RunCMD.Run has cognitive complexity 158 (threshold 15). Drivers by points: if/else 145, boolean chains 10, loops 3 (nesting depth added 29). Of this number, 157 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/run.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2954e41efd2484063ad3676703a0eb12701da084ba6d1ec7ac6bfbf390e3d96"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.runRealtimeSession (cognitive 158): openai.runRealtimeSession has cognitive complexity 158 (threshold 15). Drivers by points: if/else 131, boolean chains 15, loops 10, match/switch 2 (nesting depth added 83). Of this number, 155 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29aa17897e0d6ecfc08e41501993db29d936b04ff0e2eb0cbe4f5c03e051e30"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 155): (anonymous) has cognitive complexity 155 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1951}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c25d3a713cd3f045c40abdfb2ea64a7b4727666ee358ca5836d0cb26e95a26"}},{"ruleId":"D2","level":"warning","message":{"text":"anthropic.convertAnthropicToOpenAIMessages (cognitive 138): anthropic.convertAnthropicToOpenAIMessages has cognitive complexity 138 (threshold 15). Drivers by points: if/else 109, match/switch 14, loops 12, boolean chains 3 (nesting depth added 112). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d3151e81ddf512487af37ead5c28996395aa709ac95d6382fdf56f89f2d562"}},{"ruleId":"D2","level":"warning","message":{"text":"application.New (cognitive 134): application.New has cognitive complexity 134 (threshold 15). Drivers by points: if/else 107, loops 13, match/switch 10, boolean chains 4 (nesting depth added 58). Of this number, 102 points are the body\u0027s own statements and 32 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/startup.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b53f8d6f38cf603162043efe601b67ba8d9e4e85327c2bc6a138b0a191d057f"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.mergeOpenAIRequestAndModelConfig (cognitive 126): middleware.mergeOpenAIRequestAndModelConfig has cognitive complexity 126 (threshold 15). Drivers by points: if/else 84, match/switch 22, loops 16, jumps 3, boolean chains 1 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd96731fa7f2a1c339836ee7bc2bc9fb6745ebc675516347ff92967f8e1cec25"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.triggerResponseAtTurn (cognitive 115): openai.triggerResponseAtTurn has cognitive complexity 115 (threshold 15). Drivers by points: if/else 84, boolean chains 12, loops 11, match/switch 8 (nesting depth added 45). Of this number, 114 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":2249}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a937a6611953233c8cef43a02e606ccc655e38d473065ff17fac252b34400ca"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleBackgroundNonStream (cognitive 115): openresponses.handleBackgroundNonStream has cognitive complexity 115 (threshold 15). Drivers by points: if/else 85, loops 20, boolean chains 8, match/switch 2 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f521b161a598986b93a15e423ec584595491ed07669238d17cc78c848ede54c"}},{"ruleId":"D2","level":"warning","message":{"text":"http.API (cognitive 114): http.API has cognitive complexity 114 (threshold 15). Drivers by points: if/else 105, boolean chains 8, loops 1 (nesting depth added 47). Of this number, 50 points are the body\u0027s own statements and 64 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/app.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0187c3bec25dd0e45f4845c3aa765309c73fa5faf6f7706528cabde8421ba7"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.parseJSONWithStackTracking (cognitive 114): functions.parseJSONWithStackTracking has cognitive complexity 114 (threshold 15). Drivers by points: if/else 87, loops 23, boolean chains 4 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/json_stack_parser.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde1eb2598fd29ebfc7cea861c2bdef169a9d09a4ae8cf27c7b21b55dc6a809b"}},{"ruleId":"D2","level":"warning","message":{"text":"anthropic.handleAnthropicStream (cognitive 111): anthropic.handleAnthropicStream has cognitive complexity 111 (threshold 15). Drivers by points: if/else 71, loops 26, boolean chains 11, match/switch 3 (nesting depth added 68). Of this number, 89 points are the body\u0027s own statements and 22 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"d938513bee29ad2c5c5f0bdc3a5ffa27efa65a5c18b110c9249dee2b9a66f9b3"}},{"ruleId":"D2","level":"warning","message":{"text":"URI.DownloadFileWithContext (cognitive 109): URI.DownloadFileWithContext has cognitive complexity 109 (threshold 15). Drivers by points: if/else 100, boolean chains 6, match/switch 3 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"36ad57b22329a07ce93ce392f0061c50cb393d6f9a97d779f33a087fb7ce1768"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.ModelInference (cognitive 108): backend.ModelInference has cognitive complexity 108 (threshold 15). Drivers by points: if/else 98, loops 6, boolean chains 4 (nesting depth added 53). Of this number, 24 points are the body\u0027s own statements and 84 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/llm.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d0990bb78c475a856fe0a718432a1050d5a8920f204dcd1004848def4840cba"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.InstallModel (cognitive 107): gallery.InstallModel has cognitive complexity 107 (threshold 15). Drivers by points: if/else 100, boolean chains 3, loops 2, match/switch 2 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"459fc961f4d6ca9c5a09730bd5a9256f046f119961f7378a6fc955be159fe99f"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPegMapper.mapNode (cognitive 105): ChatPegMapper.mapNode has cognitive complexity 105 (threshold 15). Drivers by points: if/else 95, boolean chains 6, loops 3, match/switch 1 (nesting depth added 64). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0baa637ead084fee1bea6245d89ca44288b0d77d6b6c395031b0278fbac3c41"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleOpenResponsesNonStream (cognitive 98): openresponses.handleOpenResponsesNonStream has cognitive complexity 98 (threshold 15). Drivers by points: if/else 74, loops 16, boolean chains 8 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1322}}}],"partialFingerprints":{"codehealthFindingId/v1":"51caa5e229e5767f8b0558de0f05b0781378a4bec036e1789daf1ecb03d8aea7"}},{"ruleId":"D2","level":"warning","message":{"text":"LLama31SchemaConverter.visit (cognitive 94): LLama31SchemaConverter.visit has cognitive complexity 94 (threshold 15). Drivers by points: if/else 72, loops 19, boolean chains 3 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/llama31_schema.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e4753d9e8197b64eb802611ac3f96b609ca12b88b142177bd415ae5c6f115c"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfig.GuessUsecases (cognitive 91): ModelConfig.GuessUsecases has cognitive complexity 91 (threshold 15). Drivers by points: if/else 82, boolean chains 9 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"236b74e02cfeae04629df2fa4189121d48ed63bc8347926903a02dab29a7f0af"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONSchemaConverter.visit (cognitive 90): JSONSchemaConverter.visit has cognitive complexity 90 (threshold 15). Drivers by points: if/else 62, loops 18, boolean chains 6, match/switch 4 (nesting depth added 45). Of this number, 87 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0820ceb3df005282c521ba771a1d2f08c186fcbb457f250ab420997ebdc2fc3"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMsgParser.ParseMsgWithXMLToolCalls (cognitive 90): ChatMsgParser.ParseMsgWithXMLToolCalls has cognitive complexity 90 (threshold 15). Drivers by points: if/else 80, boolean chains 5, loops 5 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a6f3e0ad5d9777de178bb8290c6dca62bf427734b315092ec7abb0e9966d4d"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.UpdateSettingsEndpoint (cognitive 87): localai.UpdateSettingsEndpoint has cognitive complexity 87 (threshold 15). Drivers by points: if/else 75, boolean chains 8, loops 4 (nesting depth added 29). Most of this is not in the body itself: 0 of the 87 points are its own statements and the rest belongs to one function literal inside it that branches (line 30). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/settings.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"158167f82995e67271e7a9f7e495421f8ae11898e3917a89fa7ea2c300cc73b8"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentJobService.ExecuteJobInternal (cognitive 86): AgentJobService.ExecuteJobInternal has cognitive complexity 86 (threshold 15). Drivers by points: if/else 74, loops 8, boolean chains 3, match/switch 1 (nesting depth added 43). Of this number, 81 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87647fd6a0e90063652246d55de7d46adafac5e7f828cfa7a697780201f0acb"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.ParseFunctionCall (cognitive 86): functions.ParseFunctionCall has cognitive complexity 86 (threshold 15). Drivers by points: if/else 59, loops 23, boolean chains 4 (nesting depth added 45). Of this number, 62 points are the body\u0027s own statements and 24 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"692ddea1e9f0f5d2e1ab2eec9131b8f0260529179b03fde7c62e8f50ad4d44fc"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.parseJSONWithStack (cognitive 85): functions.parseJSONWithStack has cognitive complexity 85 (threshold 15). Drivers by points: if/else 65, boolean chains 19, loops 1 (nesting depth added 22). Of this number, 82 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/json_stack_parser.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"1069fee295c31474a64b71b61bd6ddff9d1349580e19b035125a060364acb6a6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.chunkText (cognitive 84): main.chunkText has cognitive complexity 84 (threshold 15). Drivers by points: if/else 68, loops 13, boolean chains 3 (nesting depth added 58). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"266c4e792cbd1c62b183300072ac73f90b453c877b68f7463d594535ba579a63"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.ResponsesEndpoint (cognitive 81): openresponses.ResponsesEndpoint has cognitive complexity 81 (threshold 15). Drivers by points: if/else 64, boolean chains 12, loops 5 (nesting depth added 33). Most of this is not in the body itself: 0 of the 81 points are its own statements and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b720d1217c19aa1ea846b5237575b77faaaa1ab5b488c9ea93038ee2c57d951"}},{"ruleId":"D2","level":"warning","message":{"text":"agents.ExecuteChatWithLLM (cognitive 77): agents.ExecuteChatWithLLM has cognitive complexity 77 (threshold 15). Drivers by points: if/else 60, boolean chains 15, match/switch 2 (nesting depth added 20). Of this number, 66 points are the body\u0027s own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/executor.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"3039451c8a68209d8d2d1d76ebc157b71b45992ed423877f15b813964da2c91e"}},{"ruleId":"D2","level":"warning","message":{"text":"wrappedModel.Predict (cognitive 73): wrappedModel.Predict has cognitive complexity 73 (threshold 15). Drivers by points: if/else 53, match/switch 12, loops 5, boolean chains 3 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac99637daf8aad7ec712b2374142b15e3406f91129933c29b85290c9cddc7495"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.InstallBackend (cognitive 72): gallery.InstallBackend has cognitive complexity 72 (threshold 15). Drivers by points: if/else 64, match/switch 4, loops 3, boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b3661e4f904fadaf636031a7e55cdb127fe69c369f2a40fa0ad5e8d194b25e"}},{"ruleId":"D2","level":"warning","message":{"text":"Evaluator.TemplateMessages (cognitive 72): Evaluator.TemplateMessages has cognitive complexity 72 (threshold 15). Drivers by points: if/else 66, boolean chains 5, loops 1 (nesting depth added 39). Of this number, 60 points are the body\u0027s own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/templates/evaluator.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e508a00018a625ab0990ae336f868f62f3fd9de6d2e3bc8a4464481a91a479"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseVertexGLB (cognitive 70): main.parseVertexGLB has cognitive complexity 70 (threshold 15). Drivers by points: if/else 48, boolean chains 11, loops 9, match/switch 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/glb_mesh.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"508f5515c2360037a50c683f97f35a63a103c03b67fb441976c6df74f615d2dc"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.InpaintingEndpoint (cognitive 70): openai.InpaintingEndpoint has cognitive complexity 70 (threshold 15). Drivers by points: if/else 63, boolean chains 7 (nesting depth added 22). Most of this is not in the body itself: 0 of the 70 points are its own statements and the rest belongs to one function literal inside it that branches (line 44). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/inpainting.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6560d65952c5d8e5e57691db0ba593db80fb58cff99e37413ca06c18372c3be3"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.ImageEndpoint (cognitive 68): openai.ImageEndpoint has cognitive complexity 68 (threshold 15). Drivers by points: if/else 58, loops 7, boolean chains 2, match/switch 1 (nesting depth added 35). Most of this is not in the body itself: 0 of the 68 points are its own statements and the rest belongs to one function literal inside it that branches (line 78). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/image.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74e0fa1a8dc4acc2fdc497163befa90c35eac1d5cac568ed2f0a86aed19fee3"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 68): (anonymous) has cognitive complexity 68 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2561}}}],"partialFingerprints":{"codehealthFindingId/v1":"f981371a13933326866c59945c45f23d64ffc3e44f9b064928724887941b3bb1"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.swaggerToMarkdown (cognitive 64): localai.swaggerToMarkdown has cognitive complexity 64 (threshold 15). Drivers by points: if/else 44, loops 20 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/api_instructions.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0ce72bcc2398b35abd3fa9042af78ed2aca1136eabdbb843c0c9a79c1b964c"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalVQE.AudioTransformStream (cognitive 63): LocalVQE.AudioTransformStream has cognitive complexity 63 (threshold 15). Drivers by points: if/else 58, boolean chains 2, match/switch 2, loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"8055be848b70c13be60b30c6308e2c072a5580606bd5d65a04f78019baf6e135"}},{"ruleId":"D2","level":"warning","message":{"text":"anthropic.handleAnthropicNonStream (cognitive 63): anthropic.handleAnthropicNonStream has cognitive complexity 63 (threshold 15). Drivers by points: if/else 44, loops 12, boolean chains 7 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dc1a87c7b2fcbb702142cb840bc2b492fe6bc903aa5e9dea1f1c42a537f815"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfig.Validate (cognitive 62): ModelConfig.Validate has cognitive complexity 62 (threshold 15). Drivers by points: if/else 46, boolean chains 7, loops 7, match/switch 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"f583f0d226cf6acf68f417e007a6dd6016a4545bc4df3603e249a90ae3117253"}},{"ruleId":"D2","level":"warning","message":{"text":"application.initDistributed (cognitive 61): application.initDistributed has cognitive complexity 61 (threshold 15). Drivers by points: if/else 53, boolean chains 3, match/switch 3, loops 2 (nesting depth added 15). Of this number, 48 points are the body\u0027s own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/distributed.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a98685ebe07d62497ee822377651b9f20fcc4ee766c20e04f93b81fc8e32462"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.ComputeChoices (cognitive 61): openai.ComputeChoices has cognitive complexity 61 (threshold 15). Drivers by points: if/else 42, loops 14, boolean chains 5 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/inference.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7112fcb86fe42e186a872af05daa6fd6daae3ab069b6022331ce37001f4f8be"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.updateSession (cognitive 61): openai.updateSession has cognitive complexity 61 (threshold 15). Drivers by points: if/else 46, boolean chains 11, loops 4 (nesting depth added 20). Of this number, 58 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"587498cea168352505bfa80af1c93350a044fe8a3ddcac4c78ea060024773cae"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.commitUtteranceWithTranscript (cognitive 61): openai.commitUtteranceWithTranscript has cognitive complexity 61 (threshold 15). Drivers by points: if/else 55, boolean chains 5, match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1747}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea399245be7f38b2832a075ba3f88492439b9b554347dcd588397773d13f470"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.ListSystemBackends (cognitive 57): gallery.ListSystemBackends has cognitive complexity 57 (threshold 15). Drivers by points: if/else 44, loops 12, boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2281ccb46394ab4ff7d97ae15bb80054ee9044ae9e6382aa5aac51f962c784a"}},{"ruleId":"D2","level":"warning","message":{"text":"oci.extractTarCopyingLinks (cognitive 57): oci.extractTarCopyingLinks has cognitive complexity 57 (threshold 15). Drivers by points: if/else 51, loops 4, match/switch 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/image.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dae34797997a97aa74c78ae6a66e2fdb823e286384897a89b7dab9ea92f3acd"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.CompletionEndpoint (cognitive 56): openai.CompletionEndpoint has cognitive complexity 56 (threshold 15). Drivers by points: if/else 46, boolean chains 3, loops 3, match/switch 3, jumps 1 (nesting depth added 28). Most of this is not in the body itself: 0 of the 56 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 82, 41). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/completion.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e4906676724942d4a2d3611f11de4404cf839a6cf7a7225dd2227bdddb3e96"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleBackgroundStream (cognitive 56): openresponses.handleBackgroundStream has cognitive complexity 56 (threshold 15). Drivers by points: if/else 38, loops 11, boolean chains 5, match/switch 2 (nesting depth added 32). Of this number, 54 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b79137427959f52781871625724679646a19a0cd2992a512f0e7fbc8d71704"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertORMessageItem (cognitive 54): openresponses.convertORMessageItem has cognitive complexity 54 (threshold 15). Drivers by points: if/else 46, match/switch 4, boolean chains 2, loops 2 (nesting depth added 37). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6f538ad935a7dc1496baeb4d5d50217fcf083e883dacb063355028f7132cc7"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicaReconciler.reconcileModel (cognitive 53): ReplicaReconciler.reconcileModel has cognitive complexity 53 (threshold 15). Drivers by points: if/else 45, boolean chains 8 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"46180181263a559e3f23d0bc685b52ff41474f3db8680e26d9f67660eaf79c2e"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.stageModelFiles (cognitive 53): SmartRouter.stageModelFiles has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, loops 4, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2901aafecdcf275a9bc94a320e73063dcef345fd8b84300eb6eee5b330f58c"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.ParseXMLIterative (cognitive 53): functions.ParseXMLIterative has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, loops 4, boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"0106c3aaaca3a5ae321829c81512d53a0d6725e9100b2a5b7744191839349e79"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.streamLLMResponse (cognitive 52): openai.streamLLMResponse has cognitive complexity 52 (threshold 15). Drivers by points: if/else 41, loops 7, boolean chains 4 (nesting depth added 18). Of this number, 34 points are the body\u0027s own statements and 18 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_stream.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca63c6114b295c4c2c319e72dfa0898ef51cbb0cbab1a7bfd3e13f80f898981a"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.parseVulkanGPUMemoryText (cognitive 52): xsysinfo.parseVulkanGPUMemoryText has cognitive complexity 52 (threshold 15). Drivers by points: if/else 46, boolean chains 5, loops 1 (nesting depth added 22). Of this number, 42 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":1061}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b569a8ae9d49b9b2e729a76860a8a622c39457439e5730f77df3c737f53486"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertORInputToMessages (cognitive 51): openresponses.convertORInputToMessages has cognitive complexity 51 (threshold 15). Drivers by points: if/else 44, match/switch 4, loops 2, boolean chains 1 (nesting depth added 35). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7fdf30f6caf9c707ceaa7bbd6ddb1b61086164bd0dff9c36c13f6100709f5b1"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthMonitor.doCheckAll (cognitive 50): HealthMonitor.doCheckAll has cognitive complexity 50 (threshold 15). Drivers by points: if/else 43, loops 4, boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/health.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb07c56cfb79cac708808e39f0d797814519f123c1c6b4e1d8d5199d2598bce"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudProxy.predictAnthropicStreamRich (cognitive 49): CloudProxy.predictAnthropicStreamRich has cognitive complexity 49 (threshold 15). Drivers by points: if/else 42, match/switch 5, boolean chains 1, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"830f725d449ae1cecd1f95b624b0d4f610f7bda7a5b3de61a8aa2dd67e00f6ba"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.processStreamWithTools (cognitive 48): openai.processStreamWithTools has cognitive complexity 48 (threshold 15). Drivers by points: if/else 30, loops 8, boolean chains 5, match/switch 5 (nesting depth added 15). Most of this is not in the body itself: 15 of the 48 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 274, 419). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat_stream_workers.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"32929e45c79bcb230983842136e2fba6335006e32da6acfb96312be953a84be3"}},{"ruleId":"D2","level":"warning","message":{"text":"peg.parseJSONString (cognitive 47): peg.parseJSONString has cognitive complexity 47 (threshold 15). Drivers by points: if/else 39, loops 5, match/switch 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"6853406657767ff7e55640d52c1696f14f2c11e1ed4447ee21d275449d384141"}},{"ruleId":"D2","level":"warning","message":{"text":"analyzeYamlContext (cognitive 47): analyzeYamlContext has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmYamlComplete.js"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"29848790cfe95352600786d60668b182d9f60aeaae1076c939a0039e45404a17"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 47): (anonymous) has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmYamlComplete.js"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f05afb9bf7a440c7699e93cab68ab82f7acd63ac79bd1f4ebe239a8da96202e"}},{"ruleId":"D2","level":"warning","message":{"text":"OAuthManager.CallbackHandler (cognitive 45): OAuthManager.CallbackHandler has cognitive complexity 45 (threshold 15). Drivers by points: if/else 43, boolean chains 2 (nesting depth added 18). Most of this is not in the body itself: 0 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 184). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/oauth.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"82025e6abb7efadd832d3335ead418628f7ae4814c7906d8f4a9ebb6fc49217d"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.TTSEndpoint (cognitive 45): localai.TTSEndpoint has cognitive complexity 45 (threshold 15). Drivers by points: if/else 41, boolean chains 4 (nesting depth added 19). Most of this is not in the body itself: 0 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/tts.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0330739e7990330a0d6aab0407de502559627172d96ab42ef966eed19c657ef"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassifierConfig.Validate (cognitive 45): ClassifierConfig.Validate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33, boolean chains 5, match/switch 4, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/classifier.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5acab9be622a16c43b1b3395846d81ddcd4fecc01164bf1d6d123d4b68588ff"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfigLoader.preloadOne (cognitive 44): ModelConfigLoader.preloadOne has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, loops 3, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config_loader.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d472c7cbea36063e92903cd97b84a87bec0bcebe3ca4c8c1a311e10688bf33c"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.ModelTTSStream (cognitive 43): backend.ModelTTSStream has cognitive complexity 43 (threshold 15). Drivers by points: if/else 40, boolean chains 3 (nesting depth added 17). Of this number, 18 points are the body\u0027s own statements and 25 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/tts.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc9b96dc63569562e00a4df2aa6cd0dda6fe863cc73d53981027d3b1177813a"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscoveryServer.retrieveNetworkData (cognitive 43): DiscoveryServer.retrieveNetworkData has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22, loops 9, match/switch 6, boolean chains 4, jumps 2 (nesting depth added 26). Of this number, 42 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/explorer/discovery.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc78b2bde1ff1545b5c9885b51bceffa771779b98336693336e560b0ca3fdbaf"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.CheckUpgradesAgainst (cognitive 43): gallery.CheckUpgradesAgainst has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36, boolean chains 5, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/upgrade.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e15b00ba2989d315986626c9029f777d9d841a03c7f0ed9191f4296c4281050"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.classifierRespond (cognitive 43): openai.classifierRespond has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35, boolean chains 5, loops 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_classifier.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b45ae1be268d624a90e4aefad1be2abfe16fa434c1db7bd1e070575705dd07"}},{"ruleId":"D2","level":"warning","message":{"text":"piiadapter.OpenAI (cognitive 43): piiadapter.OpenAI has cognitive complexity 43 (threshold 15). Drivers by points: if/else 30, boolean chains 6, loops 5, match/switch 2 (nesting depth added 22). Most of this is not in the body itself: 0 of the 43 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 30, 67). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/openai.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"f241eeb35e2cfd043333155a256bc06d5d183090dee8acd9c8f4864022598813"}},{"ruleId":"D2","level":"warning","message":{"text":"worker.Run (cognitive 43): worker.Run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35, boolean chains 4, match/switch 3, loops 1 (nesting depth added 14). Of this number, 24 points are the body\u0027s own statements and 19 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/worker.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7c2090e53ac8cafe7ce000b0aef8cf7160f76767d227c94546ec067a1f489e2"}},{"ruleId":"D2","level":"warning","message":{"text":"reasoning.ExtractReasoning (cognitive 43): reasoning.ExtractReasoning has cognitive complexity 43 (threshold 15). Drivers by points: if/else 33, loops 6, boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/reasoning/reasoning.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4789d82be071ccbe99e51f0c29e5c23254753253bf35341a57d8d50fbd87cf"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaCPPImporter.Import (cognitive 42): LlamaCPPImporter.Import has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26, loops 6, match/switch 6, boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/llama-cpp.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6da425c1bfd7f3740020dffe1a3d8700320289913f59f2aa83233ee89aef18"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryService.Start (cognitive 42): GalleryService.Start has cognitive complexity 42 (threshold 15). Drivers by points: if/else 39, match/switch 2, loops 1 (nesting depth added 25). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 585). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71e90003bfedfc97df1294ea4c18be570f063765bf2ee73cb03f02b53066c30"}},{"ruleId":"D2","level":"warning","message":{"text":"parseGlb (cognitive 42): parseGlb has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/glb.js"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7ef66c2f0a4abf0b6c0df2cdfc897a72e92c3fa49a9203c190b4df734b45b2"}},{"ruleId":"D2","level":"warning","message":{"text":"anthropic.MessagesEndpoint (cognitive 41): anthropic.MessagesEndpoint has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29, boolean chains 7, loops 5 (nesting depth added 15). Most of this is not in the body itself: 0 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 33). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9ed3167e723694a5cc637d3a0040ba60a505b08252d0d097c6f78a506e7b544"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.scheduleNewModel (cognitive 41): SmartRouter.scheduleNewModel has cognitive complexity 41 (threshold 15). Drivers by points: if/else 41 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48c80959a8afe2496e9c2bc53a24764a06d70291d4aaf7883789127fdd547d8"}},{"ruleId":"D2","level":"warning","message":{"text":"peg.parseJSONNumber (cognitive 41): peg.parseJSONNumber has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23, boolean chains 12, loops 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9700516105762f357444f97f2d79e6f34859884a7c4b5e2659bf3b5040d7897"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudProxy.predictOpenAIStreamRich (cognitive 40): CloudProxy.predictOpenAIStreamRich has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, loops 7, boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_openai.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f201bbff56dd866a978d10ef20822158dd8a160abc888099b73928eec74ab7"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.TranscriptEndpoint (cognitive 40): openai.TranscriptEndpoint has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24, loops 13, boolean chains 2, match/switch 1 (nesting depth added 16). Most of this is not in the body itself: 0 of the 40 points are its own statements and the rest belongs to one function literal inside it that branches (line 60). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/transcription.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a7c91a563de6920167c55c5f5b2183ca32d4c001c685aa78617d46a0701a75"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.buildClassifier (cognitive 40): middleware.buildClassifier has cognitive complexity 40 (threshold 15). Drivers by points: if/else 39, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/route_model.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"271a08ed51e6d591ae258a520be066a25a5a2b19bd958df6c26b6f6dbe6b0635"}},{"ruleId":"D2","level":"warning","message":{"text":"nodes.handleRangeUpload (cognitive 40): nodes.handleRangeUpload has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"5501474f3500f956c7817b007035cc78eeec6f03c571e2b704137caa85b04565"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicaReconciler.drainPendingBackendOps (cognitive 40): ReplicaReconciler.drainPendingBackendOps has cognitive complexity 40 (threshold 15). Drivers by points: if/else 37, match/switch 2, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6db03bc8aab579628ff4061cb2be2eaef1ac6c8a87677f143bc0c555195456"}},{"ruleId":"D2","level":"warning","message":{"text":"piiadapter.Anthropic (cognitive 40): piiadapter.Anthropic has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28, boolean chains 5, loops 5, match/switch 2 (nesting depth added 21). Most of this is not in the body itself: 0 of the 40 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 23, 56). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/anthropic.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d15efbf2350ebe658c47d23e1b08630ed0c7ca9233c08af2fb65daea472b67"}},{"ruleId":"D2","level":"warning","message":{"text":"Spec.Normalize (cognitive 40): Spec.Normalize has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 3, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/types.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"20e77a254b8e2b9116786c5dcb2be522cb1f18c60494206f748dd5f9dae539d3"}},{"ruleId":"D2","level":"warning","message":{"text":"backendSupervisor.installBackend (cognitive 39): backendSupervisor.installBackend has cognitive complexity 39 (threshold 15). Drivers by points: if/else 33, match/switch 3, loops 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/install.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"df2ec72213bf379b1708cdcf59c4f8f8f99e657a95a7682892688294761d540f"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMsgParser.tryConsumeJSONPrimitive (cognitive 39): ChatMsgParser.tryConsumeJSONPrimitive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35, boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0db819fc582329685bdee8a6d70c0f6b042550f67d95b17da96fca83e07a49"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.deleteProcess (cognitive 39): ModelLoader.deleteProcess has cognitive complexity 39 (threshold 15). Drivers by points: if/else 33, loops 3, match/switch 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/process.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fcd1feb11433429ae49fb9045422be9cd82f20bcdd8bf157e2730189eeb6563"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 38): main.main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 27, loops 10, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/gen_inference_defaults/main.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade5fdcd14e06efba18deafd542bcde6073ced28cd405231203d3d5260a0ec60"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.DeleteBackendFromSystem (cognitive 38): gallery.DeleteBackendFromSystem has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, boolean chains 4, loops 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"246cb991240345eca106308fe9d9da5675d12e568e227b9b25764266b15f51a5"}},{"ruleId":"D2","level":"warning","message":{"text":"NodeRegistry.Register (cognitive 38): NodeRegistry.Register has cognitive complexity 38 (threshold 15). Drivers by points: if/else 34, loops 3, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"0970a9c2bbeadca4a6e471d8b15028f136c93c324351de79a67fd1ef3ec8ed5c"}},{"ruleId":"D2","level":"warning","message":{"text":"pii.RequestMiddleware (cognitive 38): pii.RequestMiddleware has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28, loops 6, boolean chains 4 (nesting depth added 11). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to one function literal inside it that branches (line 135). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/middleware.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd60cbde4b26222dbbf74360807271fe701665ca1aed67e4e9630ac639d289e"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.MergeOpenResponsesConfig (cognitive 37): middleware.MergeOpenResponsesConfig has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34, match/switch 2, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af0aeec8f35cc5ae41f68be0e2abaf4d801fc6885fda90040de2c68f82ac817"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.materializeLocked (cognitive 37): Manager.materializeLocked has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34, loops 2, boolean chains 1 (nesting depth added 8). Of this number, 30 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"7102026eee424857c38139c064e93ae8ca93e60ed712adfd1ac23643fd1dd7b1"}},{"ruleId":"D2","level":"warning","message":{"text":"promptVideo (cognitive 37): promptVideo has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/video.js"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e2383f544ec86359a48245c3a7bb8a01a6823289749f5abd27ede446fbf79a"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleStreamResume (cognitive 36): openresponses.handleStreamResume has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23, loops 7, boolean chains 3, match/switch 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":3049}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4a1ee0d8a0a8cac1045e540fb3f40160d1bb5ba8832fdb1537f913a81f2fdcd"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.forwardEvents (cognitive 36): openresponses.forwardEvents has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, loops 7, match/switch 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/websocket.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd80a913473d781a9a8fede05405ed79f97f40785767a0972e3d89f502941ae"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.ParseFunctionCallPEG (cognitive 36): functions.ParseFunctionCallPEG has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f14680b1da6adabc839d14d3e1a147170818c4b90a37423589031055981ca39"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.AudioTransformStreamEndpoint (cognitive 35): localai.AudioTransformStreamEndpoint has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, match/switch 5, jumps 2, loops 2, boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 0 of the 35 points are its own statements and the rest belongs to one function literal inside it that branches (line 246). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6ca32461544ebe7ee4babf946884d6b75989da0395e1232cc3aab8d5a6790d"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.InjectMCPContext (cognitive 35): mcp.InjectMCPContext has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24, loops 11 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba3ecab2cb4644b834b747429b161bfc761f64e03654b394b1f858692a65075"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudProxy.Forward (cognitive 34): CloudProxy.Forward has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 6, boolean chains 1 (nesting depth added 10). Of this number, 26 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/proxy.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"776f011d4a39f28dbdec0f12700332050cfee845fa0614ee2ec8004d259030ac"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ListJobsEndpoint (cognitive 34): localai.ListJobsEndpoint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 4 (nesting depth added 22). Most of this is not in the body itself: 0 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 254). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb4f42ef1e7c833b1da7e9cd08ff67fd41e529b6c70caaae41594eb60fd2a59"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentPoolService.Chat (cognitive 34): AgentPoolService.Chat has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 5 (nesting depth added 19). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_pool.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"a91f21b4647f9aa4286cccc91acae5fa3cbc3c08d66b474e7d6fb13cbf861414"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.getNVIDIAGPUMemory (cognitive 34): xsysinfo.getNVIDIAGPUMemory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd5315b2e40c2991cbb0c6456c037d1d2eb7fe4b5b6654f132aca8af1485af9"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.InstallModelFromGallery (cognitive 33): gallery.InstallModelFromGallery has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 3 (nesting depth added 8). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 382). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"b496486b3cb3ad563a258d5d1e022ab2ef5d257d549e4b78333d31b1d249cac6"}},{"ruleId":"D2","level":"warning","message":{"text":"importers.DiscoverModelConfig (cognitive 33): importers.DiscoverModelConfig has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/importers.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6231e6db990ac10e9f595aac8e1fc795600b8039fc69b874b81a6117c0c7db"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.filterSwaggerByTags (cognitive 33): localai.filterSwaggerByTags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21, loops 11, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/api_instructions.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f220677d903c92ab5370e7c918192cfc8b5e721247d481d979502096bd19e7"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleWSResponseCreate (cognitive 33): openresponses.handleWSResponseCreate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 2 (nesting depth added 8). Of this number, 31 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/websocket.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"af11251ffc043ce0b12ec2c111109cc396b69d964a4de5877a25556358ba4c0f"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispASR.AudioTranscription (cognitive 32): CrispASR.AudioTranscription has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 7, boolean chains 3, match/switch 1 (nesting depth added 12). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"3249428b6975f44350d61108bd489ee87beee22c6641c8fdb44576c56aba82ba"}},{"ruleId":"D2","level":"warning","message":{"text":"ParakeetCpp.AudioTranscriptionLive (cognitive 32): ParakeetCpp.AudioTranscriptionLive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, boolean chains 2, match/switch 2, loops 1 (nesting depth added 13). Of this number, 29 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/parakeet-cpp/live.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"54289e736dee39659bac160ca5cdc7d6690ae1ea14dc8775aae7c1f4f43fe8e7"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.RegisterNodeEndpoint (cognitive 32): localai.RegisterNodeEndpoint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, boolean chains 3, loops 1 (nesting depth added 8). Most of this is not in the body itself: 0 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"093d94faa8098d3ed4d67362690e48b1addd2e637636313421a6c91c097a1bd5"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.vadTick (cognitive 32): openai.vadTick has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"0334f68b96b28d242f2ed3740e2d978448bbd19e00dd88b8697bd891c29655c8"}},{"ruleId":"D2","level":"warning","message":{"text":"peg.parseJSONObject (cognitive 32): peg.parseJSONObject has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa907d2345cbccb52e1647a173cce1704233df6eb8d6fb69ff1044c89dc3ad1"}},{"ruleId":"D2","level":"warning","message":{"text":"toggleLoader (cognitive 32): toggleLoader has cognitive complexity 32 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"9658287c6f34e289281734fbf14fbe509b8f596eefc0bac850efc64a50f418bc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findDimensions (cognitive 31): main.findDimensions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, loops 4, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/valkey-store/store.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"888e0ab46c1638aefa9c04d912d4bec59b259c2eea7dba490b91671eb930a8a4"}},{"ruleId":"D2","level":"warning","message":{"text":"piiDispatcher.serve (cognitive 31): piiDispatcher.serve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 5, boolean chains 2, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/cloudproxy/mitm/handler.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cac079c8dfdd31f2a4834753bbf13ce054d0b843ac9906c7016bb428c71eae7"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigService.EditYAML (cognitive 31): ConfigService.EditYAML has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/modeladmin/config.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f7f29b2cf150bb9c1558ff45c4ea22ad34a3d1ea27b9f1838a2f8fc60da2072"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.scheduleAndLoad (cognitive 31): SmartRouter.scheduleAndLoad has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, boolean chains 1 (nesting depth added 13). Of this number, 29 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec63e6fdca6b2e086c630a3a5c1097b03fc7c48a574a4484bb8b9039b2c95041"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.trimPotentialPartialWord (cognitive 31): functions.trimPotentialPartialWord has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e6ae6ae445b6a76ebfb5e0ae6324078b3b04e26d8f0faf9915d14a44e960ae"}},{"ruleId":"D2","level":"warning","message":{"text":"peg.NormalizeQuotesToJSON (cognitive 31): peg.NormalizeQuotesToJSON has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"2193a9728b6af69a7e002e73996f921e6cfeebc36e309f04673018e1ca31b936"}},{"ruleId":"D2","level":"warning","message":{"text":"promptDallE (cognitive 31): promptDallE has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/image.js"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08a53fe2eb51186918860f970960c6d5398519facda1b37dc323cb8594379f4"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentWorkerCMD.Run (cognitive 30): AgentWorkerCMD.Run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, boolean chains 6, match/switch 2 (nesting depth added 3). Of this number, 26 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/agent_worker.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4eb71b46489bd81ebba25ab4f159c9c61d19373a249388c661d4913592d60b"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.WarmEstimateCache (cognitive 30): gallery.WarmEstimateCache has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 2, match/switch 2, jumps 1 (nesting depth added 12). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 104). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/estimate_warm.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8ce067eeac0f9ef447426a5794a9d6f9f18727a091faf5d386cc01e5f49941"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.NamedSessionsFromMCPConfig (cognitive 30): mcp.NamedSessionsFromMCPConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 11 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0589eeff46ec821bdfd94aab29e29044479678a5b8025bac2a988ce4951c42b6"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryService.UpdateStatus (cognitive 30): GalleryService.UpdateStatus has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"51bf9c65c02675c98c1dd755e9cb79d0923f51dd3ba9ffac809a24d128ab3d3e"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedBackendManager.enqueueAndDrainBackendOp (cognitive 30): DistributedBackendManager.enqueueAndDrainBackendOp has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 3, loops 1 (nesting depth added 13). Of this number, 28 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"14b9b80dc6103945d402f6d6b62821730d2f6282c025bd7baaa0ebad361185d4"}},{"ruleId":"D2","level":"warning","message":{"text":"memoryDecisionStore.List (cognitive 30): memoryDecisionStore.List has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 6, boolean chains 3 (nesting depth added 11). Of this number, 18 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/router/decisions.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb88c6e7ee24c162c18160278b1f0b4ec761d0dd2dcc81a6ce14dc278b51b08e"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.ParseJSONIterative (cognitive 30): functions.ParseJSONIterative has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 5, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac6ab8e5833712dd0c2527a00081fe08dd25277325aaa4fca302f08d0b11198b"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.Load (cognitive 30): ModelLoader.Load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 4, loops 2 (nesting depth added 10). Of this number, 27 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/initializers.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06872ee297e5c5e0386055396ccca696426196b99c336168d9dd606b1123a70"}},{"ruleId":"D2","level":"warning","message":{"text":"UpgradeChecker.runCheck (cognitive 29): UpgradeChecker.runCheck has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/upgrade_checker.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"905eca62073830ba253cb11b6e1e63c390d56bbd86ebd31ca51b19a8c5453762"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.SoundGeneration (cognitive 29): backend.SoundGeneration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/soundgeneration.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"49427146197eb95e370c3d0a0c4d416bb28e900a5c191be3bb75109650b1f77f"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.generateZshCompletion (cognitive 29): cli.generateZshCompletion has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, loops 11, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd697c128f26cd43e14b29bd14714ea9848400361a9f6432158142c0dcfd5f3e"}},{"ruleId":"D2","level":"warning","message":{"text":"meta.walkStruct (cognitive 29): meta.walkStruct has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/meta/reflect.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6491c9b53cafa4fa33a738f244da9b88148139e1aba37ce7291c1f71c62a6b5"}},{"ruleId":"D2","level":"warning","message":{"text":"VibeVoiceCppImporter.Import (cognitive 29): VibeVoiceCppImporter.Import has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, boolean chains 3, match/switch 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/vibevoice-cpp.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e59c9691eed0b0441918fee56289cec64d408875c65fc829573f770520fc28a"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ListTasksEndpoint (cognitive 29): localai.ListTasksEndpoint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, loops 4 (nesting depth added 21). Most of this is not in the body itself: 0 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0956507d44b7d336bc1e5034f48b99d105c582e4d7ad947d44f6fd3e0294977"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.VideoEndpoint (cognitive 29): localai.VideoEndpoint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, boolean chains 2, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 0 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 155). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/video.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"806e423e1987551f705b5208e69704b0049e643236de34c03a4c8e9f1ed26538"}},{"ruleId":"D2","level":"warning","message":{"text":"memoryEventStore.List (cognitive 29): memoryEventStore.List has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, loops 6, boolean chains 5 (nesting depth added 9). Of this number, 18 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/store.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0c66338a085be1c74512f48404df7fa8f9316c68d1dd742c5dbe7a5aa7730a"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMsgParser.TryConsumeJSON (cognitive 29): ChatMsgParser.TryConsumeJSON has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9c820715559f744b279027588e7e8310a740986a4b3a033e862de5064e0f25"}},{"ruleId":"D2","level":"warning","message":{"text":"CharsParser.parse (cognitive 29): CharsParser.parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, loops 3, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"023d6f55b44dd4cd624117a3bcb4e44a399bae5724acdae30191c4ce12d67cd9"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.spawnGRPCModel (cognitive 29): ModelLoader.spawnGRPCModel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, boolean chains 2, loops 2 (nesting depth added 10). Of this number, 28 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/initializers.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b5a87a5e179e2ee0c0332ab1e998d1ff2d6a7964bc6498b02c34817b217775"}},{"ruleId":"D2","level":"warning","message":{"text":"vram.computeVRAM (cognitive 29): vram.computeVRAM has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vram/estimate.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e924f4f118891d0456dde340ccffbd79f61b563b6f7b4bfedfb5041699929e2"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispASR.Load (cognitive 28): CrispASR.Load has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, boolean chains 7, match/switch 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4a87630d15bcf68c461f5fa06405ba101519b223e4f92e3ebe64cd06cf4284"}},{"ruleId":"D2","level":"warning","message":{"text":"main.LoadVoiceStyle (cognitive 28): main.LoadVoiceStyle has cognitive complexity 28 (threshold 15). Drivers by points: loops 19, if/else 9 (nesting depth added 14). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21cc88f156dfc6db254c236bc5a6c9958094c54a9c5a05c89c378533ff40dc8"}},{"ruleId":"D2","level":"warning","message":{"text":"main.chatRequestJSON (cognitive 28): main.chatRequestJSON has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/vllm-cpp/chat.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"0479a8c02693bb9d30a0b7a2178602dd020d7f3d446a01affd12b607db397b11"}},{"ruleId":"D2","level":"warning","message":{"text":"ReleaseManager.downloadFileWithRetry (cognitive 28): ReleaseManager.downloadFileWithRetry has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 2, match/switch 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/release_manager.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab94bf615db215ac30df7168dced37886bc8ec48b32ced0c4c92e4a13e5aa9bf"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.VariantParents (cognitive 28): gallery.VariantParents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, loops 4, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/collapse_variants.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08c7f50116121639d5240f285104d6b4536139420daca0d91ed0e4bfc5310c6"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.UpgradeBackend (cognitive 28): gallery.UpgradeBackend has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/upgrade.go"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd1796a35975cac96a2bac0acfc71e5ccdbabddef44380253c984ef5190f58a"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.AgentResponsesInterceptor (cognitive 28): localai.AgentResponsesInterceptor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 3, match/switch 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 35). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_responses.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"3318091c54a6425fb4933e4e4766595bdd60b88d88803e1d02a49117fb657880"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.CORSProxyEndpoint (cognitive 28): localai.CORSProxyEndpoint has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 28). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/cors_proxy.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"63da94855a30af127d1b213f03a888f07c5a6161055bdf86686ffcaad8aba038"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.Model3DEndpoint (cognitive 28): localai.Model3DEndpoint has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"e463e62428bcdde434eb6a010f3e728ce8d456e8cb430307aa8822703aeac8b5"}},{"ruleId":"D2","level":"warning","message":{"text":"types.validateSlots (cognitive 28): types.validateSlots has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, match/switch 2, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/classifier.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30e1224f642c7d4d3e90902c544b297333f9fc4b51c4ef480cbf3333cbb73f1"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.Route (cognitive 28): SmartRouter.Route has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 2 (nesting depth added 9). Of this number, 16 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c7e181edf6cc963f235f830b212ccae809d4d41e57bc365ed0b659ee4a7de8"}},{"ruleId":"D2","level":"warning","message":{"text":"Rules.ToGrammar (cognitive 28): Rules.ToGrammar has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/rules.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ec7f7b70180c67394bf4c58537b8c099d3adc0d8e8a0fd2b335daba1a35a89"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveModels (cognitive 27): main.resolveModels has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 3, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/trellis2.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f24698b8db16f1e0a25820bcad5d70ea82073a78a360b06005c0c83cb9b495"}},{"ruleId":"D2","level":"warning","message":{"text":"Application.StartP2P (cognitive 27): Application.StartP2P has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, loops 2 (nesting depth added 8). Of this number, 17 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/p2p.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f63058036ecd798f623e9c070f13f78f8c0a0e93351b53480baa0a8e2a3ce475"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.handleMCPCIJob (cognitive 27): cli.handleMCPCIJob has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 3, match/switch 1 (nesting depth added 5). Of this number, 23 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/agent_worker.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"970f685a18d59e9d639ac5e5e06f4c85598eb462697e4edbcc8a87d51a670a31"}},{"ruleId":"D2","level":"warning","message":{"text":"FineTuneService.ExportModel (cognitive 27): FineTuneService.ExportModel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, boolean chains 2, loops 2 (nesting depth added 2). Most of this is not in the body itself: 13 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 593). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"32cfab42620e17435220dc0a0342d53fc3bc99d6b18f88b378ae54471f485126"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedBackendManager.UpgradeBackend (cognitive 27): DistributedBackendManager.UpgradeBackend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 3, loops 2 (nesting depth added 7). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 564). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6d018e867d39321c90144b84cef995e39451f0fc562061eeeaa32e93106ee57"}},{"ruleId":"D2","level":"warning","message":{"text":"Config.subscribeFileStaging (cognitive 27): Config.subscribeFileStaging has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 142, 85, 117, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/file_staging.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3d8932e84669fa0a82af31bca48688db83a3c55a567cf88273307ff0124be8"}},{"ruleId":"D2","level":"warning","message":{"text":"trace.InitBackendTracingIfEnabled (cognitive 27): trace.InitBackendTracingIfEnabled has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 3, boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 135). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/trace/backend_trace.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"a564f78e0a4870f8c938fb27dee0adbe0c039fe3af3f4b927f8638ed4feeea37"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatBuilder.StandardConstructedTools (cognitive 27): ChatBuilder.StandardConstructedTools has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 6, boolean chains 3 (nesting depth added 10). Of this number, 26 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4fefc7ec05ae2ab6c02cd1f52fc069986e82bb521e3e363c8eaf5a655d8f036"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemState.getSystemCapabilities (cognitive 27): SystemState.getSystemCapabilities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/system/capabilities.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac769d9bc4dbecfa9674dfe4692fc762f200f1551f2f87a40a3ff0a6f6c02aa"}},{"ruleId":"D2","level":"warning","message":{"text":"run (cognitive 27): run has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useSpectrogram.js"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e18205472d8db18b10884b2a344e7f8bb263088570e3d634d28c5f519a8588b"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.Middleware (cognitive 26): auth.Middleware has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, boolean chains 5, loops 3 (nesting depth added 10). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 40). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/middleware.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3f2faabc877ce0bec273b7b19dbc015d8eac2955e9c78b02be991e0fe4e0ed"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.QuotaExceeded (cognitive 26): auth.QuotaExceeded has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 4, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/quota.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6b5ee2abe17dffaa219d7bada04e196a1a314818f7251da3c9b1c8c545ee38"}},{"ruleId":"D2","level":"warning","message":{"text":"BackendEndpointService.ListKnownBackendsEndpoint (cognitive 26): BackendEndpointService.ListKnownBackendsEndpoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 9 (nesting depth added 13). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 440). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/backend.go"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f545b50231d1ef793c7e4731f6dbd1dc0cc8eb4a7017a738c7a71ddd9c3b3ce"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.listVisibleModelNames (cognitive 26): openai.listVisibleModelNames has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, loops 8, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/list.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"50157b91254c2d00160e02901eb7bfbca9e715fa1332e2483a95b18c257caa0d"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.newModel (cognitive 26): openai.newModel has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"da96a02a1cb3dcab89d7f077c833e0f0867f0f067b89792a1f14fd105aeeb6fa"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertORToolsToFunctions (cognitive 26): openresponses.convertORToolsToFunctions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, match/switch 5, boolean chains 3, loops 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e8e178f9e7eda1d68ad0e92875cf523b87dddafe1ee03f7bad40e4ab2a9902"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.StripPathPrefix (cognitive 26): middleware.StripPathPrefix has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 1, loops 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 13). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/strippathprefix.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d4c4a2fed8fcada67e6724c2d1408eeb64c20b67ee7e16c12e282669b5b4972"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryService.backendHandler (cognitive 26): GalleryService.backendHandler has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, match/switch 5, boolean chains 3 (nesting depth added 7). Of this number, 23 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/backends.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"375fbf3a73f6185e5f835b0580e1c77b4069248ffd9715bdf5d9be33013e85e7"}},{"ruleId":"D2","level":"warning","message":{"text":"startup.InstallModelsWithOptions (cognitive 26): startup.InstallModelsWithOptions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/startup/model_preload.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"d989e12ee607e10d4258922170c26fc7268e15c634947707e022e0e73795a79b"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.SearchModels (cognitive 26): Client.SearchModels has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/huggingface-api/client.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f96d6802c9578871aecd6021bb3861cb0c53f261fbc984b9bff12763197598"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.Ensure (cognitive 26): Manager.Ensure has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 3 (nesting depth added 4). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bcae6b64a2d0fe945b06f922b8f7f289657098fa7d1c004b6f2de3640cbd72e"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.estimateModelSizeBytes (cognitive 25): backend.estimateModelSizeBytes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 5, boolean chains 3 (nesting depth added 7). Of this number, 20 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/options.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"015096f2c4ed6adfe81a9634b14080c1d9418d6ac9b827c3979484791cbcfaf7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.generateBashCompletion (cognitive 25): cli.generateBashCompletion has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, loops 8, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec48abc72dbd16e5d0ddd44b98db7fd4c3bf0bcfed09aa852093c7a7fe7691b"}},{"ruleId":"D2","level":"warning","message":{"text":"P2P.Run (cognitive 25): P2P.Run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 3 (nesting depth added 11). Of this number, 14 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/worker/worker_p2p.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"653d4c2fa98e802132cb6980aa6e3ba9d8d20274023c8bdfedc7db70f374dd03"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.AudioTransformEndpoint (cognitive 25): localai.AudioTransformEndpoint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, boolean chains 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 122). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce880f2d6b8f1e4ab50e882952ad4a175d12971883e2e8f81b63a380a1da697"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ImportModelEndpoint (cognitive 25): localai.ImportModelEndpoint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 129). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/import_model.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed24b1575540ca4aa8e9f084df78b7326ec38f7cc2f175a79c3ea5d24cf80c91"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.renderItemsTranscript (cognitive 25): openai.renderItemsTranscript has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, loops 7, match/switch 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_compaction.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9bc3d718b17cd9524cc05fa2a3beffd914dd0646631b620d497cef5fdee9162"}},{"ruleId":"D2","level":"warning","message":{"text":"wrappedModel.classifierFor (cognitive 25): wrappedModel.classifierFor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 5, loops 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa4a45e347edba4b0cd29e2bd63727c63e10912e4d06d0ab5312de484388a5ed"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.mergeContiguousAssistantMessages (cognitive 25): openresponses.mergeContiguousAssistantMessages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"5708956e7e2d607862abe659eb79e2efb3108ff317a8157ffce4ca8e3225b197"}},{"ruleId":"D2","level":"warning","message":{"text":"FederatedServer.proxy (cognitive 25): FederatedServer.proxy has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, match/switch 2, loops 1 (nesting depth added 14). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/p2p/federated_server.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae9ea1393c699dac35112cc9a2fa8b919cc8dfdcb2ceecd2d16a3dff26359de"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplicaReconciler.reconcileNodeProcesses (cognitive 25): ReplicaReconciler.reconcileNodeProcesses has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c05c64c3fdfaef741621962e467f2e44ed0fbb208e271d513abb05df15b074"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.ToolCallsFromChatDeltas (cognitive 25): functions.ToolCallsFromChatDeltas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/chat_deltas.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce74760fec2de2a700ac420773abb681540811124ff814af5eec3db813f13e1"}},{"ruleId":"D2","level":"warning","message":{"text":"add (cognitive 25): add has cognitive complexity 25 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2458}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db16284eab517dd2786478f3955bda67c03b98d15a9a83d132383a25c5af5c1"}},{"ruleId":"D2","level":"warning","message":{"text":"batcher.run (cognitive 24): batcher.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, match/switch 6, loops 3, jumps 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/parakeet-cpp/batcher.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b7a54735edab4c90dd33feefbd409753dfcbced0fa3f64be8363b71021510c"}},{"ruleId":"D2","level":"warning","message":{"text":"Trellis2.Generate3D (cognitive 24): Trellis2.Generate3D has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/trellis2cpp/trellis2.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"58f320e7739515229dad4cfde9942b29a5526736ac37f3ebeffc3541776f949f"}},{"ruleId":"D2","level":"warning","message":{"text":"configFileHandler.Watch (cognitive 24): configFileHandler.Watch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 6, match/switch 2 (nesting depth added 13). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 98, 86). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/config_file_watcher.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"51aef005bdc4565cd27735e1302603f7669baddd0fd0f88618a04a87706f3de4"}},{"ruleId":"D2","level":"warning","message":{"text":"config.ApplyInferenceDefaults (cognitive 24): config.ApplyInferenceDefaults has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/inference_defaults.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f78231ced7a91c0887ec0c9a070166012cc3500a1e7efbd2a3dc18270c8acb"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfig.PrimaryArtifactSpec (cognitive 24): ModelConfig.PrimaryArtifactSpec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_artifact_inference.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"34cac38282ec7791dced828074342033900b8cf56b71bdd3a85c0886a49f0285"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.AvailableGalleryModels (cognitive 24): gallery.AvailableGalleryModels has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, loops 8, boolean chains 1 (nesting depth added 13). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/gallery.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae060d9bce3441661c6503c744ebe745947276f63b30d41cbd3d058805a89ae"}},{"ruleId":"D2","level":"warning","message":{"text":"StableDiffusionGGMLImporter.Match (cognitive 24): StableDiffusionGGMLImporter.Match has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/stablediffusion-ggml.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d1b9209b2eebf0c660893aaad3cec7e2c15b220f22748f561176e94b35307f"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ListSkillsEndpoint (cognitive 24): localai.ListSkillsEndpoint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_skills.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"dffc7bf19935be68944dc7a5ef497647e05c76372722a8baa22ba6c85d3c2af3"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.DiscoverMCPTools (cognitive 24): mcp.DiscoverMCPTools has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9cc6c3b61bfcaed0d6b48a5374a1f8627679d5887aed4a28c59e68d4a0bbd7b"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertORReasoningItemToMessage (cognitive 24): openresponses.convertORReasoningItemToMessage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"475146a0865162e47c0b4eb7d01f1d90e7c12217b1d738884a0c4270f63db4fc"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.initializeTracing (cognitive 24): middleware.initializeTracing has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 2, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 113). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/trace.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b6ec77ef066f78da16ae2f57c1a7d9094d1e20951294d2d159c62046417c95"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryService.modelHandler (cognitive 24): GalleryService.modelHandler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, match/switch 6, boolean chains 3 (nesting depth added 5). Of this number, 21 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/models.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"904f965fe29b5a94b85af3f5f22556003f584cf3119fd448c370bf335d5ba0a3"}},{"ruleId":"D2","level":"warning","message":{"text":"backendSupervisor.startBackend (cognitive 24): backendSupervisor.startBackend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/supervisor.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0a485f395bfb15eec714df50d75cfe6fe30c66acc39e51b643f4836e4902f6f"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.startProcess (cognitive 24): ModelLoader.startProcess has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 2, loops 2 (nesting depth added 5). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 298, 311, 330, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/process.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"2098f7d2f69edb7b34701e4d09bb88b68c7c238c9a49582c4f3e37564b4b893f"}},{"ruleId":"D2","level":"warning","message":{"text":"oci.downloadLayerToFile (cognitive 24): oci.downloadLayerToFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, match/switch 3, boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/image.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"5adf862a00e4a27d40cf398cb40af76d4b5669d71fb647d542026733b8621a91"}},{"ruleId":"D2","level":"warning","message":{"text":"updateUIForActiveChat (cognitive 24): updateUIForActiveChat has cognitive complexity 24 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddd4f36385855d2161dd5c8f5a4864a1148733f31cb1bf9bd93bd3efda4de8f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildAnthropicRequest (cognitive 23): main.buildAnthropicRequest has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 3, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c89a0f58526bcee9f5eef1d428481ac6ae0dc2f361802d293a166f8b6d1bdb"}},{"ruleId":"D2","level":"warning","message":{"text":"RFDetrCpp.Detect (cognitive 23): RFDetrCpp.Detect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/rfdetr-cpp/gorfdetrcpp.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbfa15ce369344cbe13247f96cb10b80191113097ee66febf09b9806ee861835"}},{"ruleId":"D2","level":"warning","message":{"text":"application.startMITMLocked (cognitive 23): application.startMITMLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 6, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/mitm.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc0fb3e62d81e2d2a381c457b7253aad6eac54c0eae67f6f0621d88a0f91d23"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ExecuteTaskByNameEndpoint (cognitive 23): localai.ExecuteTaskByNameEndpoint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 5 (nesting depth added 11). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 371). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"879f3fe759735e5cbd86a9d1b7505a7af0908d4e534b326b25857779bb423801"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.collectParamsFromForm (cognitive 23): localai.collectParamsFromForm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"04aa00bdff62336ca5bb9fc2aa4649e1eea833381155d2c6edb12646c054bc10"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ImportModelURIEndpoint (cognitive 23): localai.ImportModelURIEndpoint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, loops 2 (nesting depth added 10). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 31). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/import_model.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db1ff6f09d4bb3e5575d373555810dc796d6a61667ab8bb2cab3091e4ece3bf"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertOROutputItemsToMessages (cognitive 23): openresponses.convertOROutputItemsToMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, loops 5, match/switch 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"36951042da8a2ef424ecb97fbb892be35cde038d20163242336a839811283b2a"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentJobService.ExecuteJob (cognitive 23): AgentJobService.ExecuteJob has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, match/switch 4, loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b4da2277f5057ec2b79b1f1fee900f445e96dc4a79389c76675839ff2da5b63"}},{"ruleId":"D2","level":"warning","message":{"text":"HTTPFileStager.EnsureRemote (cognitive 23): HTTPFileStager.EnsureRemote has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, match/switch 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_stager_http.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12075ac476629d33d4b78fdb6325eb289ea4a6ea0663723452c762bb404074c"}},{"ruleId":"D2","level":"warning","message":{"text":"QuantizationService.ImportModel (cognitive 23): QuantizationService.ImportModel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, boolean chains 1 (nesting depth added 2). Of this number, 15 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/quantization/service.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"596a181aea07d9ea39cd55ac8c168f063c469cb566144a88815a8b6d676a1a50"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.ResolveSnapshot (cognitive 23): Client.ResolveSnapshot has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/huggingface-api/snapshot.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"416b9fb5181068d2513363a43929710a19724ca1938b9cafec8e5ed71e87e93d"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelsInstall.Run (cognitive 22): ModelsInstall.Run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1 (nesting depth added 9). Of this number, 20 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/models.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5392f4bf84db2cc280bce6ed9e331bd62a00c34d88a65115075ef69806eeab0"}},{"ruleId":"D2","level":"warning","message":{"text":"config.ApplyGenericDefaults (cognitive 22): config.ApplyGenericDefaults has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/generic_defaults.go"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04a631d58410885ea2b2df7ecfac171b407668709abd86b4a2d57c06ddc251f"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfigLoader.LoadModelConfigsFromPath (cognitive 22): ModelConfigLoader.LoadModelConfigsFromPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config_loader.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d655ff33b0e5cab95beaffe95cb103bb22b1798818d0f5b8c46d2dc6cd364e1"}},{"ruleId":"D2","level":"warning","message":{"text":"WebRTCTransport.sendLoop (cognitive 22): WebRTCTransport.sendLoop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, match/switch 7, loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_transport_webrtc.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"0167c7aad4e6c512b60c9f2238dfdc7a2d5b0978c3d0eac730e0c97b3a6b4886"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryService.SubscribeBroadcasts (cognitive 22): GalleryService.SubscribeBroadcasts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a2a6da7e9fa323f557a582aa3876df19e436e710b05ae331f1ecdd263df285"}},{"ruleId":"D2","level":"warning","message":{"text":"pii.RedactNERSegments (cognitive 22): pii.RedactNERSegments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, loops 8, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/redactor.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49b627f0c3489e8450ddcceab5dfb938799e26596b84989093689fe8d5d1cfe"}},{"ruleId":"D2","level":"warning","message":{"text":"piipattern.anchorLen (cognitive 22): piipattern.anchorLen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 6, boolean chains 3, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piipattern/grammar.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59335500365f2e3cff538dcff3e4c9bf1470b8e9e806961131e3e76e3060b93"}},{"ruleId":"D2","level":"warning","message":{"text":"functions.parseJSONLikeXMLFormat (cognitive 22): functions.parseJSONLikeXMLFormat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"24f363656a14c8925573000d602809a8d2a4ad39c22a1da8bf0b09ca408cb036"}},{"ruleId":"D2","level":"warning","message":{"text":"vram.sumWeightFileBytes (cognitive 22): vram.sumWeightFileBytes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vram/hf_estimate.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cc5c0144020cac62f59fc9a9bcf6f032dde3632392b206e1f6bfe27e527336"}},{"ruleId":"D2","level":"warning","message":{"text":"sanitiseServer (cognitive 22): sanitiseServer has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/mcpClientStorage.js"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"647adb3088c939667eda618bcc27fcb7af063bdce773e17bede941319af6a9c4"}},{"ruleId":"D2","level":"warning","message":{"text":"DepthAnythingCpp.Depth (cognitive 21): DepthAnythingCpp.Depth has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/depth-anything-cpp/godepthanythingcpp.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"81335b13d0d47a68a28d4b756cfdf29592744d90a02a0a8ade419cdb67f9c010"}},{"ruleId":"D2","level":"warning","message":{"text":"chat.prepare (cognitive 21): chat.prepare has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 7). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/chat/run.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca0f055c57a0b3f841eca6301c1b98fb12e0848472ca2cf30c276a1b36e351c4"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptCMD.Run (cognitive 21): TranscriptCMD.Run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, loops 9, match/switch 1 (nesting depth added 7). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/transcript.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea40930c448375426732862fc8fe0e01b5f3c4a3f1fb93aa63e3c41a29c31028"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscoveryServer.runBackground (cognitive 21): DiscoveryServer.runBackground has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/explorer/discovery.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9009b927da82958243783f1613de40f514d7eb38328fa1172f8ad0addd9bb75"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.listModelFiles (cognitive 21): gallery.listModelFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"8076f28818d106538674e872d8c5ddf39a42d31938f9d55c905149bab16200b9"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.SelectVariant (cognitive 21): gallery.SelectVariant has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 3, boolean chains 2 (nesting depth added 8). Of this number, 18 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/resolve_variant.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8d6bcfeccf625b91c9863a1beef4e19063eb9bd921464a3867649e3112676b"}},{"ruleId":"D2","level":"warning","message":{"text":"liveTurnState.drainEvents (cognitive 21): liveTurnState.drainEvents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 2, match/switch 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_semantic_vad.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"2508bc77c48b10b0c63151e361981cd1add0f45ffbba88cafc69c14e9f5cbac5"}},{"ruleId":"D2","level":"warning","message":{"text":"galleryop.InstallExternalBackend (cognitive 21): galleryop.InstallExternalBackend has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/backends.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"2687a7c771d4eba35abf4b727e2d267fc719b874249cc4b6d8fb1a805df68dc4"}},{"ruleId":"D2","level":"warning","message":{"text":"Config.registrationBody (cognitive 21): Config.registrationBody has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/registration.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff559ef60416f74cc03eb6044e1a3db14b12ee653f1eef7ac3700a0041b749e5"}},{"ruleId":"D2","level":"warning","message":{"text":"DepthAnythingCpp.Load (cognitive 20): DepthAnythingCpp.Load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 7). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/depth-anything-cpp/godepthanythingcpp.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67af077f117c3e7cee32b6ae84fff59f16ccff71ecb724075a277a908032eb6"}},{"ruleId":"D2","level":"warning","message":{"text":"LLM.Load (cognitive 20): LLM.Load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/llm/llama/llama.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa8e40d8859d7d7e3dd8f19f33a0b1bad1c2d8ea57f788b1c44a97e0e813e0b"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.ModelEmbedding (cognitive 20): backend.ModelEmbedding has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 3, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 57, 114, 89). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/embeddings.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb69bdd387f56f93ee8dbc36f1aff3ba27f9227f8c20b9c07bb8bf284bbb317b"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.grpcModelOpts (cognitive 20): backend.grpcModelOpts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/options.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2630695020c4d0e746c0765be1cc77cc3b63676f8088ecf0200e07848184d9"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.ModelTTS (cognitive 20): backend.ModelTTS has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/tts.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7889e9e774bd362449b8ded3600682537bcaca6efff1b36e6566dd54201ad7"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.generateFishCompletion (cognitive 20): cli.generateFishCompletion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, loops 7, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b0494ae627f69c55ee2ca46a4d658f2bb0f3183dd8e39ac33918f07470cc53"}},{"ruleId":"D2","level":"warning","message":{"text":"BackendsUpgrade.Run (cognitive 20): BackendsUpgrade.Run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 6). Of this number, 18 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/backends.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d38ca37c619abc9eee3d35aef317411e456e145ac2962046de619fa036c5aa3"}},{"ruleId":"D2","level":"warning","message":{"text":"config.guessGGUFFromFile (cognitive 20): config.guessGGUFFromFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/gguf.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f838dd9fba69ddb8d707ad774ce1f8cd00a3c65f3845b5a9e34d11ea7675a755"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.DeleteModelFromSystem (cognitive 20): gallery.DeleteModelFromSystem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/models.go"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a5e1cc6a13968ab6db4bf9e16680a3ee7a9df8e466e83985959fb3fa4178a37"}},{"ruleId":"D2","level":"warning","message":{"text":"VLLMOmniImporter.Match (cognitive 20): VLLMOmniImporter.Match has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/vllm-omni.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4150165bb467b95d52aa842bb159af0e00e8307f4e760268c41c95c45133124"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.SessionsFromMCPConfig (cognitive 20): mcp.SessionsFromMCPConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"f72bc084e361394eea0906e86e0964c94e09088cfef2d3a8ab41569e3c4c72ec"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.updateTransSession (cognitive 20): openai.updateTransSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f26fd2b2a7a1ba7867b78435fd8fea83db15e05dc6266bb7a5eb17590e4a7d"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.buildORResponse (cognitive 20): openresponses.buildORResponse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2788}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b021e51a8bec6955a8a5bbd93d9c3a206dc321db6f0ac6569ea3febb342529"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.tokensFromBody (cognitive 20): middleware.tokensFromBody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/usage.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4948fdb45ab5871aa0c82013125dbf71630bfacde852db6a1fe32c72ce4d1889"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestExtractor.SetModelAndConfig (cognitive 20): RequestExtractor.SetModelAndConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 124). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35aaa7b548fd290f3dfa44e51560f20cd80e9fdc7c8e9e233a567d2e3c0cb0c"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentScheduler.runDueAgents (cognitive 20): AgentScheduler.runDueAgents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/scheduler.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6e60e4985b0e430831145160f72cec3773c3ca8a051dcd9f82fc13e07afbbf"}},{"ruleId":"D2","level":"warning","message":{"text":"Dispatcher.processJob (cognitive 20): Dispatcher.processJob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, match/switch 3 (nesting depth added 3). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/jobs/dispatcher.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f56c5924f1899edbced3ca6ca016f2de806ea6949bcfb05d5f1bd5a0272bb2"}},{"ruleId":"D2","level":"warning","message":{"text":"FileStagingClient.GenerateVideo (cognitive 20): FileStagingClient.GenerateVideo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_staging_client.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ab2abf6488ff9a5b47afc05e2366b8f340fbda16bb3842c650de62c26506e1a"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.evictLRUAndFreeNode (cognitive 20): SmartRouter.evictLRUAndFreeNode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, match/switch 2, loops 1 (nesting depth added 11). Of this number, 18 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":1866}}}],"partialFingerprints":{"codehealthFindingId/v1":"932d85d10b0fab4662477aad2894bd52d2d6b71db976f1442925550fef48a667"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONStringParser.parse (cognitive 20): JSONStringParser.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"962edd77fb81699590ce11f1c5202e8aabadbe5427903a0215215658542ee3c7"}},{"ruleId":"D2","level":"warning","message":{"text":"PythonDictStringParser.parse (cognitive 20): PythonDictStringParser.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ffd8552824eb28480004b168bdf5fa197add33dd7911f75d4f1ac49da564cd9"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.SetScheduling (cognitive 20): Client.SetScheduling has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/inproc/client.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"491ed4478d684267a9dbc53d61b792900da3da53e8e26ac7dd2833562bab70de"}},{"ruleId":"D2","level":"warning","message":{"text":"WatchDog.evictLRUModel (cognitive 20): WatchDog.evictLRUModel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 2 (nesting depth added 4). Of this number, 18 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/watchdog.go"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cb243e3b8a28ae7231cf5a4ac95b3eb8bade8c6d32ae40d339df3ed7421888"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.acquireLock (cognitive 20): Manager.acquireLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d3f491af36c215a24252731189b7ecbb555bd55ba39f4e10ae13a8508c2957"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.MinPerGPUVRAM (cognitive 20): xsysinfo.MinPerGPUVRAM has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d0fe1bd7625842a0c80fe41626aec5a0b3bad0f669d418a4c75b86a00dec19b"}},{"ruleId":"D2","level":"warning","message":{"text":"token (cognitive 20): token has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/cmGoTemplate.js"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa50ea03d78c010b0f53fcec8fcbd20f48ff4d0689ebb70b544c61c8bb12dfca"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 20): (anonymous) has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useGalleryEnrichment.js"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2bd390ea654a0555893a7eb6a154016fab4034a6acc524f18b528028df4678"}},{"ruleId":"D2","level":"warning","message":{"text":"CrispASR.AudioTranscriptionStream (cognitive 19): CrispASR.AudioTranscriptionStream has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1, match/switch 1 (nesting depth added 3). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2095eec1499a5e25eb32d9a83a992ec225eb13bf3fd5bb43c01acaed28d2892"}},{"ruleId":"D2","level":"warning","message":{"text":"SherpaBackend.runOnlineASR (cognitive 19): SherpaBackend.runOnlineASR has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 3). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1246, 1226, 1236). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"50251d9525d03957633ed7a812f9c70f53936dfc728d4b81f1b7bd63ed859759"}},{"ruleId":"D2","level":"warning","message":{"text":"TextToSpeech._infer (cognitive 19): TextToSpeech._infer has cognitive complexity 19 (threshold 15). Drivers by points: loops 14, if/else 5 (nesting depth added 8). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"606f4a218a61f32e9fddda24c058f2873636c5c0ffc10a22c777f60cb9fff302"}},{"ruleId":"D2","level":"warning","message":{"text":"Launcher.StartLocalAI (cognitive 19): Launcher.StartLocalAI has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 5). Of this number, 11 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/launcher.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"25377a8dba4e36700a2e4f6b77e975a842cb873c42603e12051dccd7e7d8364b"}},{"ruleId":"D2","level":"warning","message":{"text":"importers.buildDescription (cognitive 19): importers.buildDescription has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/local.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e28481163dd40d03eb83f63a10a88320973b4838ddd242dc43597bc75f86f6"}},{"ruleId":"D2","level":"warning","message":{"text":"DepthAnythingImporter.Import (cognitive 19): DepthAnythingImporter.Import has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/depth-anything.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc6464202e1bf29793ec3efbe82c91b0125b4630fc832c106aceb7b93eee28d"}},{"ruleId":"D2","level":"warning","message":{"text":"MossTranscribeCppImporter.Import (cognitive 19): MossTranscribeCppImporter.Import has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/moss-transcribe-cpp.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"804d462f679f1d4b668023419c24e7ab048e70e045f456bddff77408b2d919bc"}},{"ruleId":"D2","level":"warning","message":{"text":"ParakeetCppImporter.Import (cognitive 19): ParakeetCppImporter.Import has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/parakeet-cpp.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"63e7a30e9a0d20f7c659d0252d984a4b0894db5dde6753cbb14dead92414d37c"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivacyFilterImporter.Import (cognitive 19): PrivacyFilterImporter.Import has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/privacy-filter.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee45c8a7cffb54e2a8514276a34f0ea23a710484b4dde531b979e604a1f886f"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperImporter.Import (cognitive 19): WhisperImporter.Import has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/whisper.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f57d952edc1101de71f80f912bf3f92bfed61ea23486252be6ee8761236fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.tryAuthenticate (cognitive 19): auth.tryAuthenticate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/middleware.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"0295370e042e2039db791e519e0e4abe2d313b5b8085aff059f707ce91d6fa05"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.ListCollectionsEndpoint (cognitive 19): localai.ListCollectionsEndpoint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 13). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_collections.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79a1152009c14292a8eb22a171fc4baca379c7a150b0c8b273df855145c64e5"}},{"ruleId":"D2","level":"warning","message":{"text":"mcp.ListMCPServers (cognitive 19): mcp.ListMCPServers has cognitive complexity 19 (threshold 15). Drivers by points: loops 10, if/else 9 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a811d7961b3ef7213b8a1a7eeec076c4c6049d063411ff34b231f35e8d11717"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.emitAssistantMessage (cognitive 19): openai.emitAssistantMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 7). Of this number, 15 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":2595}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b623da976cca593696f7a532b16a7b253e7d168cbe707688f494baa033f6d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ResponseStore.FindItem (cognitive 19): ResponseStore.FindItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/store.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ab5a113b64dd6c5d61c649fa10a42370827fa25c5adbb31f1816ef3bdcde4d"}},{"ruleId":"D2","level":"warning","message":{"text":"routes.buildRouterStatus (cognitive 19): routes.buildRouterStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/middleware.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fd64225f86027163e1852a9cfcf1e58e736e60e16ab3194f4b3ef916b47b1a"}},{"ruleId":"D2","level":"warning","message":{"text":"agents.KBAutoSearchPrompt (cognitive 19): agents.KBAutoSearchPrompt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/knowledge.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b1f9cb43f31e5e89e20168f1186e02cf00454857377fe04f02b5e2cf1c016a"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudproxy.ForwardViaBackend (cognitive 19): cloudproxy.ForwardViaBackend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 1). Of this number, 16 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/cloudproxy/backend_forward.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0810c475b77a73bd6bf838cd63c1c08007628dcab80fbf13d41981230685efc"}},{"ruleId":"D2","level":"warning","message":{"text":"Dispatcher.Start (cognitive 19): Dispatcher.Start has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 183, 138, 149, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/jobs/dispatcher.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"9947fc95ba79fa7f3a8bc7151e08763e97bb1664007cfe2b233ebacb04647513"}},{"ruleId":"D2","level":"warning","message":{"text":"HTTPFileStager.doUpload (cognitive 19): HTTPFileStager.doUpload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_stager_http.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"3efaf4c2757d78b5084c370870108d8fe0635a1095dd79100f5b5d815b5c3a68"}},{"ruleId":"D2","level":"warning","message":{"text":"prefixcache.Select (cognitive 19): prefixcache.Select has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/prefixcache/select.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0bdf9c67a9d480f85d64816a39f66de86e0f267339a34cccd16d8aa34d49e12"}},{"ruleId":"D2","level":"warning","message":{"text":"NodeRegistry.Heartbeat (cognitive 19): NodeRegistry.Heartbeat has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade8f054ae84f0356c6358e1446d958429658b383d14e8803057fc7da0e928e9"}},{"ruleId":"D2","level":"warning","message":{"text":"pii.mergeAndEmit (cognitive 19): pii.mergeAndEmit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 2, match/switch 2 (nesting depth added 10). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/redactor.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"571edfb8ba23193ca0ffef4d1fd98e6b766bf27fe32888fbe88712c7de826945"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatBuilder.buildJSONToolsFunctionIsKey (cognitive 19): ChatBuilder.buildJSONToolsFunctionIsKey has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c63f6412b109167fb6aab739d8c29164b631170ea420a104168a2b2f42deed"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.ListFilesInModelPath (cognitive 19): ModelLoader.ListFilesInModelPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 5, jumps 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/loader.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79aa48a72593b09289dded2216bc8af08fadd006385c93151dc8f72efec9335"}},{"ruleId":"D2","level":"warning","message":{"text":"oci.DownloadOCIImageTar (cognitive 19): oci.DownloadOCIImageTar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/image.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f2083031313d29180f07da40f4d615746b193f7e6f8fe4a1b06ba8436445ae"}},{"ruleId":"D2","level":"warning","message":{"text":"Verifier.VerifyImage (cognitive 19): Verifier.VerifyImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/cosignverify/verify.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b8cac9c4c5a55eafb15fb8f80601699bffbd103bd7940362ed000aee947fe5"}},{"ruleId":"D2","level":"warning","message":{"text":"removeFileFromInput (cognitive 19): removeFileFromInput has cognitive complexity 19 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"c523ced4af5c3d26f8b715b3aa1c38132fe6d398aee8cb5750ec3f9a7859af8e"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalVQE.parseOptions (cognitive 18): LocalVQE.parseOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, match/switch 2, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd4bc0582ab32b88e5e56e97a4134ee55e5064b04019bd0376dfda89a07cc76b"}},{"ruleId":"D2","level":"warning","message":{"text":"VibevoiceCpp.TTS (cognitive 18): VibevoiceCpp.TTS has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/vibevoice-cpp/govibevoicecpp.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0afdcce6f89607b703fe13871a579e9eeae5e2d4ddb787b596856b761029d86"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 18): main.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/local-ai/main.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf58f2874cfc1fe687e818aca32f782ec3aba3eab7630c7f2713d29c1c75310"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.ModelAudioTransform (cognitive 18): backend.ModelAudioTransform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/audio_transform.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94efbbf812fc1a133b6dfd5416d3bd6cae7830ad58e90b551548a5e8126bae7"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.InstallBackendFromGallery (cognitive 18): gallery.InstallBackendFromGallery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/backends.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"7535fc7cb28ffaaf917bc87ae9ccf6182a8a3c44d3b3962ee735d25bc91e27e4"}},{"ruleId":"D2","level":"warning","message":{"text":"ACEStepImporter.Match (cognitive 18): ACEStepImporter.Match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/ace-step.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac45ae8b00df6001c0165c633ee1acf08935c8fe466d2fc1c51f9fa3d117986d"}},{"ruleId":"D2","level":"warning","message":{"text":"RerankersImporter.Match (cognitive 18): RerankersImporter.Match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/rerankers.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ea19d2580692fda02f596cf8202fe2541aaeedcc2cccc24fcd22500d7fda35"}},{"ruleId":"D2","level":"warning","message":{"text":"RFDetrImporter.Import (cognitive 18): RFDetrImporter.Import has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/rfdetr.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17feb85901f8389bbda64a10c7263631406c1608f859b1ed94f408b26a97b2c"}},{"ruleId":"D2","level":"warning","message":{"text":"Trellis2CppImporter.Match (cognitive 18): Trellis2CppImporter.Match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/trellis2cpp.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a761fa9221f62b1f6d6fd0dde0c934838dba0955ac1c88a2423a31eba45153a"}},{"ruleId":"D2","level":"warning","message":{"text":"anthropic.convertAnthropicTools (cognitive 18): anthropic.convertAnthropicTools has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c723618b47fd2d57eb8863210f6b8f38acb40f47fdce75df7db66dfc1fef546"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.CreateVoiceProfileEndpoint (cognitive 18): localai.CreateVoiceProfileEndpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 7). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 114). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/voice_profiles.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"85c51b1ef20fe2e4276dcf8b21513db795ef1e8a18f1824dd6686e6b405db4eb"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.UpscaleEndpoint (cognitive 18): openai.UpscaleEndpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/upscale.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3caf3fa9354f8b9e8d7a01c5f4f723324f3553d3d8c3e0ce0b2602418228220"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.validateRouterPolicies (cognitive 18): middleware.validateRouterPolicies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/route_model.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5bfb200467a15e555926efd69bed3456da52acde485443d797e538bd7779282"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p.discoveryTunnels (cognitive 18): p2p.discoveryTunnels has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, match/switch 2 (nesting depth added 11). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 219). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/p2p/p2p.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05e0fa7da884cea423e741847fafff4e89c3927f3d9bd49b8a45e6d29d8e3ef"}},{"ruleId":"D2","level":"warning","message":{"text":"agents.saveConversationToKB (cognitive 18): agents.saveConversationToKB has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/knowledge.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0b57ffcb40c5b721f800c4903e9dde619a2eef80ac7eddffd68239200eb3d9"}},{"ruleId":"D2","level":"warning","message":{"text":"FileStagingClient.GenerateImage (cognitive 18): FileStagingClient.GenerateImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_staging_client.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"076cb12a9fbb382b924e4d059d2abe1a6c0ff5c20ba4a33c592bb9d2dd175b19"}},{"ruleId":"D2","level":"warning","message":{"text":"URI.ResolveURL (cognitive 18): URI.ResolveURL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"20a83e2366017ceced7582adaf8e6c69f0cb1d5b083d84f95a75e99b5dd8e9b2"}},{"ruleId":"D2","level":"warning","message":{"text":"URI.ContentLength (cognitive 18): URI.ContentLength has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39038b6a035055fc00c8702b371769689f61a03b26fe8c20e78fe6199cc35a9"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.wavAudioBytes (cognitive 18): utils.wavAudioBytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/utils/ffmpeg.go"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"114913ab8b7d49eeebd9c0d712b340fad064477eb759391f0b2d3d69023627a6"}},{"ruleId":"D2","level":"warning","message":{"text":"vram.EstimateModelMultiContext (cognitive 18): vram.EstimateModelMultiContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vram/estimate.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7aad201fb77012d7737a2b1f2cc57f6cb786367c46afb3f7c8aaf722f881fde"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.TotalAvailableVRAM (cognitive 18): xsysinfo.TotalAvailableVRAM has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e1245cd3020ae7e8bba396ada567f42fc4b46181bc772a414c68e8c0ac44ca"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalVQE.AudioTransform (cognitive 17): LocalVQE.AudioTransform has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b96a21acdc2e824908f79d809b122d0baa369b0dd28fb51a505d7496198ec51"}},{"ruleId":"D2","level":"warning","message":{"text":"ReleaseManager.DownloadRelease (cognitive 17): ReleaseManager.DownloadRelease has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/release_manager.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e5df16d2846d4ccccae25cf0a3b95cda6ee2682ff687d56cf03b522859c585"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.gRPCPredictOpts (cognitive 17): backend.gRPCPredictOpts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/options.go"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4984cd9f9f7c41a02a6313bc937108a634502d6ac6ccafffe0714f7df304734"}},{"ruleId":"D2","level":"warning","message":{"text":"BackendsList.Run (cognitive 17): BackendsList.Run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/backends.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1cf6942da15cc4bfcc957a5ac6d7f0050a636c6a9c3f5f89ccc07b7a98a2f0"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelConfigLoader.PreloadWithContext (cognitive 17): ModelConfigLoader.PreloadWithContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config_loader.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"970c29ef5cef69787d45fb3a9f671d2dae5b80b94b7cf5f4eafc1047259edb4c"}},{"ruleId":"D2","level":"warning","message":{"text":"gallery.getGalleryElements (cognitive 17): gallery.getGalleryElements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/gallery.go"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"a63b1c34dc181054b089d0d3614d5f77f35dbb87088f45f552d39f8f3e7018b9"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatterboxImporter.Match (cognitive 17): ChatterboxImporter.Match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/chatterbox.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98a8695db12b9c24957407b9a39388e7b84797f17c50d12db4a2cadcd4b694a"}},{"ruleId":"D2","level":"warning","message":{"text":"KittenTTSImporter.Match (cognitive 17): KittenTTSImporter.Match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/kitten-tts.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2ee6aadb9eca2fed6229a0d2c726db1da80d9071e9fc3bf7f222d1171020c2"}},{"ruleId":"D2","level":"warning","message":{"text":"NeuTTSImporter.Match (cognitive 17): NeuTTSImporter.Match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/neutts.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"15250f7fc18c3650a664056f9d792f742f477cb1f06c7c91f9f70b6c03441173"}},{"ruleId":"D2","level":"warning","message":{"text":"OutettsImporter.Match (cognitive 17): OutettsImporter.Match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/outetts.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba2c59508ca4558d8cce6b66cb77754d12a04760b11ad4b87c8014659a7c4a8"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivacyFilterImporter.Match (cognitive 17): PrivacyFilterImporter.Match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/privacy-filter.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bbe1adbbf61be0d15bcfa979215c3362104419a0a2240b704f85d5eb70090d5"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.parseInputToMessages (cognitive 17): localai.parseInputToMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 2, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_responses.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c15d6625def5d86d81bfc2e4380924d45ff92746f12801ce09f9ae84f5a7d7"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.decodeAudioInput (cognitive 17): localai.decodeAudioInput has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b4ef12928e230dd36e2affac12cdacd0f43322a6fc5c457ccd227f64d848f8"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.BackendLogsWebSocketEndpoint (cognitive 17): localai.BackendLogsWebSocketEndpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 2 (nesting depth added 8). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 104). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/backend_logs.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4230cdc560ffe2c3f138d5e11162b55ee633b380a2678d3b0c9ec089421d863"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.classifierConfigFromPipeline (cognitive 17): openai.classifierConfigFromPipeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_classifier.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4894938aeda8c1f8d15d9e6317ee3612befb15a4e7d99868a4bf2ceff5f95128"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.emitSpeech (cognitive 17): openai.emitSpeech has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3 (nesting depth added 1). Of this number, 12 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_speech.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a558ef92152030cfe33526af6ae1157d0b7d87bf407aa23395f27f975d4305d"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.RealtimeCalls (cognitive 17): openai.RealtimeCalls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 1, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_webrtc.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec78b3cec5e64bf1e5af06aa4c9a1b13edfd721440fb4133348235eabec1395e"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.convertORItemToMessage (cognitive 17): openresponses.convertORItemToMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93ece117d21a4ab0f04c677818650c622f4a8657b5046a342ba1621f1a0a43b"}},{"ruleId":"D2","level":"warning","message":{"text":"NATSDispatcher.handleJob (cognitive 17): NATSDispatcher.handleJob has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/dispatcher.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fce92f0f19002af6d761884c4e5b6142253d6cd9e3afacb45055bdc2100110a"}},{"ruleId":"D2","level":"warning","message":{"text":"nodes.StartFileTransferServerWithReadiness (cognitive 17): nodes.StartFileTransferServerWithReadiness has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 103, 143, 90, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded3781d1a72acca22f0f6fe7c5891200068e943a6f9f7a3f31f7fa90682a6c9"}},{"ruleId":"D2","level":"warning","message":{"text":"nodes.handleBackendLogsWS (cognitive 17): nodes.handleBackendLogsWS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 2 (nesting depth added 8). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"8058cf30760133cc69b87cb7ac1826b1d45b8f0477682e25d38025f5dfc9c9a9"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedBackendManager.ListBackends (cognitive 17): DistributedBackendManager.ListBackends has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"218690471fb793f5d8374254a01145b92d8eb8511dd2b74a079105457278077b"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartRouter.buildPreference (cognitive 17): SmartRouter.buildPreference has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d35868ee49a894fafbd84f25fac4e43ce26be2258ecad5a8b0382251a97dd1"}},{"ruleId":"D2","level":"warning","message":{"text":"backendSupervisor.upgradeBackend (cognitive 17): backendSupervisor.upgradeBackend has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/install.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"d885b254a6fe208b19da94572eda2f9d7f6854e3a740b5fc49e9d6765a1f463b"}},{"ruleId":"D2","level":"warning","message":{"text":"server.AudioTranscriptionLive (cognitive 17): server.AudioTranscriptionLive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 435, 459). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"082d6418c4e6439ff198436725e311c197ac5538ad890415ab2cb2ce2717274c"}},{"ruleId":"D2","level":"warning","message":{"text":"server.AudioTransformStream (cognitive 17): server.AudioTransformStream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 720, 744). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"9815d6c48526490d2a870b7d0b3853b2579c4cbda88c077acc82f330a22fb2cc"}},{"ruleId":"D2","level":"warning","message":{"text":"server.AudioToAudioStream (cognitive 17): server.AudioToAudioStream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 783, 805). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c538ddf2bfee5b7a09fc920a206399278b8eeb1585b91fbd3983e3428549f7f"}},{"ruleId":"D2","level":"warning","message":{"text":"server.Forward (cognitive 17): server.Forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 846, 868). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ad95b0df2cb15e052934d4b5c010bd2f3fd62d1451a414c94844abe0a0c7eb"}},{"ruleId":"D2","level":"warning","message":{"text":"BackendLogStore.Subscribe (cognitive 17): BackendLogStore.Subscribe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 5, match/switch 3 (nesting depth added 6). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 318, 334, 256). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/backend_log_store.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0337e6ed9d45eb33c2dcaa168125311cd47c8bf8f4f23f1d468e1d9342c961"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelLoader.checkIsLoaded (cognitive 17): ModelLoader.checkIsLoaded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/loader.go"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"e473bbb5bcc410ba3893337e1e2d364ecacda227f46460a596ec36f132e2fb11"}},{"ruleId":"D2","level":"warning","message":{"text":"modelartifacts.verifyDownloadedFile (cognitive 17): modelartifacts.verifyDownloadedFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/modelartifacts/materializer.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b97291ac869510077c0bdce154203c4ce8088887c33f2a531c934d1343eac8a"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.parseCLInfoJSON (cognitive 17): xsysinfo.parseCLInfoJSON has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/clinfo.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1c79d2b3c0d6c4b7ff5b662f6219cd17b4f3b1a00c18d00a886949181b2421"}},{"ruleId":"D2","level":"warning","message":{"text":"switchChat (cognitive 17): switchChat has cognitive complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df74eed79299a5f0544c080c8a5db7f4a6300cd4ecc2b0130c31ef5516eebee"}},{"ruleId":"D2","level":"warning","message":{"text":"updateTokensPerSecond (cognitive 17): updateTokensPerSecond has cognitive complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"dddf1a45c4fbf5a9232aba2de8e528632105ec1f182e4af950139ca8d1cb74a6"}},{"ruleId":"D2","level":"warning","message":{"text":"updateTokenUsage (cognitive 17): updateTokenUsage has cognitive complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":2392}}}],"partialFingerprints":{"codehealthFindingId/v1":"8916b259e5bbdb15c0ddc09d09767ceddc60d8e0e29623da9d6ced672d7a3f97"}},{"ruleId":"D2","level":"warning","message":{"text":"N (cognitive 17): N has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/assets/highlightjs.js"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"281f1bdc232572196777211fec67884ae3acbab718eaf3612144beb41f6f776d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyRequestVoice (cognitive 16): main.applyRequestVoice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bec84ddaf5ae5b0054cfd6aff72d1f65385bbaabff09580550060d38a87dbf"}},{"ruleId":"D2","level":"warning","message":{"text":"DepthAnythingCpp.runExports (cognitive 16): DepthAnythingCpp.runExports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/depth-anything-cpp/godepthanythingcpp.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f7ad5aaa6b11cad147276806263f4c48337e825b2156791b50045538ef4fa0"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildPredictOptions (cognitive 16): main.buildPredictOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/llm/llama/llama.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"996e49aa95405953714e47c0970ba1f0e09d9c01a8a81b49e087ce1ad6209a9e"}},{"ruleId":"D2","level":"warning","message":{"text":"TextToSpeech.sampleNoisyLatent (cognitive 16): TextToSpeech.sampleNoisyLatent has cognitive complexity 16 (threshold 15). Drivers by points: loops 14, if/else 2 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f6eb8d2ffee651f3da96489407f9ac000c708ff1eab5282f00fc0c29ef8838"}},{"ruleId":"D2","level":"warning","message":{"text":"Whisper.AudioTranscription (cognitive 16): Whisper.AudioTranscription has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 3, boolean chains 2, match/switch 1 (nesting depth added 2). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/whisper/gowhisper.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b41accf3b3d50507caebede23f8d700ae0853eaa6887298e4fc8a003cef1860"}},{"ruleId":"D2","level":"warning","message":{"text":"Whisper.AudioTranscriptionStream (cognitive 16): Whisper.AudioTranscriptionStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 3, boolean chains 2, match/switch 1 (nesting depth added 2). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/whisper/gowhisper.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faf4c36baf8d7f76a66224c5185b3721d7a56a58b6a56f40ced80b5fd30cb4d"}},{"ruleId":"D2","level":"warning","message":{"text":"Application.StartAgentPool (cognitive 16): Application.StartAgentPool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/application.go"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"7538f9bbe90c2b123549a3710ed7e01ac6bca7640acf0d67fd80d78caa1f61d8"}},{"ruleId":"D2","level":"warning","message":{"text":"backend.Finetune (cognitive 16): backend.Finetune has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/llm.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f8914144add0b77c79d7714e6e477ac065c46a8a2a6187a5757e86a0f6e805"}},{"ruleId":"D2","level":"warning","message":{"text":"HFScanCMD.Run (cognitive 16): HFScanCMD.Run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/util.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"e613a72665f650314c3f71e4611a0d8a33ab3b8f0014e79db5aedf5b1503d9c4"}},{"ruleId":"D2","level":"warning","message":{"text":"NATSCredentialManager.RefreshLoop (cognitive 16): NATSCredentialManager.RefreshLoop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, match/switch 4, boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/workerregistry/credentials.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9556ca4e365dfc90699c93a6463723b4a82c0c8c4dc42cc85908fa74fcdee9e7"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationConfig.ApplyRuntimeSettings (cognitive 16): ApplicationConfig.ApplyRuntimeSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/application_config.go"},"region":{"startLine":1156}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1c75d7a9146810c3c63f3d478e07c1211796dc3b018c2172bcd5a059f1ea500"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineVoiceRecognition.Validate (cognitive 16): PipelineVoiceRecognition.Validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, match/switch 3, boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f253942fe738dd4d7c3e8318e32e11904331ed5c8dd0dacaa17cf7e3e7164b"}},{"ruleId":"D2","level":"warning","message":{"text":"MLXImporter.Import (cognitive 16): MLXImporter.Import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/mlx.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"d77f2f0a47b77be6900d59a4eb74ae6d5dae38dc5816d7353441c12f6dd9530a"}},{"ruleId":"D2","level":"warning","message":{"text":"SentenceTransformersImporter.Match (cognitive 16): SentenceTransformersImporter.Match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/sentencetransformers.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c713e6bb67bd9262e928a8033f840e6998c3e7d099dd394f3a0df586170d766"}},{"ruleId":"D2","level":"warning","message":{"text":"SileroVADImporter.Match (cognitive 16): SileroVADImporter.Match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/silero-vad.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"2137d84ad7d2284910967355323bd5fdc264411437f6efd7c30b65b0243c4961"}},{"ruleId":"D2","level":"warning","message":{"text":"SileroVADImporter.Import (cognitive 16): SileroVADImporter.Import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/silero-vad.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"141510b52eeb5493d62ef242d6ad6c72d539115675e99f3cc7702f0f0e3eb8e8"}},{"ruleId":"D2","level":"warning","message":{"text":"VLLMImporter.Import (cognitive 16): VLLMImporter.Import has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/vllm.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a61f6f80b6a4ecbefd6d2b0978078534fa7616109b8b81959b96973e0f2d22"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.NodeBackendLogsWSEndpoint (cognitive 16): localai.NodeBackendLogsWSEndpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 4). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 795, 781). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"e16e3ff3c7b38f52c7ea6bed36a492d4ba6d87b232b82c3275464811fbeaf184"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.RunPIIScan (cognitive 16): localai.RunPIIScan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/pii.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"02dd638abc94bdaf5502be1cd2434154118eb74a7a35335a0974f262cbce2798"}},{"ruleId":"D2","level":"warning","message":{"text":"localai.openVideoMedia (cognitive 16): localai.openVideoMedia has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/video.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb78f53d9d4539d1047cba15f05af5917fe073ca925e6187731a67a633f2163"}},{"ruleId":"D2","level":"warning","message":{"text":"ollama.GenerateEndpoint (cognitive 16): ollama.GenerateEndpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 20). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/ollama/generate.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd4b9c024bb6615a05599dda7638a4fd0f50fddb89e6711ea11159bec1a163f"}},{"ruleId":"D2","level":"warning","message":{"text":"openai.newVoiceGate (cognitive 16): openai.newVoiceGate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 6). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_voicegate.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3adc579d0c818f43cb4624abc2a47d2f9645789f180f422e24ee141786e0c8e3"}},{"ruleId":"D2","level":"warning","message":{"text":"clauseChunker.firstClauseCut (cognitive 16): clauseChunker.firstClauseCut has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 4, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_chunker.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"f539c37722e68fd9122948e947883ee10cde1ddf81efa37fd60f9ac89c872a50"}},{"ruleId":"D2","level":"warning","message":{"text":"openresponses.handleWebSocketConnection (cognitive 16): openresponses.handleWebSocketConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/websocket.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3c3257acc8b5b6728377a528461ed855e1301cfa9b88b546ee4f604e16e7d4"}},{"ruleId":"D2","level":"warning","message":{"text":"middleware.messageText (cognitive 16): middleware.messageText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 2, boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/route_model.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e3b405344b2a9ef62641e914528efe9c3d049c9ff8f6293f156b73b198fe30"}},{"ruleId":"D2","level":"warning","message":{"text":"Messages.ToProto (cognitive 16): Messages.ToProto has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/schema/message.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"1daa6ffd3d64b163dc416dbf7f924febd88109f92e9b21c9c9a50e1375b0f4e2"}},{"ruleId":"D2","level":"warning","message":{"text":"galleryop.ListModels (cognitive 16): galleryop.ListModels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/list_models.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"569d3154a4ff6ef5d01c78db82f313ef59b009eb55a2cd57c63df2d6e4a3236c"}},{"ruleId":"D2","level":"warning","message":{"text":"Dispatcher.runDueCronTasks (cognitive 16): Dispatcher.runDueCronTasks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/jobs/dispatcher.go"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"730bb5c322d5bb69ae6daf3bdaa8f4245a69a40f948982ddb8a0b356a249fc03"}},{"ruleId":"D2","level":"warning","message":{"text":"messaging.New (cognitive 16): messaging.New has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). Of this number, 9 points are the body\u0027s own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/messaging/client.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d49fb22c5309f2ed5a44cc645be2ce295cc44a4d1d4b6eebced5744700f2273"}},{"ruleId":"D2","level":"warning","message":{"text":"QuantizationService.StreamProgress (cognitive 16): QuantizationService.StreamProgress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 409). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/quantization/service.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"287dae52360d991aaf0cb094e254ddb5302b4e070e20f49fc026440f8b2b9d3a"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.Create (cognitive 16): Store.Create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/voiceprofile/store.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bae1067e570bcff6857002503678b25a74b59a97ed62fa2c900ed78e75a2095"}},{"ruleId":"D2","level":"warning","message":{"text":"peg.parseJSONArray (cognitive 16): peg.parseJSONArray has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"84dfdf3aa5362faf4981fd9cd2370d07e019b3113f390d58fc647770d0578730"}},{"ruleId":"D2","level":"warning","message":{"text":"RepetitionParser.parse (cognitive 16): RepetitionParser.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3203b2473539bceab439c07ba22bce96e0c70b4469d7d22907cf0f2bce8c427"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.retryDelay (cognitive 16): Client.retryDelay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/huggingface-api/client.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3570a26e4037b18bfe39464841890af6e37fc8501458d85cd7ce94ab3f72c64"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.listFilesInPath (cognitive 16): Client.listFilesInPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/huggingface-api/client.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"f542d78112ea0acd2f63f133c474003977809a168c1a681f5d396baffb8ebab6"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.ImportModelURI (cognitive 16): Client.ImportModelURI has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/inproc/client.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8d7983f7cbe861d3f45d1f30f38fbe4135d098f0237f3565c6d406239c071a"}},{"ruleId":"D2","level":"warning","message":{"text":"WatchDog.Run (cognitive 16): WatchDog.Run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/watchdog.go"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"b95a1dba826e004c400b94e5157c31f481da9e0f08db1978bdbccceae1773eed"}},{"ruleId":"D2","level":"warning","message":{"text":"vram.resolveProfile (cognitive 16): vram.resolveProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vram/estimate.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6924b82caeeefa1b3003d209bf1ccd9af5df3d2f0f92565b37b926350f7fc7f3"}},{"ruleId":"D2","level":"warning","message":{"text":"vrambudget.Parse (cognitive 16): vrambudget.Parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/vrambudget/budget.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0bd5a0fb8f42705d3f8f6910d4fb99a30eb51e54b7b6fdfde889ec6f78ad683"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.getAMDGPUMemory (cognitive 16): xsysinfo.getAMDGPUMemory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91f75925024be0b07f5c9ba618a59d64f81968ace6da21d0498336072f992ce"}},{"ruleId":"D2","level":"warning","message":{"text":"xsysinfo.getAppleGPUMemory (cognitive 16): xsysinfo.getAppleGPUMemory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":1251}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c1b9dd035eda77e3ba20d29a16239f4a203efd82280aa216172cae6253fa78"}},{"ruleId":"D2","level":"warning","message":{"text":"drawDiagnostics (cognitive 16): drawDiagnostics has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/talk.js"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a606dd7942d9c746d45e4e22a1de3719da41f949e669ebd7a4315cd7cb6bc6c"}},{"ruleId":"D2","level":"warning","message":{"text":"generateSound (cognitive 16): generateSound has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/sound.js"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9e586e492495bce43c877cedced1b0f009e10a80ab522aa6b35bb50014ff45"}},{"ruleId":"D2","level":"warning","message":{"text":"loadChatsFromStorage (cognitive 16): loadChatsFromStorage has cognitive complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d70dce1fb93c9bfb5202c5f4423e3ea4879ce64bbe25219e450cc1f1eafb10f"}},{"ruleId":"D2","level":"warning","message":{"text":"getArtifactIcon (cognitive 16): getArtifactIcon has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/utils/artifacts.js"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"75101149589ba318a53906e3e06c8bc248dddb7afd0ab3e906d6c1793643bc41"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openresponses/responses.go: FileTooLong \u2014 2039 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d7dd4c0fba7d1d3be4afe441561a53f66d85df281c8428e9e1ce232cf2cb924"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: static/chat.js: FileTooLong \u2014 1649 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/chat.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"818e8a6a67a4cda1fa969951c4eb677880bf77989a3bcab004542a8455727612"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openai/realtime.go: FileTooLong \u2014 1625 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"43426f292441fbd9852508d1ce75cf75674b1f4351be460a93273b8e3b5db9e7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NodeRegistry: TooManyMethods \u2014 86 methods, declared across 2 files: nodes/registry.go (84), nodes/disk_headroom.go (2). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b12190a0cb438a638f8aeaefef709ad55570dde9c20a9aba4c64c2cc992e214"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: assets/highlightjs.js: FileTooLong \u2014 1199 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/static/assets/highlightjs.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c949d907cab8ab73db63f34491f9134ba1055a29dc71d3222757a322bbe90255"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AgentPoolService: TooManyMethods \u2014 69 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_pool.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"640059c4122a460a22632ad54a1974d63b3ae486df32675c2e8cc0ab886228f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: nodes/registry.go: FileTooLong \u2014 1139 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"10781e90096d7839ff58edc0f03dc8cc14787bbd60ec0ba1dbccd16715440abd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: routes/ui_api.go: FileTooLong \u2014 1111 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: RegisterUIAPIRoutes (123-1845). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd3f7adf240b14ce6d9b6affdf167a47f45939cfb3f1bb23983d4e60636f233"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sherpa-onnx/backend.go: FileTooLong \u2014 1030 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2efda7204fef1e08d2409fe43e4397034fee1a1854536b3148a8d3a28b897bba"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Application: TooManyMethods \u2014 60 methods, declared across 6 files: application/application.go (39), application/router_factories.go (7), application/watchdog.go (6), application/p2p.go (5), \u002B2 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/application.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8290439718dbe424161a26928adc943446525e231cc17ef290ffb8393bd24f0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: grpc/client.go: FileTooLong \u2014 936 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"530161064090b64a2658f0e1bf19165dcf9bcd552acad06bc908c4b194706a22"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Client: TooManyMethods \u2014 56 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/client.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c8410eefd0a2004d53d424bcc9a3a924be94c5417bfbe264325075be523a15"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: nodes/router.go: FileTooLong \u2014 888 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11505fbf66c572821d85c7802b1ed6dd86a7126688f565b401d9b81f054b55f3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: embedBackend: TooManyMethods \u2014 53 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/embed.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f5d7e87e6b8290b6b22705970f82509017f5f6f4772542123a1dcae2a35031"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/model_config.go: FileTooLong \u2014 883 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd31321d773f029cce2a18993816ce307a679ffc94098dd7d4a73571b60ea1c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: types/server_events.go: FileTooLong \u2014 866 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/server_events.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09e882e8eff3281b62b6b73adcca6b7d5220027cf3bb1c250ebb83ff4586833"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentpool/agent_jobs.go: FileTooLong \u2014 857 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8be112cf5d7838b2312dea9bc4bdc07514c19bed3992472ec6250629d5b7bd8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Base: TooManyMethods \u2014 51 methods. Most of these members implement grpc.AIModel (51 of 51 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/base/base.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"19439e3ca0ae3ffc14979328b3d5ce65b2cbb1311568432d6abfa2e18ff17184"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: server: TooManyMethods \u2014 49 methods. Most of these members implement grpc.AIModel (45 of 49 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"96711d8f2ca3957cdf2d48862ae3eb4987d6a0b8753782df2c5b794e14216503"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: functions/iterative_parser.go: FileTooLong \u2014 812 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9068f7eb93583e7816c0c36a60f54d2fa3bfa054f063ae9064e79a72e90ae32f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ModelLoader: TooManyMethods \u2014 47 methods, declared across 3 files: model/loader.go (34), model/initializers.go (7), model/process.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/loader.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"2181194a22a3970f3d455d1999e4a4e84df41a8cf99ec0b87925f4a83a247e2d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: routes/auth.go: FileTooLong \u2014 780 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: RegisterAuthRoutes (125-1247). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9edf9d0697ba1d1677ffa6fbf321a05678a9e0fc831d9841d0aaa413e5a6ed"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: xsysinfo/gpu.go: FileTooLong \u2014 758 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/xsysinfo/gpu.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c166870d03b502de7c56a4eda47fe04c4fe797d408f1cf380161ee845e3f47c6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ModelConfig: TooManyMethods \u2014 44 methods, declared across 3 files: config/model_config.go (35), config/model_capabilities.go (8), config/model_artifact_inference.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"85b8ef24d1826f4060da1fc03d07a0c5da624cb7814ff568dd50608c201fbecc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: localai/nodes.go: FileTooLong \u2014 725 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ead57685fe77e34da8163dc08df1262c53159c2a3cc47b5fbd7caaf7f1d556"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: backendSupervisor: TooManyMethods \u2014 43 methods, declared across 4 files: worker/supervisor.go (28), worker/lifecycle.go (9), worker/install.go (4), worker/models_running.go (2). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/supervisor.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"803179b1e39a0809221a0b51fb32195c4dec03c104c4b2ba98436883ce4fdaa4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AgentJobService: TooManyMethods \u2014 42 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d7d17f76cea7615f8a66581e1bda991ce19793ecddca07336093888da0da69"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Builder: TooManyMethods \u2014 42 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/builder.go"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"77c8ebf124b36f211b4094aab723785e54f11646d807b4dcb3d4b3a86fe3adf4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: grpc/server.go: FileTooLong \u2014 698 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8aab11aa6fcfe39d8aae9946c09ca24e4464ac9772589a8c81daadeb952294e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: types/types.go: FileTooLong \u2014 663 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/types/types.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec15a68f2fa1d129b703c099a8151bd0d42b0451180168985b15e8a40e080d37"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: supertonic/helper.go: FileTooLong \u2014 662 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/helper.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"344e18d49bcce6a02d151eea7a8aad36f005771a53534b40039e9e4216c1b9a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentpool/agent_pool.go: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_pool.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a631d0dc539e90fb32d513e2ee92926d85c647872f4e3628ead7cb1962b583bb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Client: TooManyMethods \u2014 39 methods. Most of these members implement localaitools.LocalAIClient (36 of 39 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/inproc/client.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"e056cd07c904a3cfb6e7ce4e26535929f0654e1f345feead8141ab4d2cbffe66"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openai/chat.go: FileTooLong \u2014 648 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: ChatEndpoint (132-1035). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9e86f4efd87f2ad5891119500edbe6f899532c5e13601ae6c1fe2879d91af3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/backend_capabilities.go: FileTooLong \u2014 645 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/backend_capabilities.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce876dcbd8098ad3b07a3fb5d481f8fce1c5a2b169bfad58f696b8cb908a1b4f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: anthropic/messages.go: FileTooLong \u2014 645 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f5413b3b3d4806707c9852efa59f95caf03caa2205050f5b915333d760dd41"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: inproc/client.go: FileTooLong \u2014 639 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/inproc/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1f1c29b5f80243579a0893320278f36e898e711a19d3e5c8092c56c20a7ff4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: peg/chat.go: FileTooLong \u2014 628 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcdc004e09c8a5af8639adca16142b86fbc11bd0f4e748d8293d43d5d5f71ca3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: functions/parse.go: FileTooLong \u2014 621 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/parse.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5143910cc640f22ce6f1878482e0fe797f7f29185669a7aa987508d8098a1065"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Client: TooManyMethods \u2014 37 methods. Most of these members implement localaitools.LocalAIClient (36 of 37 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/mcp/localaitools/httpapi/client.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c48f25fcf5e75b077e8532190e0fd906b8130cff6ad53872b951cc474e6b1e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GalleryService: TooManyMethods \u2014 35 methods, declared across 4 files: galleryop/service.go (29), galleryop/enqueue.go (4), galleryop/backends.go (1), galleryop/models.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6328e66a394d3aeaa8bbc7df6b891c2885fffe00aba3877d7177f9d861d248a9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WatchDog: TooManyMethods \u2014 35 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/watchdog.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"792a544c04f176e3b5ef52d64756c1765bda3f68870d36bf30839cdfebf7d239"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/application_config.go: FileTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/application_config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47445ab86c568d0298e93dd5c392d6e98c65dc791863b35aa3a5eeb48293694d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hooks/useChat.js: FileTooLong \u2014 577 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 86% of them inside a single declaration: useChat (108-837). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/react-ui/src/hooks/useChat.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1ba504994883d4a7124b233a1cb83a971111a7e45a0a3d62fb321682d5f9123"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/tools.go: FileTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d6bb8261b5ea31c5072ac2a6f0337a943478ae582a968eb1bc77c9da14f773c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/run.go: FileTooLong \u2014 558 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/run.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76e69f19ba0823706635a3988434addd3d54ff42fe255345d5da6492c027eb1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openai/realtime_model.go: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afe541577f43c08178702291efbb7749c214a9af8e0fee84e60a22147c3b026"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: nodes/reconciler.go: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/reconciler.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"43545ff813de9023b2091f1cfb518f2022698e679fd8e64518a4c0dc2557a63e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Launcher: TooManyMethods \u2014 33 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/launcher.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e2174f33d5c95198fdd6fe5167dc49e7e6f733f429b3b56018efd39fb4eacc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: nodes/file_transfer_server.go: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"446f7a02e8f82825f86c1705dae779cad4a0f9cc7c230b60181fc2372df92046"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: model/watchdog.go: FileTooLong \u2014 537 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/watchdog.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a302ce275ce302fa5b505baef2b3f05d8e6d48b9f35c271893d13b05eebf32e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: internal/launcher.go: FileTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/launcher.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5c863a8ef2c84b8ed5ab77f77654ac5e72857a4dd5284e422ece7f9d66c14a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: grpc/embed.go: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/embed.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e58971bbb4ccbfb2e507284bdb6bbd45e6da0d017d2cc77069cb870491adf706"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: InFlightTrackingClient: TooManyMethods \u2014 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/inflight.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"df5dceb02a0496395812912e9df924decc99a4ffa8af66bd2933192d02f3ff95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1868-1887 | core/http/endpoints/openresponses/responses.go:2403-2422 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1868\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1868}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb9029e5a6e0088ecf0a663bbb0e715e5f00337e004f67d69983dbec496ab179"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): core/services/galleryop/models.go:43-62 | core/services/galleryop/backends.go:38-57 \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 \u0060core/services/galleryop/models.go:43\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/models.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"f992be990d15f2efb46f6b64002431def95d765040fb8c61939f269e6bcd8b8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): pkg/grpc/server.go:451-472 | pkg/grpc/server.go:736-757 | pkg/grpc/server.go:799-817 | pkg/grpc/server.go:862-880 \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 \u0060pkg/grpc/server.go:451\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/server.go"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b58fa1a5e461e1184443e40937821cff275daa843217d6f4b076ea1f4e4738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): core/http/endpoints/localai/finetune.go:302-320 | core/http/endpoints/localai/quantization.go:221-239 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.go:302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"31594b23f5a3c167b5d8746ba5c0c51e42693e232da92a7a2edfb40f72a39b54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): pkg/grpc/client.go:326-344 | pkg/grpc/client.go:404-421 | pkg/grpc/client.go:1165-1182 | pkg/grpc/client.go:1276-1293 \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 \u0060pkg/grpc/client.go:326\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"pkg/grpc/client.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"f845312e46b33a47ec3a78ced07b61c1c7ee3da6aff2a120b2972b2856b2fa2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:2018-2035 | core/http/endpoints/openresponses/responses.go:2516-2533 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:2018\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7bedd3d6ba12a469242f3e5be41ef5269127a5b9ee330913a2f4f021cd80dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:2203-2220 | core/http/endpoints/openresponses/responses.go:2579-2596 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:2203\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2203}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f245f9cb92225a8e397edda668bac2021567c0fd3d0abd2cfe5ee400cc026dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 5): pkg/grpc/client.go:185-203 | pkg/grpc/client.go:317-335 | pkg/grpc/client.go:396-412 | pkg/grpc/client.go:1157-1173 | pkg/grpc/client.go:1268-1284 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/grpc/client.go:185\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/client.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b910eca5ecfac188a211558d820e7f452ac0bbac1c84bdc75110c65169ead3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): backend/go/crispasr/gocrispasr.go:284-300 | backend/go/whisper/gowhisper.go:211-227 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 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":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca0b435b4d13ef2a212adebbf7bad46074f2b60e73105295d62b8b53af49cc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): core/http/endpoints/localai/backend_logs.go:137-153 | core/services/nodes/file_transfer_server.go:855-871 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 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":"core/http/endpoints/localai/backend_logs.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd07cfd668920c470e8935f05c565359f4d223875ab490c48bd0e7f0ebfb2da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): core/http/endpoints/localai/finetune.go:284-300 | core/http/endpoints/localai/quantization.go:203-219 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.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":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"90451f2f26ddb87dc6844d6daf19e8757496b5a7c1a4f5f487aec95d0b0b39d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): core/http/endpoints/localai/model3d.go:144-160 | core/http/endpoints/localai/video.go:285-301 \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 \u0060core/http/endpoints/localai/model3d.go:144\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"2875be0343f008093b7b1b60102b58eddf493cb6e14947995c28baae5fdce473"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): pkg/grpc/client.go:884-899 | pkg/grpc/client.go:950-965 | pkg/grpc/client.go:1029-1044 | pkg/grpc/client.go:1093-1108 \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":"pkg/grpc/client.go"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc93f3bc1536736a678de0583eb008069dc3d077dcc0fb31ea6fecc6aac4872"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/endpoints/anthropic/messages.go:194-209 | core/http/endpoints/anthropic/messages.go:552-567 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/anthropic/messages.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f56bdaa7db2c08a8e58a6c07cbf2bceb82be6712acf257e588a9019f5b3faf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:200-218 | core/http/endpoints/openresponses/websocket.go:267-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 \u0060core/http/endpoints/openresponses/responses.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fa632a1ddcb48f654b3fddf84deb2e17dc62943910d1c7e5c74ea8cddc43f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1909-1924 | core/http/endpoints/openresponses/responses.go:2345-2360 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1909\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1909}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1e9dc0c8ab9e7df44f1a4adebfccf18f5667efeb06ac3a97e17714f932ec05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/endpoints/openresponses/store.go:184-199 | core/http/endpoints/openresponses/store.go:393-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 \u0060core/http/endpoints/openresponses/store.go:184\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/store.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"8472fc55fa9f9aa8d03a68c007e5592298d3cb76f46e0ac19de535c9836249a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/middleware/request.go:235-250 | core/http/middleware/request.go:663-678 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/middleware/request.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":"core/http/middleware/request.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e87bc39d83f7e11bffa9bd3387c80ab9425c3b15ec9085c3bf8c3afef47c8e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pkg/functions/peg/parser.go:306-321 | pkg/functions/peg/parser.go:347-362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/parser.go:306\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"5371e900b89eea24e307fee2ac37e81e1398cf0d4803cf87a0c4c322058680f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pkg/xsysinfo/gpu.go:527-542 | pkg/xsysinfo/gpu.go:553-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/xsysinfo/gpu.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":"pkg/xsysinfo/gpu.go"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"be11102d2c6437acb519ade8c9537b951ce5652f4b7c8c2ca6375da8f223deb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): core/http/routes/ui_api.go:1186-1201 | core/http/routes/ui_api.go:1588-1603 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:1186\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":1186}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b9e7c0cfc9cb999371aa1d86c7372c212b9b544d40f3fe0b06af511ba199ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): core/gallery/importers/depth-anything.go:143-157 | core/gallery/importers/moss-transcribe-cpp.go:141-155 | core/gallery/importers/parakeet-cpp.go:142-156 | core/gallery/importers/privacy-filter.go:164-178 | core/gallery/importers/whisper.go:130-144 \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 \u0060core/gallery/importers/depth-anything.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":"core/gallery/importers/depth-anything.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d5272ff522888b5edd8cf054e3820d0c15c9726644461abad4f1164a7c821b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): pkg/grpc/embed.go:414-429 | pkg/grpc/embed.go:510-525 | pkg/grpc/embed.go:849-863 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/grpc/embed.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/grpc/embed.go"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ecbe7d5e1c8752aee499352b3cb5e48788afc7e59f75750490ccf1071388b0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): backend/go/crispasr/gocrispasr.go:432-446 | backend/go/whisper/gowhisper.go:339-353 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 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":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9aa6eac7e91fdcf7b65acbe59855b955aa4aa7e6b40df16b68d2e51087b7f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): backend/go/supertonic/helper.go:238-252 | backend/go/supertonic/helper.go:273-287 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/supertonic/helper.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":"backend/go/supertonic/helper.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2457f52b9020c9d143dc678cd0face0f6eb3a8a6f1217c241cadf470c53b44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): core/http/endpoints/localai/nodes.go:1194-1208 | pkg/mcp/localaitools/inproc/client.go:553-567 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/localai/nodes.go:1194\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"b89cc7194e35d555d8572da06cbf0a10bf329bd110ef5ac3adab821d64d7aae2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1964-1978 | core/http/endpoints/openresponses/responses.go:2465-2479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1964\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1964}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa07f43d8355da58cf8e6f27fdb2cbc237514f91d00a763a0fb7007b07c4cee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:2314-2329 | core/http/endpoints/openresponses/responses.go:2671-2685 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:2314\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2314}}}],"partialFingerprints":{"codehealthFindingId/v1":"7693429c498cce019f9df167ae1b75d8c96f47d113c8540955847024a121f656"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): core/p2p/p2p.go:139-153 | core/p2p/federated_server.go:41-56 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/p2p/p2p.go:139\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/p2p/p2p.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e35e1d70f4c9a2e4fc22ecae64f2a96a7fc9c0cdb78826abd7bd044fe550f6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 18): core/gallery/importers/ace-step.go:111-124 | core/gallery/importers/bark.go:109-122 | core/gallery/importers/chatterbox.go:95-108 | core/gallery/importers/coqui.go:84-97 | core/gallery/importers/faster-whisper.go:102-115 | core/gallery/importers/fish-speech.go:86-99 | core/gallery/importers/kitten-tts.go:94-107 | core/gallery/importers/kokoro.go:95-108 | core/gallery/importers/locate-anything.go:122-135 | core/gallery/importers/moonshine.go:94-107 | core/gallery/importers/nemo.go:84-97 | core/gallery/importers/neutts.go:95-108 | core/gallery/importers/outetts.go:97-110 | core/gallery/importers/piper.go:94-107 | core/gallery/importers/qwen-asr.go:90-103 | core/gallery/importers/rfdetr.go:148-161 | core/gallery/importers/vibevoice.go:90-103 | core/gallery/importers/voxcpm.go:90-103 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/gallery/importers/ace-step.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/ace-step.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba9c6a2c338d7abbae8791d18c8c1de9864f2b88ae3386e351716cd02749cb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): core/backend/model3d.go:77-90 | core/backend/video.go:84-97 | core/backend/image.go:66-79 \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 \u0060core/backend/model3d.go:77\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/model3d.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c980269fb84245ab931c840b18e5fccb2174eb34638cb84d7088f4dbf8cc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): core/http/endpoints/openai/realtime_model.go:234-247 | core/http/endpoints/openresponses/responses.go:192-205 | core/http/endpoints/openresponses/websocket.go:259-272 \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 \u0060core/http/endpoints/openai/realtime_model.go:234\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"663db83f3c083e0245e50549f9132ce59116a7b73ed0d01676964c813beba3b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): backend/go/face-detect/options.go:34-47 | backend/go/voice-detect/options.go:33-46 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/face-detect/options.go:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/face-detect/options.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf6e272cb2c0abfd1d666739bec5ff73b88a62a10a2b7e177556b2e60bf24c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): backend/go/omnivoice-cpp/gomnivoicecpp.go:223-236 | backend/go/qwen3-tts-cpp/goqwen3ttscpp.go:206-219 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/omnivoice-cpp/gomnivoicecpp.go:223\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/gomnivoicecpp.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"3762aa7c1c15265c162c7945c3b8cffc5f44198187d83e037948be115d18c64b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/cli/soundgeneration.go:54-67 | core/cli/tts.go:31-45 \u2014 before extracting anything, compare \u0060core/cli/soundgeneration.go\u0060 and \u0060core/cli/tts.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/cli/tts.go:31\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/soundgeneration.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"062ffeb26665e87abc256c450d1c756ac32fe972e8795d33aecb716adacfcb9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/gallery/importers/depth-anything.go:80-94 | core/gallery/importers/parakeet-cpp.go:79-92 \u2014 before extracting anything, compare \u0060core/gallery/importers/depth-anything.go\u0060 and \u0060core/gallery/importers/parakeet-cpp.go\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/depth-anything.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a3186e14d363350a22c8abd94ae959cb505951d3a0d94300e292ea0d4e7562"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/http/endpoints/localai/nodes.go:1228-1242 | pkg/mcp/localaitools/inproc/client.go:597-610 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/localai/nodes.go:1228\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d59f31b9ecc93b58c87dee7094c013e7008dc1fbb1f35ddee6fd4c920fb0aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/http/endpoints/openai/chat.go:321-335 | core/http/endpoints/openai/realtime_model.go:237-250 \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 \u0060core/http/endpoints/openai/chat.go:321\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5648d48db8dd09634301c5d29b8fa42308d86709eb48a5f155e7b77ca36bb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1268-1281 | core/http/endpoints/openresponses/responses.go:2211-2225 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d16e1c34171d509491d07a44927b0772caabb59e52a0a1668f31cb140c594d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/galleryop/models.go:146-160 | core/services/galleryop/backends.go:135-148 \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 \u0060core/services/galleryop/models.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":"core/services/galleryop/models.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"c95195f04dffdc7ef4e2cdbf73ae2d41b0715e36e4dd220832191a968b3e13e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/galleryop/service.go:605-622 | core/services/galleryop/service.go:648-661 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/galleryop/service.go:605\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c739c529ea4043d1d4591ed1b05cbf8a2bc33749c983ccb4ecbab2a5c8ba17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/nodes/managers_distributed.go:504-518 | core/services/nodes/managers_distributed.go:610-623 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/managers_distributed.go:504\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c1bdf4e984abe01db06e84435fe67ce8c03f6da5cfe889007873fda00e0ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/routing/pii/redactor.go:50-63 | core/services/routing/pii/redactor.go:112-125 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/routing/pii/redactor.go:50\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/pii/redactor.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1ae557c36410683bdc0b8f8bfeb432612e6607ebfbb349a3ac2ec80df134a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/routing/piiadapter/anthropic.go:43-56 | core/services/routing/piiadapter/openai.go:54-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 \u0060core/services/routing/piiadapter/anthropic.go:43\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/anthropic.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"572398998ab60f1c46fdc437905e4b349b15c43a7aea8916d3b0567a99448132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/services/skills/filesystem.go:249-262 | core/services/skills/filesystem.go:271-284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/skills/filesystem.go:249\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/skills/filesystem.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"310d70ad0e2ddfe534b620f596469a176bb73e427689176bda9a9887a7baab38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/functions/grammars/json_schema.go:130-144 | pkg/functions/grammars/llama31_schema.go:118-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 \u0060pkg/functions/grammars/json_schema.go:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4fdd2a7c90ac1b4d3812968950c7ff4eb4427c2ce9477f39ad717fb8a5b554b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/functions/json_stack_parser.go:327-342 | pkg/functions/json_stack_parser.go:396-409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/json_stack_parser.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/json_stack_parser.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"2621c6fe8c019761c66bffeb752aaf823f9341da88519c7c48a143f0c07d0303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/http/endpoints/localai/model3d.go:95-108 | core/http/endpoints/localai/video.go:228-242 \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 \u0060core/http/endpoints/localai/model3d.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":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"d306fc16991317f058a19102d7707e5418425dd9ef55051c0097407beefb2bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): core/http/endpoints/localai/model3d.go:112-125 | core/http/endpoints/localai/video.go:246-259 \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 \u0060core/http/endpoints/localai/model3d.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. 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":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"869b3f4b273164197740e7e77569368ae1b425de7fcfc2f75966bc7716ef1cd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 14): core/gallery/importers/bark.go:95-107 | core/gallery/importers/chatterbox.go:81-93 | core/gallery/importers/coqui.go:70-82 | core/gallery/importers/faster-whisper.go:88-100 | core/gallery/importers/fish-speech.go:72-84 | core/gallery/importers/kitten-tts.go:80-92 | core/gallery/importers/kokoro.go:81-93 | core/gallery/importers/moonshine.go:77-92 | core/gallery/importers/nemo.go:70-82 | core/gallery/importers/neutts.go:81-93 | core/gallery/importers/outetts.go:83-95 | core/gallery/importers/qwen-asr.go:76-88 | core/gallery/importers/vibevoice.go:76-88 | core/gallery/importers/voxcpm.go:76-88 \u2014 before extracting anything, compare \u0060core/gallery/importers/bark.go\u0060 and \u0060core/gallery/importers/chatterbox.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/gallery/importers/bark.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/bark.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"79768e446e2f0afb6f4bffeaeb497821297153124a7127d7d00f625d2577fe04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): core/gallery/importers/depth-anything.go:122-134 | core/gallery/importers/moss-transcribe-cpp.go:120-132 | core/gallery/importers/parakeet-cpp.go:121-133 | core/gallery/importers/privacy-filter.go:143-155 | core/gallery/importers/whisper.go:109-121 \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 \u0060core/gallery/importers/depth-anything.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":"core/gallery/importers/depth-anything.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cfdb0a38fb27b01ab73c00c9fa32711be27f63992cc625489bffd8c4762b47e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): core/services/skills/filesystem.go:225-237 | core/services/skills/filesystem.go:250-262 | core/services/skills/filesystem.go:272-284 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/skills/filesystem.go:225\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/skills/filesystem.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ff588a28303c4c3e5e944f282cb164d857848c261965db226edb24aeb58992"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): core/backend/voice_analyze.go:26-38 | core/backend/voice_embed.go:29-41 | core/backend/voice_verify.go:27-39 \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 \u0060core/backend/voice_analyze.go:26\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/voice_analyze.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89e119d2a332ef53db406e148d44adbeffaec783cdb829cb117b79e74da9370"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): backend/go/crispasr/gocrispasr.go:198-210 | backend/go/whisper/gowhisper.go:147-159 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/crispasr/gocrispasr.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d19cb1dc39dea77d07461dc45a2c15145809df467eb0a55fd2ac326fb918ce7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): backend/go/crispasr/gocrispasr.go:407-419 | backend/go/whisper/gowhisper.go:300-312 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060backend/go/crispasr/gocrispasr.go:407\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"4546d7783d08e9aaa7a1b1cea000b4eb2c1eb94f3880afc7213738c5b7529234"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): backend/go/omnivoice-cpp/gomnivoicecpp.go:38-50 | backend/go/qwen3-tts-cpp/goqwen3ttscpp.go:41-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/gomnivoicecpp.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"480084ff7320467b093eec38bed43ecb0bc041bc9cbef9c02b95c6ad0c5dd70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/cli/soundgeneration.go:81-93 | core/cli/tts.go:51-63 \u2014 before extracting anything, compare \u0060core/cli/soundgeneration.go\u0060 and \u0060core/cli/tts.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"core/cli/soundgeneration.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"829f54d77d90052d8bd3a311875022f8d5a75dc209dc84431aa05da42d07eaff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/cli/soundgeneration.go:106-118 | core/cli/tts.go:66-78 \u2014 before extracting anything, compare \u0060core/cli/soundgeneration.go\u0060 and \u0060core/cli/tts.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/cli/soundgeneration.go:106\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/cli/soundgeneration.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d0b0e444bc68a97e1636ac8eb29cf33f71c94f48d8cd33483a7b8d05da6710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/gallery/importers/liquid-audio.go:129-142 | core/gallery/importers/longcat-video.go:112-124 \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 \u0060core/gallery/importers/liquid-audio.go:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/liquid-audio.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ba28337ce25c286d17053da7dc23aeaadd0eeceb31678911945771b031c657"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/anthropic/messages.go:434-446 | core/http/endpoints/anthropic/messages.go:630-642 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/anthropic/messages.go:434\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"804929de249b14ff945950bdb6239daa746d32de9e4de71ac841ba59aa416f78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/localai/audio_transform.go:191-203 | core/http/endpoints/localai/tts.go:121-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/audio_transform.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"c34af963fc0f24cd9565563cb4d07cd8a50a3554c6cfe53ee49f2e5d76cd6dc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/localai/nodes.go:781-793 | core/services/nodes/file_transfer_server.go:760-772 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/localai/nodes.go:781\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd823b6d98a8b9585e8b251fe2f020dbb45d415c1b38b4214269cd4f6973cd21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/openai/chat.go:1004-1016 | core/http/endpoints/openai/completion.go:283-295 \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 \u0060core/http/endpoints/openai/chat.go:1004\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d71fa470c238c665eeedd7df0b17cdc3f7b364f6de60102a6daa485c9f2f123"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/openai/realtime.go:805-817 | core/http/endpoints/openai/realtime.go:831-843 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/realtime.go:805\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"47cf8eab39033065d6757aa49c29f068f51d02a7d8ac7347bfa326a0e63a024e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:890-902 | core/http/endpoints/openresponses/responses.go:1415-1427 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:890\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"265244740e32a5bea884cb6a006786336e7159926f46358f40ee0432a89d60e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/openresponses/store.go:167-179 | core/http/endpoints/openresponses/store.go:371-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 \u0060core/http/endpoints/openresponses/store.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":"core/http/endpoints/openresponses/store.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf023a50eeb552a71fcbd1967f6b03f96ffe4aefc9df80e590006fbe5b94da3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/facerecognition/store_registry.go:109-122 | core/services/voicerecognition/store_registry.go:106-118 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/facerecognition/store_registry.go:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/facerecognition/store_registry.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"661fa381259e15af995f945750f8de39dc470163feedaf8b9597dc206375f42e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/finetune/service.go:451-463 | core/services/quantization/service.go:425-437 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/finetune/service.go:451\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a78d872dbce339bd5c7f90252030d56aaf26a70150d6dd07fc86dc01be2b324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/nodes/managers_distributed.go:479-497 | core/services/nodes/managers_distributed.go:579-591 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/managers_distributed.go:479\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b47c755641e7739de11d41f7a94a729219c6a0e9d11d71cf8d947f0485e28e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/nodes/registry.go:589-602 | core/services/nodes/registry.go:949-961 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/registry.go:589\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"d923e405844855bdd2415e8afa0ce53865b842ec07f196c5bc98acc44224196f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/nodes/registry.go:619-632 | core/services/nodes/registry.go:1561-1573 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d167337bd0f8c01ef1aa9363c99fe134d194e68cfaec2e1a9b8579753dce5b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/services/routing/pii/store.go:114-126 | core/services/routing/router/decisions.go:143-155 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/routing/pii/store.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":"core/services/routing/pii/store.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5578c14833a1842859111692bc3f7e03e45302bb9b95df7dc846efce7678f154"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/model/watchdog.go:510-525 | pkg/model/watchdog.go:832-844 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/model/watchdog.go:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/watchdog.go"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ef87909e0c405c3ce491acb96892e5fdd35e2b962a8d1855ebf94457dc1809"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/oci/image.go:236-248 | pkg/oci/image.go:284-296 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/oci/image.go:236\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/image.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"f45a944afd26c2546bb1338e9d8aaab10e7c4401d1fba2147c8e27d9e88ea874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/backend/face_analyze.go:27-39 | core/backend/face_verify.go:27-39 \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 \u0060core/backend/face_analyze.go:27\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/face_analyze.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd5a5ac4610b59b641f8e0e748aa72ef5b46869e2aa26d6104dc394ba6f1dbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/backend/tts.go:128-140 | core/backend/tts.go:295-307 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/backend/tts.go:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/tts.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"80a0659e99a30bfd8f5035d936c30dd7df70f6c1d13eaddc1950f3165d03139c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/gallery/importers/local.go:105-117 | core/gallery/importers/local.go:121-133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/gallery/importers/local.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/local.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4ab7133fea1ce721cef8bf357d83617edadef3df8147569bf44fa4883c47a12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/localai/face_analyze.go:25-37 | core/http/endpoints/localai/face_embed.go:31-43 \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 \u0060core/http/endpoints/localai/face_analyze.go:25\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/face_analyze.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"2397c357702e5ed540ebae24022ec78bee36b32c7c54fc9a318e8560015c0e3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/localai/mcp_prompts.go:86-98 | core/http/endpoints/localai/mcp_resources.go:73-85 \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 \u0060core/http/endpoints/localai/mcp_prompts.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":"core/http/endpoints/localai/mcp_prompts.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e6e2ccd32ed00796a3f6bb0c85baa7a0cfa71ef5cf923d9fce4655541be180"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/endpoints/openai/completion.go:281-293 | core/http/endpoints/openai/edit.go:75-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 \u0060core/http/endpoints/openai/completion.go:281\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/completion.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"6262b15b51645f9c5dd37b75122d23f7d38657f1297727d9f603c6f25b2fd37c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): core/http/routes/ui_api.go:633-645 | core/http/routes/ui_api.go:1306-1318 \u2014 both copies are in the same file, so extract the block 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":"core/http/routes/ui_api.go"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"118f18900a50a51b907f498b0d1bcee75ffea78239f06f2135ac81f70c685630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 29): core/gallery/importers/ace-step.go:81-92 | core/gallery/importers/bark.go:85-96 | core/gallery/importers/chatterbox.go:71-82 | core/gallery/importers/coqui.go:60-71 | core/gallery/importers/depth-anything.go:75-86 | core/gallery/importers/faster-whisper.go:78-89 | core/gallery/importers/fish-speech.go:62-73 | core/gallery/importers/kitten-tts.go:70-81 | core/gallery/importers/kokoro.go:71-82 | core/gallery/importers/liquid-audio.go:80-91 | core/gallery/importers/locate-anything.go:87-98 | core/gallery/importers/moonshine.go:67-78 | core/gallery/importers/moss-transcribe-cpp.go:73-84 | core/gallery/importers/nemo.go:60-71 | core/gallery/importers/neutts.go:71-82 | core/gallery/importers/outetts.go:73-84 | core/gallery/importers/parakeet-cpp.go:74-85 | core/gallery/importers/piper.go:58-69 | core/gallery/importers/privacy-filter.go:90-101 | core/gallery/importers/qwen-asr.go:66-77 | core/gallery/importers/rerankers.go:89-100 | core/gallery/importers/rfdetr.go:102-113 | core/gallery/importers/sentencetransformers.go:79-90 | core/gallery/importers/silero-vad.go:73-84 | core/gallery/importers/stablediffusion-ggml.go:113-124 | core/gallery/importers/vibevoice.go:66-77 | core/gallery/importers/vllm-omni.go:92-103 | core/gallery/importers/voxcpm.go:66-77 | core/gallery/importers/whisper.go:65-76 \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 \u0060core/gallery/importers/ace-step.go:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/ace-step.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb00c6951cd2a761511a16c28f08c91df0ae70bad3b02cd99d5653cc13d6ae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): core/gallery/importers/diffuser.go:57-68 | core/gallery/importers/mlx.go:54-65 | core/gallery/importers/transformers.go:57-68 | core/gallery/importers/vllm.go:67-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 \u0060core/gallery/importers/diffuser.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":"core/gallery/importers/diffuser.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f202b04078573951a7ebeeea7552f1e70a516a6cff1ae85b93be767c10265f26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): core/cli/backends.go:60-71 | core/cli/backends.go:104-115 | core/cli/backends.go:141-152 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/cli/backends.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/backends.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9404d7c2ed223185a12162b32f73a723311e47b1c856faa6be8d1cb42d8f38d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): core/gallery/model_artifacts.go:99-110 | core/trace/tracepersist/store.go:89-100 | core/config/model_artifact_binding.go:100-111 \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 \u0060core/gallery/model_artifacts.go:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/model_artifacts.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"397befe24398327d4fb59a3fbdf87688ac6fad6ff18be741720170db899bf1a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): core/services/nodes/file_transfer_server.go:187-198 | core/services/nodes/file_transfer_server.go:566-579 | core/services/nodes/file_transfer_server.go:632-644 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/file_transfer_server.go:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"a29a7c72eadd359dbb0bcf084522082524fcb4a530ceaa9bc238ca39acd4939a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): pkg/functions/peg/parser.go:714-726 | pkg/functions/peg/parser.go:733-744 | pkg/functions/peg/parser.go:769-780 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/parser.go:714\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7549e24f804c65ad14232b7965c085cbcd171d6ca4d86f486f20bfc6d4db83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): core/http/endpoints/localai/mcp_prompts.go:14-25 | core/http/endpoints/localai/mcp_resources.go:14-25 | core/http/endpoints/localai/mcp_resources.go:70-81 \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 \u0060core/http/endpoints/localai/mcp_prompts.go:14\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp_prompts.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45c13b07a45e57ab12bd7c0f62765f0a188400c2b4e61bae92d617a36ae0587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): core/http/endpoints/localai/voice_analyze.go:25-36 | core/http/endpoints/localai/voice_embed.go:30-41 | core/http/endpoints/localai/voice_identify.go:33-44 \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 \u0060core/http/endpoints/localai/voice_analyze.go:25\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/voice_analyze.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c2cf1fd2711c5a966e6b87bfe4c1b153c08050bdcbb114304c0ca5784aab0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): backend/go/localvqe/golocalvqe.go:161-172 | backend/go/vibevoice-cpp/govibevoicecpp.go:281-295 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c825b856e741fd3967fd07044f186d92eb6a959a4f6e2495c2b557437f3e632"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/gallery/importers/transformers.go:88-99 | core/gallery/importers/vllm.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":"core/gallery/importers/transformers.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"056db24926b30eaef64df3a3094c6bab14a14424547e93b212a8fa86db1a45a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/anthropic/messages.go:232-243 | core/http/endpoints/anthropic/messages.go:590-601 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/anthropic/messages.go:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"265480f5d9a95b8520b3450c60eddd43d3b3449038a8555f4cf073572607918d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1697-1708 | core/http/endpoints/openai/chat_stream_workers.go:359-371 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1697}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9707fea03a38332bf7dd8c5114b35e3c3163cdfec4b96651f0c9d18395a6ddb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:3004-3015 | core/http/endpoints/openresponses/responses.go:3170-3181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:3004\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":3004}}}],"partialFingerprints":{"codehealthFindingId/v1":"071d95062d73277a86a3e1e0e608e326bb7baf635447d424f4e5ee14eb0b2e7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/openresponses/store.go:521-534 | core/http/endpoints/openresponses/store.go:619-630 \u2014 both copies are in the same file, so extract the block 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":"core/http/endpoints/openresponses/store.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c9ea7085b5dca1527d401478ecafd4c82babcb58492dd30d77292cdc768c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/services/agentpool/agent_jobs.go:966-977 | core/services/agentpool/agent_jobs.go:1078-1089 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/agentpool/agent_jobs.go:966\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_jobs.go"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd520f75f77be008fa99f2431bafd435549586a3b41e9f839d97e42df9b899b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/services/agentpool/agent_pool.go:888-899 | core/services/agentpool/agent_pool.go:924-935 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/agentpool/agent_pool.go:888\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/services/agentpool/agent_pool.go"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3f6b4ab560b5d37c134ed11a8ae0c78a3daf7dc43d8dcb557502ca18660424"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/services/finetune/service.go:349-360 | core/services/quantization/service.go:321-332 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/finetune/service.go:349\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1b87474fe9a76ddf92f1ef3f7fd91b7090f17e35c4044e0055a9da60e01b46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/downloader/uri.go:291-302 | pkg/downloader/uri.go:306-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7be274e94b9f0c5230fddc57be994d11b4aa07b7a0f6d81a916688725b6132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/functions/grammars/json_schema.go:64-75 | pkg/functions/grammars/llama31_schema.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d9f086cb0fad0f23e624986db1ab0bd899a2a44477fbda0917ea9a71045e1d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/functions/iterative_parser.go:759-770 | pkg/functions/iterative_parser.go:883-895 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/iterative_parser.go:759\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"6436973ac5c98dc04739358431de6bfa636dccd465b13e6340f8b61ac11a18de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/functions/peg_integration.go:307-318 | pkg/functions/peg_integration.go:371-384 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"b17ba670403249af040e2e97fbc736b582b67c4a97458a4383047b76e73a5346"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/localai/agent_jobs.go:128-139 | core/http/endpoints/localai/agent_jobs.go:283-294 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_jobs.go:128\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb2786e6f05d85d1fb701009eda2896bbd2f5813bf1b1487f8e3257675b2a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/localai/edit_model.go:126-137 | core/http/endpoints/localai/import_model.go:233-244 \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 \u0060core/http/endpoints/localai/edit_model.go:126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/edit_model.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d380886571b79d5ff5ca34433dcfb8ff9d3be6ed5ed59b935aac8159bb0261"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/localai/mcp_tools.go:34-46 | core/http/endpoints/localai/mcp_tools.go:85-96 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/mcp_tools.go:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp_tools.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cec3559d39a85a0f433ac259d50e5aa097ffe44b72aa4a002ca62379e58cb24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/endpoints/localai/model3d.go:167-178 | core/http/endpoints/localai/video.go:308-319 \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 \u0060core/http/endpoints/localai/model3d.go:167\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/model3d.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb414d2b6fc5973c7c08c5985c0084fcb733f9e86318f6141ef6ab5f7887f9af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/http/routes/anthropic.go:107-120 | core/http/routes/ollama.go:114-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 \u0060core/http/routes/anthropic.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. 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":"core/http/routes/anthropic.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a17132df5efa99b812bc07f618f8e548c103ad19c8462dd1947eea82b1809dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): core/services/worker/install.go:129-142 | core/services/worker/install.go:228-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/worker/install.go:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/worker/install.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a4c8160c879cc9e125a42b9194abfadb6c0cb5480ae95d520fa443d3944348f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 39): pkg/grpc/client.go:118-128 | pkg/grpc/client.go:136-146 | pkg/grpc/client.go:154-164 | pkg/grpc/client.go:218-228 | pkg/grpc/client.go:235-245 | pkg/grpc/client.go:252-262 | pkg/grpc/client.go:269-279 | pkg/grpc/client.go:286-296 | pkg/grpc/client.go:348-358 | pkg/grpc/client.go:365-375 | pkg/grpc/client.go:425-435 | pkg/grpc/client.go:448-458 | pkg/grpc/client.go:486-496 | pkg/grpc/client.go:520-530 | pkg/grpc/client.go:537-547 | pkg/grpc/client.go:554-564 | pkg/grpc/client.go:571-581 | pkg/grpc/client.go:588-598 | pkg/grpc/client.go:605-615 | pkg/grpc/client.go:622-632 | pkg/grpc/client.go:639-649 | pkg/grpc/client.go:656-666 | pkg/grpc/client.go:673-683 | pkg/grpc/client.go:690-700 | pkg/grpc/client.go:707-717 | pkg/grpc/client.go:724-734 | pkg/grpc/client.go:741-751 | pkg/grpc/client.go:758-768 | pkg/grpc/client.go:775-785 | pkg/grpc/client.go:792-802 | pkg/grpc/client.go:809-819 | pkg/grpc/client.go:826-836 | pkg/grpc/client.go:1126-1136 | pkg/grpc/client.go:1186-1196 | pkg/grpc/client.go:1203-1213 | pkg/grpc/client.go:1220-1230 | pkg/grpc/client.go:1237-1247 | pkg/grpc/client.go:1297-1307 | pkg/grpc/client.go:1334-1344 \u2014 all 39 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/grpc/client.go:118\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"pkg/grpc/client.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de35181bf8328bdc2e29d8427febba8978ac63d1f7840e16160c4796f5fd04d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 31): core/gallery/importers/ace-step.go:31-42 | core/gallery/importers/bark.go:45-56 | core/gallery/importers/chatterbox.go:27-38 | core/gallery/importers/coqui.go:27-38 | core/gallery/importers/depth-anything.go:35-46 | core/gallery/importers/faster-whisper.go:32-43 | core/gallery/importers/fish-speech.go:28-39 | core/gallery/importers/kitten-tts.go:26-37 | core/gallery/importers/kokoro.go:30-44 | core/gallery/importers/liquid-audio.go:32-43 | core/gallery/importers/locate-anything.go:43-54 | core/gallery/importers/longcat-video.go:53-63 | core/gallery/importers/moonshine.go:28-39 | core/gallery/importers/moss-transcribe-cpp.go:33-44 | core/gallery/importers/nemo.go:28-39 | core/gallery/importers/neutts.go:27-38 | core/gallery/importers/outetts.go:28-39 | core/gallery/importers/parakeet-cpp.go:34-45 | core/gallery/importers/piper.go:29-40 | core/gallery/importers/privacy-filter.go:39-50 | core/gallery/importers/qwen-asr.go:28-39 | core/gallery/importers/rerankers.go:39-50 | core/gallery/importers/rfdetr.go:58-69 | core/gallery/importers/sentencetransformers.go:33-44 | core/gallery/importers/silero-vad.go:29-40 | core/gallery/importers/stablediffusion-ggml.go:57-68 | core/gallery/importers/trellis2cpp.go:74-85 | core/gallery/importers/vibevoice.go:27-38 | core/gallery/importers/vllm-omni.go:42-53 | core/gallery/importers/voxcpm.go:27-38 | core/gallery/importers/whisper.go:30-41 \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 \u0060core/gallery/importers/ace-step.go:31\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/ace-step.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc56c9b8da984c9f35d5c1fa2d4420498e53bbed344916b5aa90d7828c876b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): pkg/grpc/client.go:170-180 | pkg/grpc/client.go:302-312 | pkg/grpc/client.go:381-391 | pkg/grpc/client.go:1142-1152 | pkg/grpc/client.go:1253-1263 | pkg/grpc/client.go:1313-1324 \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. The matched lines also transfer control out of the body holding them, 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":"pkg/grpc/client.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba886035ce97b3825d2d3824f9802aa02f50fcf6850bcaff94cdbf97465b78a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): backend/go/magpie-tts-cpp/audio.go:49-59 | backend/go/moss-tts-cpp/audio.go:53-63 | backend/go/omnivoice-cpp/audio.go:45-55 | backend/go/qwen3-tts-cpp/audio.go:45-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/magpie-tts-cpp/audio.go:49\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/magpie-tts-cpp/audio.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ea716fb393ea5c7d9ad6a12651750b8279fdc9839c0b9f083ebb41c678a6a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): core/gallery/importers/diffuser.go:23-33 | core/gallery/importers/mlx.go:24-34 | core/gallery/importers/transformers.go:23-33 | core/gallery/importers/vllm.go:33-43 \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":"core/gallery/importers/diffuser.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7ac382e073d18333b4d893f7a94b2b0e6c1af483e324a790d2441f54ea263b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): core/services/finetune/service.go:316-327 | core/services/finetune/service.go:413-423 | core/services/quantization/service.go:288-299 | core/services/quantization/service.go:384-394 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"2777107fe37d49afe84c8968c29519c8fa7643a654bac840a1239a3b3be4b5ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/go/face-detect/gofacedetect.go:121-131 | backend/go/voice-detect/govoicedetect.go:114-124 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 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":"backend/go/face-detect/gofacedetect.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"051c405d9275e84f353ffa161578eb100f300ed03689a4232d8cc345ada32d2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/go/omnivoice-cpp/gomnivoicecpp.go:156-166 | backend/go/omnivoice-cpp/gomnivoicecpp.go:217-227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/omnivoice-cpp/gomnivoicecpp.go:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/gomnivoicecpp.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa46c3f12d328724f57db196ef4d40bc7e478142e6bfe521c7a6bcdef6ea3ec0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/chat.go:140-150 | core/http/endpoints/openai/edit.go:33-43 \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 \u0060core/http/endpoints/openai/chat.go:140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c109ee3c0375e4f72af2e3d35b056b93d6ee99a3563816b4466615eaa89486"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/chat.go:587-597 | core/http/endpoints/openai/chat_stream_workers.go:377-388 \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 \u0060core/http/endpoints/openai/chat.go:587\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"b010558015f8ad14d3a828ab6b64303498a76fb9fefcdb6fe6318d849f0d6946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/realtime.go:2616-2628 | core/http/endpoints/openai/realtime_stream.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 \u0060core/http/endpoints/openai/realtime.go:2616\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":2616}}}],"partialFingerprints":{"codehealthFindingId/v1":"34db9e80cdcc44870525345f43dd0904b06d20d5036632e0790a983e5f8537a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:2168-2178 | core/http/endpoints/openresponses/responses.go:2623-2639 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:2168\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":2168}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0df5088cf64bf437e4af7bc15331226b0083f55586f424cac45cfa0027a6e76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/auth.go:763-773 | core/http/routes/auth.go:794-804 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc400b6f098a43f6f95a69cdcf1269b5cb7f4a72d1fb1afa20a521f7ea571b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/auth.go:780-790 | core/http/routes/auth.go:1119-1129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/auth.go:780\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/routes/auth.go"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5c0a38b09d572432794c9809763e6c2f3775519fd9db23c481c1f1990a42c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/facerecognition/store_registry.go:87-97 | core/services/voicerecognition/store_registry.go:84-94 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"core/services/facerecognition/store_registry.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a621ec6004cfe3cc5f48a1f2177149210b0220755646c24809a3ac5cbfc3a5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/finetune/service.go:257-267 | core/services/quantization/service.go:229-239 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/finetune/service.go:257\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/services/finetune/service.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"7501f701aecfa3fb07a0575ec2a7f138925fd812efd7f877664e572f545b1cc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/finetune/service.go:423-433 | core/services/finetune/service.go:499-509 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/finetune/service.go:423\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76ba5ead4a8d0742aa30b5d8c0971bb18f9930483b3415d39d1b8ce40a6491b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/finetune/service.go:572-582 | core/services/quantization/service.go:507-517 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"core/services/finetune/service.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bd1125f7c414c4c68db483595d42058454d3f60b40362efeba5fe5f3a8bb13b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/nodes/router.go:560-570 | core/services/nodes/router.go:626-636 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/router.go:560\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"641a2995e402b2f8a2ac4dbd6a93585bfc6f3c8cd84aabc1eaa61b7a7f026dbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/nodes/router.go:574-586 | core/services/nodes/router.go:640-650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/router.go:574\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/router.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f731eabdab145cd449c5b81b2fb41929c0d88dcaa966b440df0785927887c87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/routing/piiadapter/anthropic.go:58-68 | core/services/routing/piiadapter/openai.go:69-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 \u0060core/services/routing/piiadapter/anthropic.go:58\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/routing/piiadapter/anthropic.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"58fc877feb80667ebcc71426d43d61a21c5ab47392dcce91053182b3515d13d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/services/skills/filesystem.go:362-372 | core/services/skills/filesystem.go:458-468 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/skills/filesystem.go:362\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/skills/filesystem.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e45afc872cc66d1d9a49ed6298c25a398bd35fd498cfc54cc43ddfdc3fe71f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/functions/grammars/json_schema.go:276-286 | pkg/functions/grammars/llama31_schema.go:280-290 \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 \u0060pkg/functions/grammars/json_schema.go:276\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c175d98e40af18ebcad611823f4d02126bac404eea66d0cce3d608b6d21656f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/functions/peg/chat.go:170-181 | pkg/functions/peg_integration.go:355-365 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060pkg/functions/peg/chat.go:170\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a76a98d2a4c4b1f59112be08ea53253d32e681943b90faeb01866f05663f251"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/functions/peg/parser.go:692-702 | pkg/functions/peg/parser.go:757-767 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/parser.go:692\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"cadf7580c7198b9d6ef841e30221f52318c48efcaa3ec687efec691a0d417d84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/functions/peg_integration.go:324-334 | pkg/functions/peg_integration.go:390-400 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg_integration.go:324\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6585456c4d360bd1c9ff27948eb98efd5adb1899bf5af746d77d9752234e51f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/auth/middleware.go:113-123 | core/http/auth/middleware.go:155-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 \u0060core/http/auth/middleware.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":"core/http/auth/middleware.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"a69269d5b34438118b36121bd42be2c25d42ce2f7e42f20abff036c1f20531cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/auth/middleware.go:264-274 | core/http/auth/middleware.go:321-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/middleware.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8613ffa1b90427877fb0cf03089bd92d1844de5e877272a785cf15e1fcbb63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/auth/session.go:26-36 | core/http/auth/session.go:83-93 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/auth/session.go:26\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/auth/session.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"c70e9740a22e29c94f62c7813321c06d2da672b18221cc03b0b9384bb793c422"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/localai/face_register.go:26-36 | core/http/endpoints/localai/voice_register.go:26-36 \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 \u0060core/http/endpoints/localai/face_register.go:26\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/face_register.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"70dda763a25969201488791568c4cb0b1f0a7378737555a68f01873922cfc6c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/localai/finetune.go:41-51 | core/http/endpoints/localai/quantization.go:31-41 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.go:41\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e96c25d49d36b3e6891b1b6f4d932b2696ad3990be914665d274f3347349ff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/localai/finetune.go:70-80 | core/http/endpoints/localai/quantization.go:60-70 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8ee0184c7466ac0017fbf29ffd00e46aa4a6acce6c25d580ec9555ef9d1fa89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/localai/finetune.go:151-161 | core/http/endpoints/localai/quantization.go:138-148 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.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":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f39e1b386eaf11266df79ed8c9a44493227d59471a46ffc9a4b47a7249fe3dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/localai/mcp_prompts.go:102-112 | core/http/endpoints/localai/mcp_resources.go:89-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 \u0060core/http/endpoints/localai/mcp_prompts.go:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp_prompts.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f467165722e3cdd7c0f2367e7da3448a09772ca86540bacf62d6583af3cb7b1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/diarization.go:79-89 | core/http/endpoints/openai/sound_classification.go:51-61 \u2014 before extracting anything, compare \u0060core/http/endpoints/openai/diarization.go\u0060 and \u0060core/http/endpoints/openai/sound_classification.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"core/http/endpoints/openai/diarization.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"200a16bf1de14e5006c64a86452fdc7cab7ce6a8cb4183aa308e206b1ae4b555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/diarization.go:90-100 | core/http/endpoints/openai/sound_classification.go:62-72 \u2014 before extracting anything, compare \u0060core/http/endpoints/openai/diarization.go\u0060 and \u0060core/http/endpoints/openai/sound_classification.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/diarization.go:90\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"core/http/endpoints/openai/diarization.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"99ff507d978e335cd233ad322a72094924de5f1b9700b44d758ddfff7bebb9f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/endpoints/openai/list.go:19-30 | core/http/endpoints/openai/list_capabilities.go:24-34 \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 \u0060core/http/endpoints/openai/list.go:19\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/list.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"db35d3e60782e94be70d1b2584fa8dddad6c073a106aa158c9d7c739c8966b2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/anthropic.go:59-69 | core/http/routes/openai.go:75-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 \u0060core/http/routes/anthropic.go:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/anthropic.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"67c7e36f658befd672c5c3d8365ccc6a2a5bd1c56aa818bec3e8ef13323370d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ollama.go:28-38 | core/http/routes/ollama.go:46-56 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ollama.go:28\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ollama.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bebcc3e82a979ae13b5232122a22dcfba2d720113cc549d7f5c9ae11d902cb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ollama.go:100-110 | core/http/routes/ollama.go:142-152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ollama.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c555e6610b56ce684a807907597c94b07ed91b6ac79bb8d758648bdbc5ad09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ui_api.go:981-991 | core/http/routes/ui_api.go:1028-1039 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"560bdedc7abbf7f0c716648bd9a2c933878a5aac35b4c543ee441b1db16ad65d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ui_api.go:1025-1035 | core/http/routes/ui_api.go:1544-1554 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:1025\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f02143943d91130243eeafa0f8a388c8fb7130ca469782756376c3182d41fcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ui_api.go:1110-1120 | core/http/routes/ui_api.go:1144-1154 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:1110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/routes/ui_api.go"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd3f580fd0ce5478f222906dcc8874a88fa6c0ec013019b60201e16793df1b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ui_api.go:1436-1446 | core/http/routes/ui_api.go:1547-1558 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe89a75dce9610a3d3a478f211abfd09a07bbdb957e01b82d532fcc28414dd7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): core/http/routes/ui_api.go:1719-1729 | core/http/routes/ui_api.go:1746-1756 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:1719\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/routes/ui_api.go"},"region":{"startLine":1719}}}],"partialFingerprints":{"codehealthFindingId/v1":"495a2bd12ec2f38fa3f47629f5b92184a598e2ec1e3146cdb2f209e760b55a89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): core/http/endpoints/openresponses/responses.go:1817-1831 | core/http/endpoints/openresponses/responses.go:2131-2140 | core/http/endpoints/openresponses/responses.go:2166-2175 | core/http/endpoints/openresponses/responses.go:2253-2267 | core/http/endpoints/openresponses/responses.go:2621-2634 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cbbe1df5f7c2eaff9d124b85f17eb6b84aa9a67f956f1c36f7b541bd9a137af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): core/http/routes/localai.go:443-452 | core/http/routes/openai.go:187-197 | core/http/routes/openai.go:205-214 | core/http/routes/openai.go:222-231 | core/http/routes/openai.go:253-263 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/localai.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/localai.go"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0c56625c25132d602aae8bc8bf760d28cdf0be9650b347e0ececaa09744d5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): backend/go/face-detect/gofacedetect.go:422-431 | backend/go/moss-transcribe-cpp/gomosstranscribecpp.go:170-179 | backend/go/parakeet-cpp/goparakeetcpp.go:852-861 | backend/go/voice-detect/govoicedetect.go:264-273 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/face-detect/gofacedetect.go:422\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"backend/go/face-detect/gofacedetect.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb9bb2cc41d701568776bab7631066b5f2a0f70db768e972499f451636bdda6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): backend/go/crispasr/gocrispasr.go:634-643 | backend/go/omnivoice-cpp/audio.go:64-73 | backend/go/qwen3-tts-cpp/audio.go:64-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/crispasr/gocrispasr.go:634\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"9648a23f8d012d894bcd7578311b192e9c510a8f00ec73dc07859377ca323cea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): core/services/modeladmin/config.go:65-74 | core/services/modeladmin/pinned.go:24-33 | core/services/modeladmin/state.go:33-42 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/modeladmin/config.go:65\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/modeladmin/config.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"e095eea68f4fc0cd1ae3ea1d9277cb46dc06a7d64d37b555c572be6762857714"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/go/moss-tts-cpp/gomossttscpp.go:171-182 | backend/go/moss-tts-cpp/gomossttscpp.go:201-210 \u2014 both copies are in the same file, so extract the block 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":"backend/go/moss-tts-cpp/gomossttscpp.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df9bbd94b73994006d0ee82efe3c6fa17d25e24b265d500ea711d49ec6c137c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/go/omnivoice-cpp/audio.go:105-114 | backend/go/qwen3-tts-cpp/audio.go:105-114 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/audio.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d3680c958474f97bf206e7bc6d96d5503dc300da1ed499ca0e64655c9c6349"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/go/omnivoice-cpp/gomnivoicecpp.go:86-95 | backend/go/qwen3-tts-cpp/goqwen3ttscpp.go:86-95 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060backend/go/omnivoice-cpp/gomnivoicecpp.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/gomnivoicecpp.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9d788443d38312fdb737fa4929103bd12275c473f6081b02ed6277bac2e3ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): backend/go/sherpa-onnx/backend.go:1110-1119 | backend/go/sherpa-onnx/backend.go:1196-1205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/sherpa-onnx/backend.go:1110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a88e9a6bd187981e86fb4a499743279b73ecee9f63eb1c2ff1ddee5918dffd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/launcher/internal/launcher.go:760-769 | core/services/nodes/file_stager_http.go:635-644 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/launcher/internal/launcher.go"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a0409a25b5d29b9c6202827cc8ef548acd0d2b0be82e57d8b07824ff038e4b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/backend/transcript.go:104-113 | core/backend/transcript.go:132-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 \u0060core/backend/transcript.go:104\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/backend/transcript.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a79351f06ea5a85c119cda08a5ccd38b3d2e21dece71b83eb289b2b27337c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/cli/backends.go:120-129 | core/cli/models.go:121-130 \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 \u0060core/cli/backends.go:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/backends.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f7ef73e7c7ac24f10474ca3bfd053cde3825370e5ce4664bc625cbe3e132334"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/config/hardware_defaults.go:364-373 | pkg/xsysinfo/gpu.go:465-474 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/config/hardware_defaults.go:364\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/config/hardware_defaults.go"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"d500a9938184264c0bd6a5dbc8e2cdb76e01eebc2b09a40a05e36765911c7ae4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/gallery/importers/rerankers.go:107-116 | core/gallery/importers/sentencetransformers.go:97-106 \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 \u0060core/gallery/importers/rerankers.go:107\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/gallery/importers/rerankers.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0592fb3f539869ccfec1cdf90a6f24f771e8187a33d47bfbf50ed637e5509d44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/app.go:296-305 | core/http/explorer.go:28-37 \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 \u0060core/http/app.go:296\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/app.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"288df30732f1787399cc3d2b75569e755c193e58eecfc0fab0639ccff31113d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/elevenlabs/soundgeneration.go:54-64 | core/http/endpoints/elevenlabs/tts.go:41-50 \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 \u0060core/http/endpoints/elevenlabs/soundgeneration.go:54\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/elevenlabs/soundgeneration.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"155fb92cacf8f449bb70778495c67e247749988823c3c4a51fe96b6779198186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/api_instructions.go:269-279 | core/http/endpoints/localai/api_instructions.go:333-342 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/api_instructions.go:269\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/api_instructions.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"216bb4498509cf7e3552a2cd178551922eaec0c953b9f611099e02f76f928206"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/backend.go:233-245 | core/http/endpoints/localai/backend.go:324-333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/backend.go:233\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/backend.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c752fa40783d2471fbedae9fb1951e6daa453827428d403b60990e76cb8a3b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/branding.go:224-233 | core/http/endpoints/localai/branding.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 \u0060core/http/endpoints/localai/branding.go:224\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/branding.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c23ea7e7545e2a118ced8ab75dea8d6da49c065cf7068a835cdabe4249ba27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openai/chat.go:396-405 | core/http/endpoints/openai/chat.go:678-687 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/chat.go:396\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb46db20ede4c300020efe24c5eb1a4b6137eff3b71852b1f814ebc2ba78b6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openai/chat_emit.go:132-142 | core/http/endpoints/openai/chat_emit.go:218-227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/chat_emit.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat_emit.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"659aff8d396a3bc2eeb948b5bc54bf5e380268c337adffb9475d9aa14a18e48a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openai/realtime_model.go:760-769 | core/http/endpoints/openai/realtime_model.go:770-779 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"81dd906dc2ac0132151bed7771d6fe3b654dedbe150f017b4e466b4249683cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:909-918 | core/http/endpoints/openresponses/responses.go:1434-1444 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:909\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac40e6c0985bb200c82962956b90d5e7cab40f2f09c0c129a601401c6dcfc579"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1207-1216 | core/http/endpoints/openresponses/responses.go:1237-1246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0cea25d61fcc2096608dfd15c318a2113affbeda1c78231186739cf40d9326c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/agentpool/agent_config_distributed.go:55-64 | core/services/agentpool/agent_config_distributed.go:72-81 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/agentpool/agent_config_distributed.go:55\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_config_distributed.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1464331d32c31344f26a4a52721b82ec89f2e4934df2ab8485811efd316f3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/cloudproxy/mitm/proxy.go:186-195 | core/services/cloudproxy/mitm/proxy.go:227-236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"core/services/cloudproxy/mitm/proxy.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"518da96add26093f8b2c5f0c8b8a8f4c5c06f0bd4b6cb02bd6b3197f62c9f80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/distributed/finetune.go:98-107 | core/services/distributed/quant.go:88-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 \u0060core/services/distributed/finetune.go:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/services/distributed/finetune.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"305951698a30034f5c8c1de2a197f8540aa5d1bda685077b6ae8d8c0493c6e50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/finetune/service.go:281-290 | core/services/quantization/service.go:253-262 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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. 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":"core/services/finetune/service.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b22d38758e5aa7d41bd36ed040246a7348aa893499fe78ba0ff178883e9a8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/galleryop/models.go:97-106 | core/services/galleryop/backends.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 \u0060core/services/galleryop/models.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 transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/models.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"826009753c4472f66cdb7475ec98acff7493c3f63d17c337cdeaaebcb498d9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/messaging/client.go:239-248 | core/services/messaging/client.go:255-264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/messaging/client.go:239\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/messaging/client.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"659af00240f3b13a13509c78d3d5a21c77ffccbc344a028a9cdbfd4a79d6f2cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/services/nodes/registry.go:1714-1726 | core/services/nodes/registry.go:1746-1755 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/registry.go:1746\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/registry.go"},"region":{"startLine":1714}}}],"partialFingerprints":{"codehealthFindingId/v1":"822acf317a1bfcdb334c453eb9c3eb0e44f1bc83a96bbdcbcd1bfc4a9bd35e08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/downloader/uri.go:865-874 | pkg/oci/image.go:143-152 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/downloader/uri.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"35ab9e9b2637d7bb42ff8e3eb5b153b4c79e6b660aab058f4bbaaf941ea36508"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/functions/grammars/json_schema.go:179-188 | pkg/functions/grammars/llama31_schema.go:172-181 \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 \u0060pkg/functions/grammars/json_schema.go:179\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"97465d4e9ad635242f4e7ed982848393d487c4af3a92e138b883403e31eb18a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/functions/iterative_parser.go:1033-1042 | pkg/functions/iterative_parser.go:1061-1070 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/iterative_parser.go:1033\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1033}}}],"partialFingerprints":{"codehealthFindingId/v1":"33c21724b2276d24313e14eab873022b3250196a1eaf79025349eb7acb593e1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/functions/peg/parser.go:646-655 | pkg/functions/peg/parser.go:662-671 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/parser.go:646\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d17cae692a001f61ea030283085ff334288ff5033ad36333543d373cf17de3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/model/watchdog.go:378-387 | pkg/model/watchdog.go:388-397 \u2014 both copies are in the same file, so extract the block 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":"pkg/model/watchdog.go"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e368d66e4387a7c14ec3f3a5426964a95f9bb1b2a03a89ea99a064ff6b16f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/oci/cosignverify/verify.go:318-327 | pkg/oci/image.go:38-47 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/oci/cosignverify/verify.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73ee5942d414ca73f48668ac0a15de5ad8f7396de97010e3c88c99c18e45a62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/finetune.go:28-37 | core/http/endpoints/localai/quantization.go:23-32 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.go:28\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b03b6118f3c73f61a8077d077103ce4e07c5a7a114efa288ad6452a28657c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/finetune.go:117-126 | core/http/endpoints/localai/quantization.go:104-113 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.go:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e413c6ec64af8ef6c78e2b9fedc5b187aabffa0c1dbdf828aeaf2689259e7837"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/mcp_resources.go:30-39 | core/http/endpoints/localai/mcp_resources.go:93-102 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp_resources.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04d75402dbcf27390f3dfbba11b7cc54c09740663bfc302fc647faa7fe89c82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/localai/mcp_tools.go:52-61 | core/http/endpoints/localai/mcp_tools.go:102-111 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/mcp_tools.go:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp_tools.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0d25a5705609708f1f3f52d28b441398bd324a7acde6eee9675286049758266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/ollama/chat.go:45-54 | core/http/endpoints/ollama/generate.go:72-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 \u0060core/http/endpoints/ollama/chat.go:45\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/ollama/chat.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"530d3286d4a36ce4f4e16f1745fcddabeea4f82bf5be238fcf40feb6d05a2757"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openai/diarization.go:54-63 | core/http/endpoints/openai/sound_classification.go:37-46 \u2014 before extracting anything, compare \u0060core/http/endpoints/openai/diarization.go\u0060 and \u0060core/http/endpoints/openai/sound_classification.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/diarization.go:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/diarization.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e4e2e42dcc9de3754a924400379dee8169e26837e23d7b075f3b1f4481c4a89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/endpoints/openai/inpainting.go:169-178 | core/http/endpoints/openai/upscale.go:88-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 \u0060core/http/endpoints/openai/inpainting.go:169\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/inpainting.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4ee4f10ceeeb2c55f2080f700b63195058c701815336267790d139f644e9a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): core/http/routes/ui_api.go:445-454 | core/http/routes/ui_api.go:1261-1270 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c5f80e656e60d0b34db44082978af734f4e252f51fe7057b0daaff736d59665"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 14): backend/go/acestep-cpp/main.go:34-49 | backend/go/crispasr/main.go:60-68 | backend/go/depth-anything-cpp/main.go:39-64 | backend/go/localvqe/main.go:33-64 | backend/go/locate-anything-cpp/main.go:39-61 | backend/go/magpie-tts-cpp/main.go:33-51 | backend/go/moss-tts-cpp/main.go:33-49 | backend/go/omnivoice-cpp/main.go:33-50 | backend/go/qwen3-tts-cpp/main.go:33-50 | backend/go/rfdetr-cpp/main.go:39-63 | backend/go/sam3-cpp/main.go:33-58 | backend/go/stablediffusion-ggml/main.go:33-65 | backend/go/vibevoice-cpp/main.go:33-52 | backend/go/voxtral/main.go:34-50 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 14 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 14 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/acestep-cpp/main.go:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/acestep-cpp/main.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d16f05ec57bef54a9c1b646c421836548acc23c26d026260d53290c3d704718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): core/http/endpoints/openai/chat.go:336-346 | core/http/endpoints/openresponses/responses.go:214-224 | core/http/endpoints/openresponses/websocket.go:279-287 \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 \u0060core/http/endpoints/openai/chat.go:336\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"a917cbabfd9aa3b975bd4e9d6728ac9d5981724df09a3cd0b347f7b98cfa818d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): core/services/nodes/file_transfer_server.go:91-99 | core/services/nodes/file_transfer_server.go:778-786 | core/services/nodes/file_transfer_server.go:791-801 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bce78f06eba352980ce8d13cf9c9f89283d1a171a62bdf7af0076da8d28bfe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): core/http/routes/openai.go:108-116 | core/http/routes/openai.go:130-138 | core/http/routes/openai.go:167-175 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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":"core/http/routes/openai.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ee47881953a90a366a5ac42448f1f8bceaf4765647bbd72f10e429437dea01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): core/http/routes/ui_api.go:1706-1714 | core/http/routes/ui_api.go:1718-1726 | core/http/routes/ui_api.go:1745-1753 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:1706\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e8d9d888c05a27f257b27f2abff34a54e92649c241b3733b2925d01c0526dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/cloud-proxy/provider_anthropic.go:403-411 | backend/go/cloud-proxy/provider_openai.go:180-188 \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":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6b5d0f10f2cd6d7c888baf6c9faf71f2cde9d06ed551bd9eef11eb912156d0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/crispasr/gocrispasr.go:260-268 | backend/go/whisper/gowhisper.go:187-195 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/crispasr/gocrispasr.go:260\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"backend/go/crispasr/gocrispasr.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed0c2bc20c21a19656e95fa35edd80188b401aa72a17d5adf82a5f986dc936ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/localvqe/golocalvqe.go:503-511 | backend/go/parakeet-cpp/goparakeetcpp.go:802-810 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/localvqe/golocalvqe.go:503\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc1c9e418652dc778447338aad29f291da766ed092880edf0a2c1e123bea87d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/moss-transcribe-cpp/gomosstranscribecpp.go:80-88 | backend/go/parakeet-cpp/goparakeetcpp.go:209-217 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060backend/go/moss-transcribe-cpp/gomosstranscribecpp.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/moss-transcribe-cpp/gomosstranscribecpp.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"96bfbacf803f07fa2b9483ba083577929cfbead3b5c8c4d56f19a4c61b225b87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/sherpa-onnx/backend.go:1370-1378 | backend/go/supertonic/backend.go:288-296 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"backend/go/sherpa-onnx/backend.go"},"region":{"startLine":1370}}}],"partialFingerprints":{"codehealthFindingId/v1":"16fb4fcf336e665107a23824f3b945fc78041962166f3e29205e951cea3509f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/go/supertonic/backend.go:287-295 | pkg/sound/float32.go:17-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060backend/go/supertonic/backend.go:287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/supertonic/backend.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbdd9597fb42427b9abf327d418c007d75a7e6077fd0e4d9e8ccb0ad2bb4d348"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/cli/transcript.go:104-112 | core/http/endpoints/openai/transcription.go:202-210 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/cli/transcript.go:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/transcript.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"36eb4f9647853cefe779482ca0b75c875ff2c0c21fbae269a8f0628011876483"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/localai/agent_skills.go:138-146 | core/http/endpoints/localai/agent_skills.go:180-188 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_skills.go:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_skills.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cbf66d94491e474aa26f2ed91c6af633399fa14365106d8b4b06f5f8756ca2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/localai/branding.go:247-255 | core/http/endpoints/localai/branding.go:290-298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/branding.go:247\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/branding.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"73386d1aefe029120570925f53e12ec5ac9b3bd0a6079d07de19681add9fcb21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/localai/nodes.go:666-674 | core/http/endpoints/localai/nodes.go:694-702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/nodes.go:666\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"579a25314dc0d8ab5ab86db18248b875e5a6a420601ee5d8b1b1ba0ac9068e2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/localai/nodes.go:725-733 | core/http/endpoints/localai/nodes.go:755-763 \u2014 both copies are in the same file, so extract the block 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":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"13248575bc80dbffbe5ed8726804e7035f891c1c86fd8cd40a33612ee8c57b7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openai/chat.go:526-538 | core/http/endpoints/openresponses/responses.go:909-917 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/openai/chat.go:526\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2a5ae7d59cd63500c3070e76d89da0e926b7c8d636a023d657c22218d63ee7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openai/chat_emit.go:119-127 | core/http/endpoints/openai/chat_emit.go:203-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":"core/http/endpoints/openai/chat_emit.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"3000f0ed7852a71c3cd2480c308317f8b7b7e129d5896b27eeee6af6c1532604"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openai/chat_emit.go:253-261 | core/http/endpoints/openai/chat_emit.go:276-284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/chat_emit.go:253\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat_emit.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b9a1bc088b4a973fb61e29fa8e2fb2947dca693608d49b639f82cdabb6e63a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:976-984 | core/http/endpoints/openresponses/responses.go:1532-1540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:976\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce89f26b5063746c9293f3d758425e9eac8ffa6c176be5bb88052e835828f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1331-1339 | core/http/endpoints/openresponses/responses.go:1627-1636 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1331}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8acd1d8f2fec626311aeb54be9bfff6ed92d2b2b2b9e4112ae50d8bdcff260a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:3126-3134 | core/http/endpoints/openresponses/responses.go:3137-3145 \u2014 both copies are in the same file, so extract the block 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":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":3126}}}],"partialFingerprints":{"codehealthFindingId/v1":"df71cbe6b21c2366cbede5aff9abaf2793f822c964d95ca79fac877ca76d1167"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/middleware/request.go:651-659 | core/http/routes/anthropic.go:96-104 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/middleware/request.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a23dc66046ad7b15fb987394839657c8c16a7f43b451c4f763372e489799500"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/finetune/service.go:535-543 | core/services/quantization/service.go:462-470 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/finetune/service.go:535\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa584eec95ad2d644e7ed83400f3d69de4a85fb7134bb3297341e32d3deb008"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/finetune/service.go:711-719 | core/services/quantization/service.go:624-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/finetune/service.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb42a0a4d465be36ed080419105efc3a01ebd1ada8fb5c8646c72e5c5035105"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/finetune/syncstore.go:102-110 | core/services/quantization/syncstore.go:102-110 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/finetune/syncstore.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":"core/services/finetune/syncstore.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f955a6ba0006d3a1cf9a777b6749fd998705e6233354d239634b5ea22a563529"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/galleryop/service.go:425-433 | core/services/galleryop/service.go:484-492 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/galleryop/service.go:425\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a012434c9f47351f257027a3b89f56a98264c70ec0a48c5982be5d49191c2918"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/nodes/file_stager_http.go:556-564 | core/services/nodes/file_transfer_server.go:544-552 \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 \u0060core/services/nodes/file_stager_http.go:556\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_stager_http.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"94126ead491da5004c3fb868199d8f06f61397cd4a596eac2cea100f4ace797f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/nodes/managers_distributed.go:294-302 | core/services/nodes/managers_distributed.go:317-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 \u0060core/services/nodes/managers_distributed.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/managers_distributed.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a0181a6f4ad329f513f7064833ae27bec3c0a178344c1859789752fac22f5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/audio/audio.go:61-69 | core/backend/tts.go:222-230 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"pkg/audio/audio.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ed1545f95eab7319be91dacfb610863880ff7d829d3a830d7a8062187c0e3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/functions/iterative_parser.go:1090-1098 | pkg/functions/iterative_parser.go:1112-1120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/iterative_parser.go:1090\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3ab01a9343503aea8435f5f08b30d621b089560fabd0fc9ebde816a2a3df2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/localai/pii.go:174-182 | core/http/endpoints/localai/pii.go:213-221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/pii.go:174\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/pii.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c055600ac96b534a7e387d0625333e469fd9a097d383efb4911f3953689e80a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/ollama/chat.go:73-81 | core/http/endpoints/ollama/generate.go:106-114 \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 \u0060core/http/endpoints/ollama/chat.go:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/ollama/chat.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9612964461e49b2b374c4a28d789aad4bc725f8926da68e23ef7c01971f576ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/http/endpoints/openai/completion.go:261-270 | core/http/endpoints/openai/edit.go:54-62 \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 \u0060core/http/endpoints/openai/completion.go:261\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/completion.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"a748f4906ec9621b15fee794bbd9eef29888c9b1dfa6d0d68aefcd353bfb1229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): core/services/galleryop/backends.go:167-175 | core/services/galleryop/backends.go:181-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/galleryop/backends.go:167\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/backends.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"a861f596152a1c38e63384869508a751073808e99ab6133c34d2ba85b96d3d9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/mcp/localaitools/prompts.go:26-34 | pkg/mcp/localaitools/prompts.go:67-75 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/mcp/localaitools/prompts.go:26\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"pkg/mcp/localaitools/prompts.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f366323ad90656502ce585665b78e8c037f56454afbbc815ccc0b20cba0f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): core/http/endpoints/localai/mcp.go:72-79 | core/http/endpoints/openai/diarization.go:54-61 | core/http/endpoints/openai/sound_classification.go:37-44 \u2014 before extracting anything, compare \u0060core/http/endpoints/openai/diarization.go\u0060 and \u0060core/http/endpoints/openai/sound_classification.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/mcp.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"15e1c8e9d7dc58e51fc8f2db029fde4242d544b620d01d0af4168b5742546183"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): core/http/endpoints/openai/completion.go:93-100 | core/http/endpoints/openai/embeddings.go:52-59 | core/http/endpoints/openai/transcription.go:62-69 \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":"core/http/endpoints/openai/completion.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde02e9e9ab3a1c1ac7c04820d3fcfe0d782f1f9da298801f12c2c92cf5b3e5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): core/http/routes/middleware.go:34-41 | core/http/routes/middleware.go:79-89 | core/http/routes/pii.go:48-56 \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":"core/http/routes/middleware.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"21888e554b17b6d158ecc6bd413f50c313a4cac4d0fb5b5128ecbbb56715644b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/cloud-proxy/provider_anthropic.go:427-434 | backend/go/cloud-proxy/provider_openai.go:204-211 \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 \u0060backend/go/cloud-proxy/provider_anthropic.go:427\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aac476e6e8803ea4127fdb52f5f62a21ad0641cb001676a6de6a6a113475233"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/cloud-proxy/provider_anthropic.go:486-493 | backend/go/cloud-proxy/provider_openai.go:254-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 \u0060backend/go/cloud-proxy/provider_anthropic.go:486\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"backend/go/cloud-proxy/provider_anthropic.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"01acf024baba96918de1a68a85bd698ae4ec6cb94b53a0d5ab4a804aa83fbfd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/moss-transcribe-cpp/gomosstranscribecpp.go:147-154 | backend/go/parakeet-cpp/goparakeetcpp.go:778-785 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/moss-transcribe-cpp/gomosstranscribecpp.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":"backend/go/moss-transcribe-cpp/gomosstranscribecpp.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"68eb9e08f0269905f3d84dcd594c68943b4a3fbc2976b8d7399ec15c2b3d2faf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/omnivoice-cpp/audio.go:24-31 | backend/go/qwen3-tts-cpp/audio.go:24-31 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"backend/go/omnivoice-cpp/audio.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"5532c570d1b41345706e19f544a4172e3f53f6b3046aeec79f5fee74aa8a7969"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/omnivoice-cpp/gomnivoicecpp.go:60-70 | backend/go/qwen3-tts-cpp/goqwen3ttscpp.go:63-70 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/omnivoice-cpp/gomnivoicecpp.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c63818ee7f2f45e445bcc47c841c06a7d8c3202e7b26451eb62d838e4c5ed3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/go/whisper/gowhisper.go:251-260 | backend/go/whisper/gowhisper.go:372-379 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/whisper/gowhisper.go:251\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/whisper/gowhisper.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f906d8c9e25ffd8a36542798a4ecfa829deab33eda97babb7e3c908c68846aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/backend/diarization.go:54-61 | core/backend/sound_classification.go:39-46 \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 \u0060core/backend/diarization.go:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/backend/diarization.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f92508f5daa1dfb5693e5db492ac2374754786ff6c7b574c98d2fa3268645e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/backend/rerank.go:63-71 | core/backend/transcript.go:57-64 \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 \u0060core/backend/rerank.go:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/backend/rerank.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"b13c0a5834621ab82da05a98d0b6b19e9e4b11a4256fa0ec46d2a63c5f88e113"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/agent_skills.go:337-344 | core/http/endpoints/localai/agents.go:372-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 \u0060core/http/endpoints/localai/agent_skills.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 transfer control out of the body holding them, 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":"core/http/endpoints/localai/agent_skills.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"0db769ae09bc1b496bd3d12ea29f51872a2f5fd7ce2f215ed1f53879a91c3284"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/backend_logs.go:113-122 | core/services/nodes/file_transfer_server.go:833-840 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"core/http/endpoints/localai/backend_logs.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2604d461531b8bfdbb91e438518064ff758aff6ff217ad260f4d63179a2ca2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/nodes.go:737-744 | core/http/endpoints/localai/nodes.go:768-775 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/nodes.go:737\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d395733769118005f209984e1f3246327e30b4e2786da693229fb2535727e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/nodes.go:749-756 | core/http/endpoints/localai/nodes.go:795-802 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/nodes.go:749\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"0121d739fec50b76ba14c629611509d04c17bde309bcb0ebb5165437480147ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openai/chat.go:549-556 | core/http/endpoints/openai/chat.go:970-977 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/chat.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3619fe49070f1ff398f0e9b63ddb3eb0a18747ef1173c35fb36fbec9975de06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openai/chat.go:972-981 | core/http/endpoints/openresponses/responses.go:1457-1464 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/chat.go:972\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/chat.go"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"b846f460d41f288ec5984e0f255a72a5bb2f20c56d378c76793204d9d11ae27b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openai/realtime.go:918-925 | core/http/endpoints/openai/realtime.go:1018-1025 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/realtime.go:918\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70b3ad1a81bba0595dcb03f254757ef4fea3f5d03a8850dcfa979837b18e3d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openai/realtime_model.go:204-212 | core/http/endpoints/openai/realtime_model.go:307-314 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openai/realtime_model.go:204\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime_model.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"d409a555e0fc8f62e1ed0da16141a423393c2288f803850ddb56f2b7f9802ad1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1178-1185 | core/http/endpoints/openresponses/responses.go:1266-1279 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:1178\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"902039c70a1f8a19d709dbdb9c65f47e339863edaa14d1c5d6869c72f26c0b99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:1582-1589 | core/http/endpoints/openresponses/responses.go:2312-2319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d9bdf756c53a8dad851c39a47ec99a004dee12d7c1997204788989710b53b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/services/facerecognition/store_registry.go:54-61 | core/services/voicerecognition/store_registry.go:52-59 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/facerecognition/store_registry.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ed3ec377530eadfb9a62cd944a1aeb8f03b6158b5c2ccbac077dfbf9ddf777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/services/facerecognition/store_registry.go:66-73 | core/services/voicerecognition/store_registry.go:64-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 \u0060core/services/facerecognition/store_registry.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 transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/facerecognition/store_registry.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eff3a7501b76dc3b00d1233bd6b899bc92750adfe2c74c1796fdbc30ca89b8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/services/finetune/service.go:375-382 | core/services/quantization/service.go:346-353 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/services/finetune/service.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":"core/services/finetune/service.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9992af4956b2fce29a86f44142f990b80a6aa32b658a4422ff18b8fcdcecb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/services/nodes/file_staging_client.go:249-260 | core/services/nodes/file_staging_client.go:292-299 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/file_staging_client.go:249\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_staging_client.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"999cae3860145767a8e3eecfa300b8033bf43fe071431a1dad9798ed94683e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/functions/grammars/json_schema.go:165-172 | pkg/functions/grammars/llama31_schema.go:153-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 \u0060pkg/functions/grammars/json_schema.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"e913ccb7099fcf618e2362a1dd0e8d18a69f1e748eb80c79112054cbe69ed011"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/functions/iterative_parser.go:912-919 | pkg/functions/iterative_parser.go:931-938 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4bb152dfd2cd5f699653626849ea980811937a29c6694eb0cd99624eab0971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/functions/iterative_parser.go:1140-1147 | pkg/functions/iterative_parser.go:1168-1176 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/iterative_parser.go:1140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b37714e7b203599bb41ca9d98a929b9459e380ca771e2f4508211c67f92f7d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/functions/peg/parser.go:461-468 | pkg/functions/peg/parser.go:511-518 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/parser.go:461\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/parser.go"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"704d07dfc60c4f1095dedfd80afb9e29f0e1f76ff4d110af94e854391e63c4d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/application/startup.go:596-603 | core/application/watchdog.go:96-107 \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 \u0060core/application/startup.go:596\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/application/startup.go"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e560aaa0b3912b8ed70a73fdea42106aafbee54b831a4f9e66e79e455500ab1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/agent_jobs.go:214-221 | core/http/endpoints/localai/agent_jobs.go:414-421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_jobs.go:214\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"7406308dbf14ee6a09184ff02d092450e38561aeb61b1080aeca2556c6581b10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/finetune.go:135-142 | core/http/endpoints/localai/quantization.go:122-129 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.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":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c21f43e9229d5c1e75f5c536d54209f1105d6b090c12916855730e1040badc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/http/endpoints/localai/finetune.go:196-203 | core/http/endpoints/localai/quantization.go:164-171 \u2014 before extracting anything, compare \u0060core/http/endpoints/localai/finetune.go\u0060 and \u0060core/http/endpoints/localai/quantization.go\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060core/http/endpoints/localai/finetune.go:196\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/finetune.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"dada1d6feddd730a3f03100559565000b85d65389b02e2123af54e17e3bb06c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): core/services/galleryop/backends.go:179-186 | core/services/galleryop/backends.go:201-208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/galleryop/backends.go:179\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/backends.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82f8b4f13a3d1e715d651a481d16c882c26ce1a037457d41292300649e0868b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): core/http/endpoints/openresponses/responses.go:949-955 | core/http/endpoints/openresponses/responses.go:974-980 | core/http/endpoints/openresponses/responses.go:1483-1493 | core/http/endpoints/openresponses/responses.go:1528-1536 \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 \u0060core/http/endpoints/openresponses/responses.go:949\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"4316fbf0e31e9eac4df5e4b5718bae76b2500721b520c32bd9553691a18ec82d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): core/http/routes/auth.go:419-425 | core/http/routes/auth.go:471-477 | core/http/routes/auth.go:625-631 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/auth.go:419\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/http/routes/auth.go"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b89bb5b4e06517a1da2e4b28e16f071951ee67d33bb18dfbffecbad45f6138b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): core/http/routes/auth.go:997-1003 | core/http/routes/auth.go:1021-1027 | core/http/routes/auth.go:1059-1065 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/auth.go:1059\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f371baddf83a4a34685719c8b246a4ea8ed96b48fab60516de64b2d49210772"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/go/face-detect/gofacedetect.go:222-228 | backend/go/voice-detect/govoicedetect.go:154-160 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/face-detect/gofacedetect.go:222\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/face-detect/gofacedetect.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"146214ef98ce436ddb8ce4e03c58ef2ccb7295fc43b7d8a64b770cf9621c4bf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/go/magpie-tts-cpp/audio.go:26-32 | backend/go/moss-tts-cpp/audio.go:30-36 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/go/magpie-tts-cpp/audio.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"25071a76a533e2242cb02012e41c3ea1354e99a0aaecf538ecd86f54d370e639"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/go/trellis2cpp/trellis2.go:424-430 | backend/go/trellis2cpp/trellis2.go:495-501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/go/trellis2cpp/trellis2.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. 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":"backend/go/trellis2cpp/trellis2.go"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a57f84bebb59b4671dae966956f637a754c96232b26dee133cbb21197f4520"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/cli/completion.go:188-194 | core/cli/completion.go:281-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 \u0060core/cli/completion.go:188\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/completion.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"85b315ba8d994821c0822e5a94ac2d4ef0889247428c061c0ae79d390f55fed9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/cli/worker/worker_ds4.go:49-55 | core/cli/worker/worker_backend_common.go:30-36 \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 \u0060core/cli/worker/worker_ds4.go:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/cli/worker/worker_ds4.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9fff971b666c0a941abbde671d8b8fac4efb3dca29a8ca0eb288369d8f32a8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/localai/agent_collections.go:74-80 | core/http/endpoints/localai/agent_skills.go:237-243 \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 \u0060core/http/endpoints/localai/agent_collections.go:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/agent_collections.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"819286f48fd46bd77d10e316c204b4ca64b6ddedb9e29e16ba6f33f53d09e525"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/localai/agent_skills.go:233-239 | core/http/endpoints/localai/agent_skills.go:325-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_skills.go:233\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_skills.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2e837a45a3332635799f921f3420f3acb96ab2bac56584a880d4b002157741"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/localai/backend_logs.go:39-45 | core/services/nodes/file_transfer_server.go:905-911 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, 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":"core/http/endpoints/localai/backend_logs.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"9096c19c56bcd6fc85e0004f445094f4e64ddbf09212a1d70b086e5b7db3476a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/mcp/tools.go:222-228 | core/http/endpoints/mcp/tools.go:304-310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"794abedb65682c5000abe35c518b1ecdfc28de5be51bca1a1933f0bcb00b3472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/mcp/tools.go:242-248 | core/http/endpoints/mcp/tools.go:327-333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/mcp/tools.go:242\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/mcp/tools.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1957c33f0c385dc6d7db8016726a3f22d3541e850ac02d098b1df7c8380a85b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/openai/realtime.go:2640-2650 | core/http/endpoints/openai/realtime_stream.go:132-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 \u0060core/http/endpoints/openai/realtime.go:2640\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":2640}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cede5593030277ee6806c91fc6c4a4ea60a27d7c37b4d9651bff2fefd1a3496"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:835-841 | core/http/endpoints/openresponses/responses.go:1331-1337 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead8fb131ed40eede89f3dbbe506422d28cbd40a6ffb31a4ed5fd3d2b69d0f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/openresponses/responses.go:931-937 | core/http/endpoints/openresponses/responses.go:1224-1231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/openresponses/responses.go:931\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openresponses/responses.go"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d97c961da30f001ce8f8ecfdad9d4abadef3550d716b9cd5a89f6390a654233"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/routes/auth.go:232-238 | core/http/routes/auth.go:472-479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/auth.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. The matched lines also transfer control out of the body holding them, 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":"core/http/routes/auth.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"95921c11e2ae4bcd834e3c15c8b56666e3a76cc850774af3283234d15871dc8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/routes/auth.go:324-330 | core/http/routes/auth.go:945-951 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/auth.go:324\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"core/http/routes/auth.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1566d3a5d606c9723751a1c5c6ad6fbc1769ed6269c24fc7b5484ede17ab52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/services/agentpool/agent_pool.go:873-879 | core/services/agentpool/agent_pool.go:1040-1046 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/agentpool/agent_pool.go:873\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agentpool/agent_pool.go"},"region":{"startLine":873}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb2a63e4d4375c974f891eea9acf83be873d6f547c1449bddf5770bab8e7c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/services/finetune/service.go:387-393 | core/services/quantization/service.go:358-364 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/finetune/service.go:387\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/finetune/service.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f343a45e370aed1fbbc2ec8a0ac3360e1b363dcbe7bf4a19f13fcac0962cdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/services/galleryop/service.go:593-599 | core/services/galleryop/service.go:636-642 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/galleryop/service.go:593\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/galleryop/service.go"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f0b15ae17c8b504affd623e4bab4018f0030b1a25fd8fea5418859698b38925"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/services/nodes/file_stager_s3.go:116-122 | core/services/nodes/file_stager_s3.go:173-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 \u0060core/services/nodes/file_stager_s3.go:116\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_stager_s3.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24f7b896a1fbefa963838ff410ec1fbe39dc99bc6551c83f8559883cf9bee52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/services/skills/filesystem.go:380-386 | core/services/skills/filesystem.go:471-477 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/skills/filesystem.go:380\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/skills/filesystem.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4e722b8669378c2a57b22e0436119b5614d3e30a4e41ca2ef9b451e2a7df8c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/functions/grammars/json_schema.go:232-238 | pkg/functions/grammars/llama31_schema.go:256-262 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/grammars/json_schema.go:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"pkg/functions/grammars/json_schema.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bff231be2b9c5b9ad6af732c850c5eac127cfa766cab42511cb47c47f6219fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/functions/iterative_parser.go:933-939 | pkg/functions/iterative_parser.go:1116-1122 \u2014 both copies are in the same file, so extract the block 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":"pkg/functions/iterative_parser.go"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbbd11ab514f874807cd139368f40c418c6578187f58851b62375f3d84cf5513"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/functions/peg/chat.go:522-528 | pkg/functions/peg/chat.go:533-540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/chat.go:522\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27037347cd276d03f3b22aa941cf338e13d06611f2ec45282fe9fbaf0fad40d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/functions/peg_integration.go:232-239 | pkg/functions/peg_integration.go:360-366 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg_integration.go:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"pkg/functions/peg_integration.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f78330dc2bc446dd56c0e1a4f707dcf1bb145e5a6a32884710b895e13e8d87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/functions/peg_integration.go:281-288 | pkg/functions/peg_integration.go:468-474 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg_integration.go:281\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"48aafcbd2379c54ec3a7b8edf8506d29de11ac9c925c227a00bbf7b83e1ff322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/localai/config_meta.go:159-165 | core/http/endpoints/localai/edit_model.go:60-66 \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 \u0060core/http/endpoints/localai/config_meta.go:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/config_meta.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4d7e343646016d1c3cbd776445ed7ce34b8d86541f567a75c97db0e1068812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/localai/pin_model.go:27-33 | core/http/endpoints/localai/toggle_model.go:29-35 \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 \u0060core/http/endpoints/localai/pin_model.go:27\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/pin_model.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"45dcb84d10432a31870b6633ec80ea0f0495a883a78ecacf78ebfeacd8331672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/ollama/chat.go:106-112 | core/http/endpoints/ollama/generate.go:136-142 \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 \u0060core/http/endpoints/ollama/chat.go:106\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/ollama/chat.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f51a8dd52dbb37e1da853f82e57f3a96b76efb1d838d4bd818566a1819a7e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/ollama/chat.go:120-126 | core/http/endpoints/ollama/generate.go:147-153 \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 \u0060core/http/endpoints/ollama/chat.go:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/ollama/chat.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fb0cefe100331c055a2deef936ffe967c1c6c9e34c739a989e39791b25d859"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/endpoints/openai/list.go:72-78 | core/http/routes/ui_api.go:838-844 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/openai/list.go:72\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/openai/list.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"65cab10127b1b638777ec7dbb877b6c63561e6644c217c318442f8334bb1e098"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/routes/openai.go:123-129 | core/http/routes/openai.go:146-152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/openai.go:123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/openai.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"e338ecae3f3b13768477cc023793f033d00a5e6dc29a1754214932544f28e7ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): core/http/routes/ui_api.go:893-899 | core/http/routes/ui_api.go:934-940 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/routes/ui_api.go:893\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/ui_api.go"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df38e91855f999cdb5ab8108a6903de155fa5b00cf79342d772f34bfa01dcf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): core/http/endpoints/localai/nodes.go:914-919 | core/http/endpoints/localai/nodes.go:981-986 | core/http/endpoints/localai/nodes.go:1031-1036 | core/http/endpoints/localai/nodes.go:1050-1055 \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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":914}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac15bcae42e7bc3468484326991164d2da79a3e5c4871fe509eb48670e83565e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): pkg/functions/peg/chat.go:350-355 | pkg/functions/peg/chat.go:471-476 | pkg/functions/peg/chat.go:520-525 | pkg/functions/peg/chat.go:531-536 \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 \u0060pkg/functions/peg/chat.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5615d9ce6b3a9174b702c49d668937e3df7594773fdb025f6ce955e7756611ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/go/localvqe/golocalvqe.go:432-437 | backend/go/localvqe/golocalvqe.go:453-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 \u0060backend/go/localvqe/golocalvqe.go:432\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"backend/go/localvqe/golocalvqe.go"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45db28ebbe65d93b70632f59614be370cd65cb063de34b25c0c9352b40192d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/http/endpoints/anthropic/messages.go:71-76 | core/http/endpoints/openai/chat.go:215-220 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060core/http/endpoints/anthropic/messages.go:71\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/anthropic/messages.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfedf454baf96479e70905011bda92b4cd15cd45e73d7e75d862da397cd31c56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/http/endpoints/localai/nodes.go:947-952 | core/http/endpoints/localai/nodes.go:1015-1020 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/nodes.go:947\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/nodes.go"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba78ef5b458006b6166ec8cbacb38881c37b0c4d7bf5a2a1c5875d598fccdeba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/http/middleware/route_model.go:658-666 | core/http/middleware/route_model.go:675-680 \u2014 both copies are in the same file, so extract the block 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":"core/http/middleware/route_model.go"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9be9df9b4052ff69749c451fc39410efeb7c8892c5f3acfe0bade3daece252"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/http/routes/auth.go:983-988 | core/http/routes/auth.go:1045-1050 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/routes/auth.go"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f0cfbebc0d9cfcd038691858e8cd73dead1e47a3d4f7443805c4693ebda8d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/services/nodes/file_transfer_server.go:368-373 | core/services/nodes/file_transfer_server.go:514-519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/file_transfer_server.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":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d6eeeb571f9b85cc3e7ceef4906e237e17814bdc431acdc96ec21011d710e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/audio/audio.go:33-38 | pkg/audio/audio.go:59-64 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/audio/audio.go:33\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/audio/audio.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1b7bd2433cb194f610e320fab468867b765ab975adac08b79fe8dd0d1c33b83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/functions/json_stack_parser.go:159-164 | pkg/functions/json_stack_parser.go:182-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 \u0060pkg/functions/json_stack_parser.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":"pkg/functions/json_stack_parser.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"46b7ec8d0dd3a771bb82a405973f4d17177a8860f7ab80a5fc565d2c46412768"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/functions/peg/chat.go:454-459 | pkg/functions/peg/chat.go:466-471 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg/chat.go:454\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg/chat.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a863d3768fcf5d397b8138a924205b1d79a77b3dcf9a87056910d7d7f3763c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/functions/peg_integration.go:261-266 | pkg/functions/peg_integration.go:461-466 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/peg_integration.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/peg_integration.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c71e2c80e72b5b40c604cdffaf03ea3a456e7b452cd4879bf515397a2e07319"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): core/http/endpoints/localai/agent_jobs.go:79-84 | core/http/endpoints/localai/agent_jobs.go:328-333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_jobs.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_jobs.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a6831578defb72f11ada052c35c3d07cd715f44497105c2688736f6152d550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/model/initializers.go:387-392 | pkg/model/initializers.go:428-434 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/model/initializers.go:387\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/model/initializers.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb5f7ea036d5f282d38c165dcb3e07a2a12161fbaf07a6731c180665e24d814"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): core/http/endpoints/localai/agent_collections.go:189-193 | core/http/endpoints/localai/agent_collections.go:237-241 | core/http/endpoints/localai/agent_skills.go:455-459 | core/http/endpoints/localai/agents.go:171-175 \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 \u0060core/http/endpoints/localai/agent_collections.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agent_collections.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e396d472c6e2ee65fccbab32961f4c5e5d87df237eee09cbcc326a53cd65991"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): core/http/endpoints/localai/agent_skills.go:437-441 | core/http/endpoints/localai/agent_jobs.go:79-84 | core/http/endpoints/localai/agent_jobs.go:328-333 \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 \u0060core/http/endpoints/localai/agent_skills.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. The matched lines also transfer control out of the body holding them, 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":"core/http/endpoints/localai/agent_skills.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd283fcb4d2f66432aba0d6cd705c2714ac04ef34055f2356d71f5c942b33f62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/config/model_config_loader.go:534-538 | core/config/model_config_loader.go:546-550 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/config/model_config_loader.go:534\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/config/model_config_loader.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"898b975daf862160451dd08a9d8afea34f1f08a31bd47ab8c5f087e588067c4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/http/endpoints/localai/agent_collections.go:120-124 | core/http/endpoints/localai/agent_collections.go:286-290 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_collections.go:120\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/agent_collections.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"9828cc3aba836aedebc11e33ef6dc828d865c35107ed6f911543cc7b9b2ffa84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/http/endpoints/localai/agent_collections.go:143-147 | core/http/endpoints/localai/agent_collections.go:271-275 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agent_collections.go:143\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"core/http/endpoints/localai/agent_collections.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb589997b4b6f73b2fac08dbaa1ece942a00d8567890072ec0085a36bfd24271"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/services/agents/events.go:271-275 | core/services/jobs/sse.go:30-35 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/agents/events.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ecd6750e551bb6b3f6c8b6b8cd0f4c91cb050d3a216e870e70fc2dd99b5c9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/services/nodes/file_transfer_server.go:378-382 | core/services/nodes/file_transfer_server.go:526-530 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/services/nodes/file_transfer_server.go:378\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/services/nodes/file_transfer_server.go"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"821bd90e2a381151d82452e4ed626bc160e16ceab7bbece60b189ca542ddf7f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/functions/iterative_parser.go:711-715 | pkg/functions/iterative_parser.go:737-741 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/functions/iterative_parser.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/functions/iterative_parser.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"911350c1242749ec383024a7ceda6b38ff83cde47ee65e0a058952f28c28b80f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): core/http/endpoints/localai/agents.go:207-211 | core/http/endpoints/localai/agents.go:218-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060core/http/endpoints/localai/agents.go:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"core/http/endpoints/localai/agents.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e41cf70e24b72b470639ba015c7f25c8a7b6befd891a970e99dc47a227981ea"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/cli/run.go: core/cli/run.go changed 28 times in last 90 days, max complexity 130. 10 of those changes were fix/bug commits, and the other 18 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":"core/cli/run.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbfc6be647219dded0311bfa589d35cce68a6c55d8225526be4b633d064fcec"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/routes/ui_api.go: core/http/routes/ui_api.go changed 16 times in last 90 days, max complexity 211. 6 of those changes were fix/bug commits, and the other 10 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":"core/http/routes/ui_api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3d786509ca1539dd8591879b2f86b23e07e326bf8c93bceba3abcee9329ee5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/application/startup.go: core/application/startup.go changed 26 times in last 90 days, max complexity 76. 16 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":"core/application/startup.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37361286086b0ec1fdc4f92d94788b52f7a68798e317b00e371c32029942dcad"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/config/model_config.go: core/config/model_config.go changed 31 times in last 90 days, max complexity 63. 6 of those changes were fix/bug commits, and the other 25 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":"core/config/model_config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f45b13bd52c60fd341721cc4009187852df74f3ddc8ce14c2ec972abdb76377c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/endpoints/openai/realtime.go: core/http/endpoints/openai/realtime.go changed 17 times in last 90 days, max complexity 85. 5 of those changes were fix/bug commits, and the other 12 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":"core/http/endpoints/openai/realtime.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"464599090e63815e756a40e24b94d587d7792cbf12d7008f1d36a7a870432e39"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/endpoints/openai/chat.go: core/http/endpoints/openai/chat.go changed 8 times in last 90 days, max complexity 172. 5 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":"core/http/endpoints/openai/chat.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f22dd2325f3f77a95c83d626bde9a9f43eb23d3f26099842bfeae7011f24007"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/react-ui/src/pages/Chat.jsx: core/http/react-ui/src/pages/Chat.jsx changed 14 times in last 90 days, max complexity 82. 4 of those changes were fix/bug commits, and the other 10 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":"core/http/react-ui/src/pages/Chat.jsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c686728c587e4326bbcbae9aa6d656abae795c5a5751c570c55673c57f54ffa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/app.go: core/http/app.go changed 14 times in last 90 days, max complexity 62. 6 of those changes were fix/bug commits, and the other 8 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":"core/http/app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2113e44383824c0f9d149d7a313ade02045dcec9052ea0c72c2bc7becc24a97"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/http/react-ui/src/hooks/useChat.js: core/http/react-ui/src/hooks/useChat.js changed 6 times in last 90 days, max complexity 134. 3 of those changes were fix/bug commits, and the other 3 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":"core/http/react-ui/src/hooks/useChat.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83dba18d8a43323d31e687d129e98745446cfb0c614becf5238f0d2f5b4f1403"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: core/services/nodes/router.go: core/services/nodes/router.go changed 22 times in last 90 days, max complexity 28. 17 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":"core/services/nodes/router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb4411a846ab492c090d4bd098e4cee25c0573eacdaba5942a597faee566772"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 14 significant file(s) lose their only recent owner: core/cli/agent_worker.go, core/services/routing/router/score.go, backend/go/localvqe/golocalvqe.go, core/services/cloudproxy/mitm/handler.go, core/cli/workerregistry/client.go, core/cli/worker/worker_vllm.go, core/services/routing/piipattern/grammar.go, backend/go/opus/opus.go (\u002B6 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"77c91b9f70b3b1207d836dfb606e45ad5b2509282df0e3dfcde0ef06cc9d5757"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 13 significant file(s) lose their only recent owner: backend/python/vibevoice/backend.py, backend/python/mlx-distributed/backend.py, backend/python/mlx-vlm/backend.py, backend/python/insightface/engines.py, backend/python/mlx-audio/backend.py, core/http/endpoints/localai/agent_skills.go, backend/python/insightface/backend.py, backend/python/moonshine/backend.py (\u002B5 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0574516b5ed4b1de4d4b36e0e6de4de2a406a7411fb04844d2166272aaf539f9"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 4 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 (55 single-owned of 599 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 #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) \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 requirement section lists modules pulled in as Hugo modules (\u0060github.com/google/docsy-example\u0060) without specifying how to install PostCSS or the exact hugo version needed.: Add a brief Prerequisites note for installing PostCSS and an extended Hugo version range."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6642ff8876d2be2c8683998a31a1277ce16199263d66d7144fbd64df079400ea"}},{"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":"f27ce5ba52704f07d16cd6c7bde80187e87e7028caa5c9c2d1d0bcb0ebfdde92"}},{"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":"912da3e3279cfa2a3f25698e2102d94709589a57bd594d38dbec9195ede747e4"},"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":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dde75f054bef8e2c69c760c8695f0856dba21a78ef2b66b53095811f811ab134"},"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":"da62c5d5dd38389c09117b9dd33489fd5dbb0431044f77c4b9f133d02efe155c"},"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":"653367d1c4f245887d08723096ddb500834b034f1392c4f2396a07152d34a07a"},"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":"468aac4acd2eedf2505b3770ff2e3dc1f6c964777c5bea8304a6156295be4d96"},"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":"372d3a5e1090819c8e2750232bcb3c7ce6b4b13ec3ef695a43f024e3b785b39e"},"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":"c81ff15e05ea354029d29b921320ece7287ca5b5584ba7e04b6e24f8fe542cf2"},"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":"2f33bc44b68396c3f130850eadf23f4a9773ece618d11590a400b6de2dc879af"},"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":"fe78830130b42f7d74bb7ae4150b1a077caacf82f6139cd552b665328f31783c"},"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":"dbecc8b0a0ad5f9d05f33cefee475d148ca737c39d19121afd146720a73b327d"},"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":"d58fc1828968f353ee198936c121ccae28cba5ea71b717fe2443775cc57c717c"},"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":"48c8362b24ebaa480dcbe8b2507e89fe5ed096e32a26d9823f611d13bec699bc"},"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":"5386b320964bb3d0b671fcb1e0ffde30cb8bd741eb7ee788e94a96a6ae483380"},"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":"ba18ff17123c9c217910ce7dba62f270820d6dc8d779bad8ebe21d23ed66298d"},"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":"59fced1d1be527f0d0b1c6719220419904eea2c17ef5de971b0045457422facb"},"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":"92f969e8a2dc5e4ee0714c0668e840dad63ae0074e47dc148fea1ad0dd7a480e"},"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":"7d0080dc6ff8407b5f5bd06c4a2c7a332ad3cec3d3efda67a977fa174184333e"},"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":"3c9c08ca9c36b24cfa585dcf682bc94a92aaa2ccff60a54a14bd03e645b049d2"},"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":"e53aaddd476024d1453d366e3fd846dad094c785374d69c7fcd53793458d8ca2"},"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":"9e2a9e03a0c9a52fcecda466908e1a7e58c6cc539d1cc29909c19c06f930b598"},"taxa":[{"id":"CWE-78","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":"4ded165c0f537521332042563c7eb00624554e660313a1bd42bd2f6b86b234b6"},"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":"294fc1bc2416d079dd843900b17cd5de051bbc543fa12d24c20033f8141e21a6"},"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":"fd60a7afbec40a0870f42b3e54dd2bb786ee171d5ecb183f2c3b4644ea8bb3b5"},"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":"4b53d25aff0866257c2fcabef90cd5cdd3475d7870daa3a5ba0d15a4104f74a2"},"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":"ddf2eeb14b104aded306f11f0a71732697a39cbeb2d1dab10a1d1ca2db2cf1c0"},"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":"e95fff9973f26607f8ef01987c21bf0f0fab8e1f7497c45e2b6d5c4ea3ccfa71"},"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":"b67af7f0270d18c742416b0243a115371b91bd156186e94196a956740ffe1290"},"taxa":[{"id":"CWE-78","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":"067e53207765bedd1af6e6e93e09b9b01a0efbd31a876415d01b0b0d8f790a54"},"taxa":[{"id":"CWE-78","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":"b32641112f35948bb69ce31b784551bdf2c4c2474c24b658fedd1ccf826e81fa"},"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":"28003c0a8357d36e0ef363cc1335368ab4962ad02a1697af41be2ca83dce7110"},"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":"ec4528cd3e220077b46ea252fe32fba8e3650827b3bc5265ac6f77869d942561"},"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":"c9faa57892375f36299aba033108cca92310f7e8ff95ae7b1695cb01966d51d8"},"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":"d7119b5df275693c9a8669ee8e846f6f9c9b0ae83eccf831c055c64707f6469f"},"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":"3f18dc9c7ab2cb5e145ec9f2d706216633c9809d0c3505e9fcd51114c2bfe663"},"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":"57bb5d9bd382f028afadb1c57ad299cd82bb16d80e2a2e39bcd94103eed1b1d7"},"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":"4907230949660567ed8d6c3b7df0e2dbb2b2ea2e6075d99280d4d11bbdfe2297"},"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":"99ca25b44cc4fa2e779e6a6f1f0923d9489280695a96f749618a1f0dc0a20bff"},"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":"892fdf82a66d57984144c7e2fa7cfc45f77f3ac73b01347da4633c7e5f0d0139"},"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":"68ef86c3da92bb062f002b49f30e61353d6dada3754f1719110a6bff9d98f8d2"},"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":"dd1f9592d598b857688a1169f285dc4ad58a1671504f3e9b0981aaee1ee505da"},"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":"a7c964c325e9af46885bba74dddc48641cd7ac9bc0bad852487c7b3884a43868"},"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":"c69b0438d0ac22b323b1b1ad041032c55436ecc6c47f2588e7da958c8a0edaeb"},"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":"b73b7e978d1cea85cf38fa271e3a4ea1a3eaf8afa38fbc793e79563a9720cafd"},"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":"2861b617cc643b212f76b99167eaf0f908432c8a2f0e8f608760e07eeefd4400"},"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":"43ec1703df126013f472b0262ac61fe305e4eaa32c5bd70b4f657e711dfdcad6"},"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":"2663e7c766dfd973535dbe2a485711beba68401ae92498900cd4a94ca22d9e03"},"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":"2da95f8abc1199b62ea7bc01c02fca1c40229788c82da27f80c35f5e25e99c2c"},"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":"5551c73a97bc32ddc588a90ce70b1a808945f4c74046399e38dca68c8d1166f5"},"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":"2ebb593e8df33c1902d3f889b8c959dc00e4a35ca487e35f40d2888deae0f478"},"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":"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":"6c9bd328f1425e4185802e2cb388fc5dec17b2da92bc5227fa43622d89e747d7"}},{"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":"d363eec9a68c85d241b45943c94651457a263c9cf39c1f55098f78fa99dbb0bf"}},{"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":"33a41276d9c899521b3d3b3fd3b889fd3fd02d4c6957b88ce39c834ba771bc32"}},{"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":"e72f1f2406304a12b00d6b879afca096c2a829d5485b4a60ae6be9e01e6f0ad0"}},{"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":"55248de9b94f8b9984f9e52f763210656c0fa42b1e4bc0305df6d8deaf0f6fb6"}},{"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":"a30bcc273c9c064fa00d17634eaa1ed62cad27df65224e35a67537c539977f1a"}},{"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":"63269d46326f1c88aabac94bf877d509515131f8ef3e1fac8a685bd565428402"}},{"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":"f2371f70ca7109bcce45807781b1da7eaf2f628cadb875c5be37159508d81713"}},{"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":"5ac29ab6db8a5183c93a6b6d32b0501ee22b493c45272bfb00d32bc46ac5e00d"}},{"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":"697c94e3ba317dcfdf8bb8eaa158a91ece9db30e783a4fe01c2f89a295aa52c0"}},{"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":"173b861d55e41d3057a0ca599b6277b1a7dfacda5ff78ee1665139c3b466fb29"}},{"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":"868a3f414768b561a9c085470f31868e739156a72ed8dde7e6257b622cfea4ff"}},{"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":"85572b7d2013fc3adc1583bd4854d1b26fa3fe640ffc54f968166c5c3d8c765e"}},{"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":"4ad56cc8502c55000c6f468d469e83ad08e504c842817d476c7264ea9f00a09d"}},{"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":"5ac0cff84d38f682b4ccb835e5d12e865904e18e6b51f98c901fb217bdc7a1df"}},{"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":"359e48b5bac4d05f14654b3a85545aca4b0964426fa8f34612d95434fac4bde0"}},{"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":"d58711c07a50320c8e5ae2ab19253203a53260cdf14bbd67a3f6b6772fe992a2"}},{"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":"a14bc60dbd5121c72b827a1335d1b73b0fdeecddbd6e14d8b03c2a95f38703fb"}},{"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":"f4b29355f6431efd2305e3905a43ffc2a0924fbda151d3741eb3a89dc0c02a8f"}},{"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":"5b10975b7554d4bc088f14286d4f407cef83d5e5938564bb48f137f04de09be0"}},{"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":"c96b588ee2e17b7122f2ce482dc0dbe91be443c596f5ceb15382433581ba5c88"}},{"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":"ae2dfb06bfe0dcadfc949c881aa237cb2a4aac5b1cc69adf101d9e003549ef46"}},{"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":"b67787f58bbdcde79a43cc08af597219f8bc8ccd5a82b8588a8f7af6b62ec402"}},{"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":"809ee130b64de4314af6bd14a33a0cec475db3e25a41c01a1e0c84e4dcd36f4c"}},{"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":"d8f6ec84090a380cc79e55e3537155cd35bc305738efdabbc7506eedb0951a4c"}},{"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":"34a362b14f37e2f608cea945ee2a9af3fadded087380a05b8cbcb6e6633e73ca"}},{"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":"b4154fa52855f9d85b8bac47328d9e258dca531500f2a74e1ea80eff21f7be91"}},{"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":"dcabffab5b5d22ff544b124e23aeaed1be42904128b01fb14d3be7727dec3332"}},{"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":"4f0de0b8af480b3d2d0c1f40d3d4a3ab77fed66fcfd7e254e6367c4790de55ab"}},{"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":"161ee886ad07eeaaa93688d14283951f3f5a85b6004541fc08e948186892f1e6"}},{"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":"5ad3e3a23f86b2c2cb36f04a9469bfa78152276c64d24ca662a4bc3b8c6d06de"}},{"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":"04e2d8b4aca25bb7c9290de940a8e82d3b706eb7a4367a20694f5059d4520bd3"}},{"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":"5115512a91648d3612a45dff19612db98f116f2f5d67a51f31835f28c631a348"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 1 of 599 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 largest first: backend/python/mlx/mlx_cache.py. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: welcome.go \u2194 ui.go: \u0060core/http/endpoints/localai/welcome.go\u0060 and \u0060core/http/routes/ui.go\u0060 change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) 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":"core/http/endpoints/localai/welcome.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"659f4896ca16c6d72961425b2a76d705f5e29b6d33085cba8aa053cb15e9a40b"}},{"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":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5e3545524e8875b4c7eba7c1011fc73f5980286a976278c5029e01d01e301600"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"885667ec01f40d19fd2ad38bfb69ee35a51071ce9ea797d188a6f14cc182b14e"}},{"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":"74ae9adf990e297955bdb4a7c7c250f56f745ac76012f1a2e1f7c73d50f8e81f"}},{"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":"8af9916d9bb4d8c8d479a06cbf319fed66fbe85ada2ba88b7b1458ab2b6b0a62"}},{"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":"1286d2b27c42f13bf672ab19c2a2416428f50d4c7088f3bcade9dfccb351ede6"}},{"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":"2a7b6550cdc17e83418c0b0bd113c7d163abfe5864196f80abcfd2bb4d6ab5a1"}},{"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":"01974ac4619758f0eda9c2b0b5a21c58cbd9798f6a333251427c3475de69cf38"}},{"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":"18d9ce7a72d9eef90fc5c6160c01a3e091c57473f4a175132cc9eabec462f15f"}},{"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":"5b22d633bd09401ca5659e3fce5809e75b1a481ebc3c62556101cd11608d1634"}},{"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":"6fe2dc42a2c9f679dc4a2b95ec221870d000584e0ff2ccbe8132a0242799911d"}},{"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":"180098ad28b8ec88ea6d9d65ee5bc15f4d0baa3b9973c6b6be6d625ae224abce"}},{"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":"dc26e5dadadee0653910bd4057b97a77e2a4384156880ea1eed0041661518856"}},{"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":"3dde32f62a66fa4239eca979f7aeb766b696e38681fea020dc09132d03959371"}},{"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":"2e713568f92ceba89e04ad04b5d4791a1fa0236e7a475eb8e0d16f0950ff7d67"}},{"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":"3a4f00334ea210086aa8c907ce6c9067488df09e6d8a3560252441c321db0443"}},{"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":"f56d8caed01567da79a1bb5b602774ae145c673b24e4fc3895f75ddcc7d39e82"}},{"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":"897d2d15be7b12add34be00454fd94934fcb3035d0c085e10a0468650fc56f15"}},{"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":"cd561985491d2a0882c6e741822bf90822e99f688ee69aec53a60fe40e4208d5"}},{"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":"a543dbd608137774fde54d1b353a8e321e2215c601bee6d244bd16511eb15d8e"}},{"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":"3d2250d22c4cfe1c231cc8124effeafe86456a35e5eb98cf4bcc3979c1108d55"}},{"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":"1d6e2a50d7d64e745a7254ecc7fee5af08b5272f143f38404e9efa3a031b6b9f"}},{"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":"eda5591d862f1a998d2f4d541b28f448a9c0f4b6b1a523d700bcf7cafadea841"}},{"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":"4aaf1c8592a4022f973ff9d17893a49e4e900cfd17fa7887d3b3bb59ac7402d2"}},{"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":"75c0faf799163236005c2549fbc4a244bf09bcae02d46f8fd70557afd8b48db4"}},{"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":"4b6dd9cc73dd0fc4535dcf31e110d3614959ed69f771deffdbc47869cc02b340"}},{"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":"f3f808f9834ec37e7548c56088d417030f6414e1315b4580b923a7d7c6bbb8a4"}},{"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":"a133a4845f20f03b14dced5762ca00f6eb52829a09f7d461559ec0abd21a0c31"}},{"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":"1b1d951b99bf46259503b9b9b5bd51283a077c95f7a83c16cf2494f9a5c6c79b"}},{"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":"e21b7da673773eb7d167174122bd930bd591f02be127ac41b97c5d23e5fe98c1"}},{"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":"5576c7f8e3f11018b87b6b4571ec60ce655c29f74efc79790fe80a9f20e8ccc6"}},{"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":"71a1bbf5d09983fd43df0bfff74c8c7e35ff58fd5d966288dc500e8605db0c87"}},{"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":"df143e709cd188a48426f023d8bf3f2e171b9162f034ac7273519869dadd79b1"}},{"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":"faf7b751731db2ef51c8e66c6f59fb9d63a3ed74a49c35a9376edacfb3618b19"}},{"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":"b8e1df6b4541eac7d0be4d3e38336cc02bfb4d634af6f88830e5c774211f24e9"}},{"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":"c173920ba5786ffa642dc66efdf9414c3f03a66e6ac3e5b66ecd6d1e35f594bc"}},{"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":"eada0957a9040a40a4a25a2b8ff555d5d1f65c7e2c85fee972c1fd8d311efba4"}},{"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":"de27a49b832714598b4c8048d0f945a0abc5a7cee0aa2682cd632a60eac91e52"}},{"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":"7962df08b9349ff69aee566dd5bcbc01bf032a6d5acb1677bd5f848d17b4a06e"}},{"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":"4f1d9b98a08d7a03db59edc08569dac3b0295f78bb90e717ec54238cd1606f81"}},{"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":"b150f37d387ee15c56816233b46cdf9a750001ab11b0c4bbd6f80362ca244a5b"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"989c1cbf8641f752d9377a76428181b46bf7859fe600942e6486e32d400e2963"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7bbe92900f195ac6aa9a631c6ba404e452f30e9bc188f72d036fe01a4e366b92"}},{"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":"f4a94daa621588f51ce3b1663b33e3ea9451a4c492e0805077e2e5563868fb5b"}},{"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":"3f50d5fd16ec67a7e3bff089761c9acef921dde11f43afac4317ae4fd2077daf"}},{"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":"b22c8cc0a1de33a258a05b5caf3490f2222a82e2701f88cd472017832a690c10"}},{"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":"10b6ca6d668c859b4ba9099469303e782149bbd41b9e582298311c7c82834293"}},{"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":"4ee56c88b73bc8c4d5385e0b3a54e1b98943a2eebece5ddb47a1f8bad4220571"}},{"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":"2aca7ce86f44089f70c12e808fbe2c60417be6675a29c0d5a3dc8d398f61d022"}},{"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 seccomp profile: Workloads do not set a seccomp profile (RuntimeDefault or a Localhost profile). Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3f418e9f76c3ac90484e0e94a454bfe9b08e914e1cdd218e1fc9e3b261a3bf6e"}},{"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"}},{"ruleId":"D42","level":"note","message":{"text":"No admission-control policy: No policy-enforcement gate (Kyverno / OPA Gatekeeper / PodSecurity admission) is committed. Admission control keeps workloads that violate your security baseline from ever reaching the cluster."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"57f2e92ed1519af6e21f44cce82a94119700b7d516006ea2955d969d5328b76b"}}],"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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-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":141,"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."]}]}