{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D22","name":"Internal API Consistency","shortDescription":{"text":"Internal API Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D22"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"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":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"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":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"]}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX2","name":"Stateful singletons","shortDescription":{"text":"Stateful singletons"},"helpUri":"https://codehealth.canine.dev/dimensions/AX2"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF2","name":"Allocation hygiene","shortDescription":{"text":"Allocation hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF2"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"LLMRunner.runModel (cyclomatic 48): LLMRunner.runModel has cyclomatic complexity 48 (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":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ef79a22dffe6e67863bde2046f4cf7ec96a8675e3d62421f708231f464e3c2"}},{"ruleId":"D1","level":"warning","message":{"text":"export.main (cyclomatic 45): export.main has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/export.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1c8ef47996bb620c7dbd49902594f83978d46798fa1aadf5ed4e03a19cf84dc"}},{"ruleId":"D1","level":"warning","message":{"text":"pipeline._async_export_model (cyclomatic 42): pipeline._async_export_model has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/pipeline.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9291e6708673839ee4eaeefef5d4d7075bde5a7e076e3f8f75949b45876c1d"}},{"ruleId":"D1","level":"warning","message":{"text":"LanguageConfig.additionalStopTokenIds (cyclomatic 41): LanguageConfig.additionalStopTokenIds 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":"swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"32462d02f61a54db381926dcf8eea84d037e3c2314f55e31dbc07136e69d9100"}},{"ruleId":"D1","level":"warning","message":{"text":"export._resolve_export_config (cyclomatic 38): export._resolve_export_config has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/llm/export.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f8e6be1d485e16a412a605cf839f9b9ca2f4e4c83291943cf18c1a707eb94d"}},{"ruleId":"D1","level":"warning","message":{"text":"EngineImpl.init (cyclomatic 33): EngineImpl.init 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b99768a1f15ae1adedebad1587a766c7b4cb9ae80c04c25bb87335e4fc3752b"}},{"ruleId":"D1","level":"warning","message":{"text":"HotstartHeuristics.process (cyclomatic 31): HotstartHeuristics.process 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":"swift/Sources/CoreAIVideoSegmenter/Tracking/HotstartHeuristics.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"065eae54c5ffd1bef4c0432cbfbe9903c2f935883758a5302003fa15e9f0a572"}},{"ruleId":"D1","level":"warning","message":{"text":"FlowTransformerPipeline.init (cyclomatic 27): FlowTransformerPipeline.init 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":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cec18dd0b4fa997303c8b2b4daccea8c3c369ad96f1c7cae07ff0ce1091b0eb"}},{"ruleId":"D1","level":"warning","message":{"text":"Stream.decodeFrames (cyclomatic 27): Stream.decodeFrames 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":"swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bef984708c60a3000de49ed70d69ab12f19819746f972ae895985401931b0e"}},{"ruleId":"D1","level":"warning","message":{"text":"FlowTransformerPipeline.makeFlux2Plan (cyclomatic 26): FlowTransformerPipeline.makeFlux2Plan 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":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a82fd1747ee902e19e697a56f72e358a31381edf7783b5259f89d2393bf3fc5"}},{"ruleId":"D1","level":"warning","message":{"text":"WanPipeline.generateVideo (cyclomatic 25): WanPipeline.generateVideo has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/WanPipeline.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"265cf79effd44781cf02b3a524e2bbf381fa49fb8f0e2a1278d92a9d9083815a"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatHandler.swift.runChatCompletion (cyclomatic 25): ChatHandler.swift.runChatCompletion 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":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c44bc6aeb4152e186dbf78a18b1009f33678791535a35ef122956a419af8f6"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatHandler.swift.runStreamingLoop (cyclomatic 25): ChatHandler.swift.runStreamingLoop has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce52cc61bfecbff5cf30657a49b6e293fe6fb7c13b7a344a57b331a013a99c65"}},{"ruleId":"D1","level":"warning","message":{"text":"LatentPreviewTuner.fitFromDirectory (cyclomatic 22): LatentPreviewTuner.fitFromDirectory 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":"swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"87382f82d521894ee6b8779c2e57935a735d3bb698ab490e5588a91b92707787"}},{"ruleId":"D1","level":"warning","message":{"text":"EngineImpl.runConstrainedCompletion (cyclomatic 22): EngineImpl.runConstrainedCompletion 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1281}}}],"partialFingerprints":{"codehealthFindingId/v1":"15756ca139c4a7739a6905f98fce5e062fb84432cf62a1b844f688a86a0256c3"}},{"ruleId":"D1","level":"warning","message":{"text":"StaticShapeEngine.init (cyclomatic 22): StaticShapeEngine.init 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4045e2a8c79cf3e20be7c6a6038f5b5d96eaba1f1b8e24afdbc7bfbdafe8b3"}},{"ruleId":"D1","level":"warning","message":{"text":"CoreAISequentialVLMEngine.init (cyclomatic 21): CoreAISequentialVLMEngine.init 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd4871c53a2b3cdd6660722f2bb5434d61625a3716288e87436ff5f119052fe9"}},{"ruleId":"D1","level":"warning","message":{"text":"LLMRunner.validate (cyclomatic 20): LLMRunner.validate 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":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"651cee89a7cfa9aee7c3ba9f5cd4d6f9fef8601e43beb3a84f2d173291a27f50"}},{"ruleId":"D1","level":"warning","message":{"text":"LLMServer.run (cyclomatic 20): LLMServer.run 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":"swift/Sources/Tools/llm-server/LLMServerMain.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0542b975385c3cdfb2bfaec7c225ce62bcbce2f8f9c453433b5c12a19de42f1"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoSegmenterCLI.runParity (cyclomatic 20): VideoSegmenterCLI.runParity 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":"swift/Sources/Tools/video-segmenter/VideoSegmenterMain.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"b210825035c2a8bb8e04ada12a9091b04404ac9e083a833e3f8b09ff1d99b087"}},{"ruleId":"D1","level":"warning","message":{"text":"model_registry._action_model_info (cyclomatic 20): model_registry._action_model_info 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":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"da28a77d39ae40a31d9daa1f1f3e8842241d1f181c23dd241b3c0244367fb8f5"}},{"ruleId":"D1","level":"warning","message":{"text":"diffusion_gemma._mutate_diffusion_gemma_state_dict (cyclomatic 20): diffusion_gemma._mutate_diffusion_gemma_state_dict 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":"python/src/coreai_models/models/macos/diffusion_gemma.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f8e69b9919e1b2463d8db4090b336140e3a67e538647aecfb3803f3fec0c60"}},{"ruleId":"D1","level":"warning","message":{"text":"MuseGlimmerForCausalLMEmbeddings.from_hf_memory_efficient (cyclomatic 20): MuseGlimmerForCausalLMEmbeddings.from_hf_memory_efficient 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"bea02d251a206644b66b4a4e62050493e0de78a327dd3399d35e534aed2325bd"}},{"ruleId":"D1","level":"warning","message":{"text":"export.load_model_from_safetensors (cyclomatic 20): export.load_model_from_safetensors 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":"python/src/coreai_models/vlm/export.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5f1c794b728a6c045b8679d3c799ed009f9ba74a9c7b278aab3a9b471624e5"}},{"ruleId":"D1","level":"warning","message":{"text":"CoreAIPipelinedEngine.generate (cyclomatic 19): CoreAIPipelinedEngine.generate 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"511a992b4602398fa5e3d8b29604112f9d2b36312a2646720eb10ce7e55e5f41"}},{"ruleId":"D1","level":"warning","message":{"text":"export.main (cyclomatic 19): export.main 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":"python/src/coreai_models/llm/export.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"aecd1f96f4913f85708d658fb6046bc58ca80a9b9a59d161945b3fcd955d6e03"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3VLForCausalLMEmbeddings._mutate_state_dict (cyclomatic 19): Qwen3VLForCausalLMEmbeddings._mutate_state_dict 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":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa00fd33f3145081df2205492093c6731b33f276e23495dd53e13813d512c77"}},{"ruleId":"D1","level":"warning","message":{"text":"MelSpectrogram.normalize (cyclomatic 18): MelSpectrogram.normalize has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/MelSpectrogram.swift"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"884ccbadfdaac84106f5951988019b9887031c1403cb0fd839f72351442c0f37"}},{"ruleId":"D1","level":"warning","message":{"text":"ConnectedComponents.areas (cyclomatic 18): ConnectedComponents.areas 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":"swift/Sources/CoreAIVideoSegmenter/Postprocessing/ConnectedComponents.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb0666de6ac183275e4016a13427b4715243cddbaae5adecfd899dd3251893c"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognizerMain.swift.runLegacy (cyclomatic 18): SpeechRecognizerMain.swift.runLegacy 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":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcef8b08d001720c1ed2ec1c5bb0ebd9e1da604460eea3153f344aeae5609418"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamingRun.swift.runStreaming (cyclomatic 18): StreamingRun.swift.runStreaming 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":"swift/Sources/Tools/speech-recognizer/StreamingRun.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71dc9916391f8b438cf36a0bdd075751b91ac426d77091b3a30e08c678143b9"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3MoeForCausalLM._mutate_state_dict (cyclomatic 18): Qwen3MoeForCausalLM._mutate_state_dict 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":"python/src/coreai_models/models/macos/qwen3_moe.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec233591d2ebf06ed803a89ef0efa57417548634d413f7c05237eb2237360b29"}},{"ruleId":"D1","level":"warning","message":{"text":"export.main (cyclomatic 18): export.main has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/export.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae73f66977eebbc23618c1edd47610cd921f15de91fb9c2dc8db829b697474d4"}},{"ruleId":"D1","level":"warning","message":{"text":"CoreAIVLMExecutor.respond (cyclomatic 17): CoreAIVLMExecutor.respond 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":"swift/Sources/CoreAILanguageModels/VLM/CoreAIVisionLanguageModel.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9da36b885ddbb6f421b340521b4163d68c654517942369a64870ce5e163c8a"}},{"ruleId":"D1","level":"warning","message":{"text":"Weights.init (cyclomatic 17): Weights.init 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":"swift/Sources/CoreAIShared/Runtime/BilinearResampler.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7152cb70af5b9d35811e547bb1d289b6c81812f709c047d98a231975744833"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoSegmenter.run (cyclomatic 17): VideoSegmenter.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":"swift/Sources/CoreAIVideoSegmenter/VideoSegmenter.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbeff2590a59f1f5a5b9ad985ab775bb0f820fd4be8bf157572d72a58f273201"}},{"ruleId":"D1","level":"warning","message":{"text":"Associator.associate (cyclomatic 17): Associator.associate 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":"swift/Sources/CoreAIVideoSegmenter/Tracking/Associator.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac36188873c00a7cea461e8542ad36e40dc13009aa9b5339b44b3d3e638a15eb"}},{"ruleId":"D1","level":"warning","message":{"text":"DiffusionRunner.run (cyclomatic 17): DiffusionRunner.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"760f90fdac55f4a31f0dea861f9fadd5da6d9fc5c9ca244fcd3b820a7aed4f83"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoDiffusionRunner.run (cyclomatic 17): VideoDiffusionRunner.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/videodiffusion-runner/VideoRunnerMain.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f34ce7d45dd3a08575bae6667832738bcfb2e3d9116c136de6b1d309d152ea"}},{"ruleId":"D1","level":"warning","message":{"text":"pipeline.export_diffusion (cyclomatic 17): pipeline.export_diffusion 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":"python/src/coreai_models/diffusion/pipeline.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b801f24d932d978cea5dc66cd640bb5f8b8f9dc604f0822216cdb6e27c43c7b"}},{"ruleId":"D1","level":"warning","message":{"text":"Gemma3nForCausalLM.from_hf_memory_efficient (cyclomatic 17): Gemma3nForCausalLM.from_hf_memory_efficient 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":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26598a6b68462d62a0a81838d6d1937e45bc0ed616d764f682eed174e68fe65"}},{"ruleId":"D1","level":"warning","message":{"text":"MuseGlimmerForCausalLM.from_hf_memory_efficient (cyclomatic 17): MuseGlimmerForCausalLM.from_hf_memory_efficient 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1aae78c8bf8cb17b0cd19cd1fcc29084a4d618cadcfb2d9166c10240db14ef"}},{"ruleId":"D1","level":"warning","message":{"text":"MuseGlimmerDrafterForCausalLM.from_hf (cyclomatic 17): MuseGlimmerDrafterForCausalLM.from_hf 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":"python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4017a3b13a033a33efaf63fbb0b99e2ea43b78cfa680f42b35b8a1072c161f9"}},{"ruleId":"D1","level":"warning","message":{"text":"rope.initialize_rope (cyclomatic 17): rope.initialize_rope 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":"python/src/coreai_models/primitives/macos/rope.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13c113eb9601e7ffe20de4e91d98f2d7595d12556741843155c82423d4f2fab"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiFunctionContext.init (cyclomatic 16): MultiFunctionContext.init 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":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a642bd3f1bef54ec0dbc4c384e695a41cebaee29447ade89e15184ea15c250"}},{"ruleId":"D1","level":"warning","message":{"text":"ThinkTagParser.drainAgentic (cyclomatic 16): ThinkTagParser.drainAgentic 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":"swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"623f8a8e647f9abd283ac9d71c982f71d54027d907673662a2d5413064ea5020"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognitionModel.runHopIfReady (cyclomatic 16): SpeechRecognitionModel.runHopIfReady 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":"swift/Sources/CoreAISpeech/SpeechRecognitionModel.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"953779e71b217a7508ebe659306ac8f25d0981ed1561970314b5125b553a6a49"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoSegmentationEngine.resolveShapes (cyclomatic 16): VideoSegmentationEngine.resolveShapes 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":"swift/Sources/CoreAIVideoSegmenter/VideoSegmentationEngine.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"55409c8a84cda369446e7cf6b4b1b25442927e7167a8db6f36cf30a77afceab0"}},{"ruleId":"D1","level":"warning","message":{"text":"ObjectDetectorCLI.run (cyclomatic 16): ObjectDetectorCLI.run 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":"swift/Sources/Tools/object-detector/ObjectDetectionMain.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b89ee1423e28275a3a1ced928f9715edc82e4d6b22060d8dbf78815f03eae0"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2ForCausalLMForiOS._mutate_state_dict (cyclomatic 16): Qwen2ForCausalLMForiOS._mutate_state_dict 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":"python/src/coreai_models/models/ios/qwen2.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0cdf6f5df914f92e96fc3a6455721624acf253a15c29f7a4f00700cf1e4bf5d"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralForCausalLM._mutate_state_dict (cyclomatic 16): MixtralForCausalLM._mutate_state_dict 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":"python/src/coreai_models/models/macos/mixtral.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9441da020392f6cab31e0acf1db6dbc1fdeaf554c6dbad50f14667c7e010711"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3VLForCausalLM._mutate_state_dict (cyclomatic 16): Qwen3VLForCausalLM._mutate_state_dict 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":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"7193f9d3c4db4ddf65bcba4c2d8caa693ce38b40047e848da5d413050336ef18"}},{"ruleId":"D2","level":"warning","message":{"text":"LanguageConfig.additionalStopTokenIds (cognitive 79): LanguageConfig.additionalStopTokenIds has cognitive complexity 79 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 13, loops 5 (9 pts), ternaries 3 (9 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"af682066c49a8f071c448bd8ddea725cd41e51265c953b92128e740f1a93c4b1"}},{"ruleId":"D2","level":"warning","message":{"text":"export.main (cognitive 75): export.main has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (50 pts), ternaries 5 (10 pts), boolean chains 7, loops 2 (7 pts), error handling 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/export.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d936b791a3698924f1488e788178e7f92050d15ea74616ec3b7a792c308490c"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMRunner.runModel (cognitive 61): LLMRunner.runModel has cognitive complexity 61 (threshold 15). Drivers by points: if/else 32 (40 pts), ternaries 7 (10 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70e05651dfd52e13a1de5c59ff7b9fd6251af7efd82a34ac0a53945156b555e"}},{"ruleId":"D2","level":"warning","message":{"text":"pipeline._async_export_model (cognitive 57): pipeline._async_export_model has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (42 pts), boolean chains 12, ternaries 3 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/pipeline.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8f9f29748077a70b920e5ea704469532d991e8a97ff5db087bc9a441d3f899"}},{"ruleId":"D2","level":"warning","message":{"text":"Stream.decodeFrames (cognitive 49): Stream.decodeFrames has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 8, loops 2 (3 pts), match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"226e7d1739ce52a113a804c64c14f333a5ce684b330da808144384470e15cf53"}},{"ruleId":"D2","level":"warning","message":{"text":"EngineImpl.runConstrainedCompletion (cognitive 45): EngineImpl.runConstrainedCompletion has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (33 pts), error handling 3 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1281}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1270e6bc7a27a528d4fe5fd08cf74e22e210f2fd42f7d30d4f32f5da7ebfdc7"}},{"ruleId":"D2","level":"warning","message":{"text":"EngineImpl.init (cognitive 44): EngineImpl.init has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (27 pts), loops 6 (8 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"17fa5b7a69c802808176445dd183d5a2dc3eb6d37f234433e83bbeb37a7003b9"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatHandler.swift.runChatCompletion (cognitive 43): ChatHandler.swift.runChatCompletion has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 2 (7 pts), ternaries 4 (7 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1276b40433f3779674907cd022fdce7865777a52358773628e37ef313c41b63"}},{"ruleId":"D2","level":"warning","message":{"text":"ThinkTagParser.drainAgentic (cognitive 42): ThinkTagParser.drainAgentic has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (32 pts), ternaries 2 (8 pts), boolean chains 1, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2f9c305eaef49400c10fcb9f5baf2b1cd9dbe4197d72e44928c69694352154"}},{"ruleId":"D2","level":"warning","message":{"text":"export.load_model_from_safetensors (cognitive 42): export.load_model_from_safetensors has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/vlm/export.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"3690d2979b29a4288169d4702413b01a1a37b6c14fbabd06e843eb117c58a18c"}},{"ruleId":"D2","level":"warning","message":{"text":"WanPipeline.generateVideo (cognitive 41): WanPipeline.generateVideo has cognitive complexity 41 (threshold 15). Drivers by points: if/else 27 (33 pts), loops 3 (8 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/WanPipeline.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea22564a0ed5745d18fcfe59aebaad1f11a4061a1ecf0c6092b17e62d4948135"}},{"ruleId":"D2","level":"warning","message":{"text":"export._resolve_export_config (cognitive 41): export._resolve_export_config has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 14, ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/llm/export.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"4349b1aef8a450981c5d37b4ef5c2ac8185e0ebb5289ee97c30f727d18b19c34"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatHandler.swift.runStreamingLoop (cognitive 40): ChatHandler.swift.runStreamingLoop has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (20 pts), match/switch 3 (9 pts), loops 4 (7 pts), ternaries 4 (nesting depth added 13). 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":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbbc5319b5b9c4df2b6ca6eb52bbc03ca0878530e666d8f0cf994d22c8e97319"}},{"ruleId":"D2","level":"warning","message":{"text":"HotstartHeuristics.process (cognitive 39): HotstartHeuristics.process has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 9 (11 pts), boolean chains 10, ternaries 4 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoSegmenter/Tracking/HotstartHeuristics.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6824be6fe83ed4720822377b0214c165a8000803d3da0c2b5c630f96350b0e80"}},{"ruleId":"D2","level":"warning","message":{"text":"FlowTransformerPipeline.makeFlux2Plan (cognitive 37): FlowTransformerPipeline.makeFlux2Plan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb32b79f81be1f91d6fbe07238ba5e55703758ce4baefac73543647525acb83"}},{"ruleId":"D2","level":"warning","message":{"text":"ConnectedComponents.areas (cognitive 35): ConnectedComponents.areas has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (6 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoSegmenter/Postprocessing/ConnectedComponents.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8215bba6552c0bde1943768d88d47f55dd85f437307fa39efbfcc426af19f6"}},{"ruleId":"D2","level":"warning","message":{"text":"MuseGlimmerForCausalLMEmbeddings.from_hf_memory_efficient (cognitive 35): MuseGlimmerForCausalLMEmbeddings.from_hf_memory_efficient has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 7 (9 pts), boolean chains 2, ternaries 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc9baaa0f1ae344a09891b0d2cdd38b2f766ac474d4051869f17b03b3b984d2"}},{"ruleId":"D2","level":"warning","message":{"text":"LatentPreviewTuner.fitFromDirectory (cognitive 34): LatentPreviewTuner.fitFromDirectory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 6 (10 pts), boolean chains 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":"swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"8470064ccd0e0c05c28375ef135941884997d2dae5806b0ffc91da27d4ee6556"}},{"ruleId":"D2","level":"warning","message":{"text":"MelSpectrogram.normalize (cognitive 34): MelSpectrogram.normalize has cognitive complexity 34 (threshold 15). Drivers by points: loops 11 (28 pts), if/else 2 (4 pts), match/switch 1, ternaries 1 (nesting depth added 19). 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":"swift/Sources/CoreAISpeech/MelSpectrogram.swift"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ad1ccd260eea13b0e83e5217c504ad638a3522554503d729363fe7542fdc68"}},{"ruleId":"D2","level":"warning","message":{"text":"Weights.init (cognitive 33): Weights.init has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (10 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Runtime/BilinearResampler.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca84e15aecc65257a50634b81237062bb925aeeca647535311c712bcf76533d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlowTransformerPipeline.init (cognitive 32): FlowTransformerPipeline.init has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 3 (4 pts), match/switch 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"745ff820436e986a07fb697fc04fef54aab94593aa3106f81ea445f678f3b789"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoSegmenterCLI.runParity (cognitive 32): VideoSegmenterCLI.runParity has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (9 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/video-segmenter/VideoSegmenterMain.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"396c76edf9f4eb508c1531dec00423df388fc8253d67f255c81c8bf07b9aace4"}},{"ruleId":"D2","level":"warning","message":{"text":"diffusion_gemma._mutate_diffusion_gemma_state_dict (cognitive 32): diffusion_gemma._mutate_diffusion_gemma_state_dict has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/diffusion_gemma.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"0066ec2968132f618cd7092f4c441428281093ebf691d9f66d9f61d3ca1438ef"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3MoeForCausalLM._mutate_state_dict (cognitive 32): Qwen3MoeForCausalLM._mutate_state_dict has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 7 (12 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3_moe.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6f1fd663f1816ca72a2a7a42d5b49b09e232bb46229453059998b4f532988a"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAIPipelinedEngine.generate (cognitive 30): CoreAIPipelinedEngine.generate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 3 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1eee50c59883914dd90b8ec39c8a6c462d82f70dbd5746dcaa863be04f6fdec"}},{"ruleId":"D2","level":"warning","message":{"text":"export.main (cognitive 30): export.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 6 (12 pts), boolean chains 1, ternaries 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":"python/src/coreai_models/llm/export.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b791dd880a40584923ade5cbfa04b0c4d0f8926726baccbe6ddd77b51a8b90"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralForCausalLM._mutate_state_dict (cognitive 29): MixtralForCausalLM._mutate_state_dict has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (12 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mixtral.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"7387018b97211bccd27e73819c09700ce9de47067b6af3ed33dcdc5f8500e1c2"}},{"ruleId":"D2","level":"warning","message":{"text":"TiledDecode3D.swift.blendTileIntoOutput (cognitive 28): TiledDecode3D.swift.blendTileIntoOutput has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (10 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/TiledDecode3D.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded9a5026e3e40c50b03e61407701ca75213b10b87e54b936b8a501dc7b9eb2f"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechParity.parakeetRows (cognitive 28): SpeechParity.parakeetRows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/SpeechParity.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d852d4eb5c666ba0b4fc4114491ee841ce06fa5b5e8d918c962fbf723a384dd"}},{"ruleId":"D2","level":"warning","message":{"text":"Gemma3nForCausalLM.from_hf_memory_efficient (cognitive 28): Gemma3nForCausalLM.from_hf_memory_efficient has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (7 pts), boolean chains 2, ternaries 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":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"e15b63ffebbd45d5007ee6bb85314b60cc7b994ac3aae0be5bc8a9cbd9b9d969"}},{"ruleId":"D2","level":"warning","message":{"text":"MuseGlimmerForCausalLM.from_hf_memory_efficient (cognitive 28): MuseGlimmerForCausalLM.from_hf_memory_efficient has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (8 pts), boolean chains 2, ternaries 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb326dd955bfbed3e64a1315c53d4769e28ba263616151e47c56b90462d3b66"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3VLForCausalLMEmbeddings._mutate_state_dict (cognitive 28): Qwen3VLForCausalLMEmbeddings._mutate_state_dict has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"c893906f67be7f19f358ab9fb00b5f23a9ebc5df9ba8593aa4fd187a0d43ee9e"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAISequentialVLMEngine.init (cognitive 27): CoreAISequentialVLMEngine.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 1, ternaries 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd95b953f8cb7961223b81ccd0cadd7d74e1831f30e6e410fd9b94dd88905ea"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticShapeEngine.init (cognitive 27): StaticShapeEngine.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"2130fff5b1e9c190670d7bb8af8dbf01d8e648de09a64f33e9bd4ec51a77c521"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAIVLMExecutor.respond (cognitive 27): CoreAIVLMExecutor.respond has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1, ternaries 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":"swift/Sources/CoreAILanguageModels/VLM/CoreAIVisionLanguageModel.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4af41ed6a5076591caec0ad62b31765152dc0e50bded6c3109dc04c41e2210"}},{"ruleId":"D2","level":"warning","message":{"text":"Associator.associate (cognitive 27): Associator.associate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoSegmenter/Tracking/Associator.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"342a0e0c583d22f3d76bde5d9e23aa9d68d28a29cbe634042e236cf442eb1d4a"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingRun.swift.runStreaming (cognitive 27): StreamingRun.swift.runStreaming has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 4 (6 pts), loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/StreamingRun.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"99392906cfbcaed2f57edc981e1a0367faa557c40a70100c4762122e4f7bc03c"}},{"ruleId":"D2","level":"warning","message":{"text":"pipeline.export_diffusion (cognitive 27): pipeline.export_diffusion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, ternaries 1 (3 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/pipeline.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"a35fa2e986a025b6807028e681cd2de8a123e129b5cb2164580ffde2cde79279"}},{"ruleId":"D2","level":"warning","message":{"text":"model_registry._action_model_info (cognitive 27): model_registry._action_model_info has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d78482bbca7078d473d4dea902ae510f459959b5b79e79b3d154870dcf7f2a6"}},{"ruleId":"D2","level":"warning","message":{"text":"MuseGlimmerDrafterForCausalLM.from_hf (cognitive 27): MuseGlimmerDrafterForCausalLM.from_hf has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"562803f2904c8c464abbe5141363ec59430f49c19da985d2a9559e1f48836ad6"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2ForCausalLM._mutate_state_dict (cognitive 27): Qwen2ForCausalLM._mutate_state_dict has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen2.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c071aed3fd150547cff9d7d0be98dde11a7f92185e444e8d1048bf4ae3f102f"}},{"ruleId":"D2","level":"warning","message":{"text":"MelSpectrogram.fromPCM (cognitive 26): MelSpectrogram.fromPCM has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/MelSpectrogram.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2b9c2e180b7787681733b913712181af0b5a26fa704e0f6fdee3ba8dde0d75"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMServer.run (cognitive 26): LLMServer.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/LLMServerMain.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb451992668e4fb0ee3a34ad526f373c7b81725c9a54a34c70b120a1fb89ce5"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechRecognizerMain.swift.runLegacy (cognitive 26): SpeechRecognizerMain.swift.runLegacy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c325d1d3a3e2ee35f1448ea64d4be05af74ff2142a7075dc6ac74cd2d67c3c"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoDiffusionRunner.run (cognitive 25): VideoDiffusionRunner.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 1 (3 pts), error handling 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/videodiffusion-runner/VideoRunnerMain.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea20fc9a910d9f412615fbdeb99a3d6eac034918fa0ce8f84837eeb57e1ed26e"}},{"ruleId":"D2","level":"warning","message":{"text":"OcclusionSuppressor.suppressAreaShrinkage (cognitive 24): OcclusionSuppressor.suppressAreaShrinkage has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 3 (8 pts) (nesting depth added 14). 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":"swift/Sources/CoreAIVideoSegmenter/Tracking/OcclusionSuppressor.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e713768074ba3b72756cec3b1a296d8cdc8330aeb0e5e23bef75539002b60240"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2ForCausalLMForiOS._mutate_state_dict (cognitive 24): Qwen2ForCausalLMForiOS._mutate_state_dict has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 7 (11 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/qwen2.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"c475f9042700bee5114b5720a2731e4f78d5a75935eada3417c81051b6ab203b"}},{"ruleId":"D2","level":"warning","message":{"text":"export.main (cognitive 24): export.main has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (8 pts), boolean chains 7 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/export.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"834559c36c1e22344f154f53781b72bcdbe2187b3106cf3bc855619198b93d29"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAISegmentationEngine.validate (cognitive 23): CoreAISegmentationEngine.validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e5a11ebecaf3750e78268022bdfa413a738e8b95a0eb0339a41f9d0891ba41"}},{"ruleId":"D2","level":"warning","message":{"text":"CLIPTokenizer.splitTokens (cognitive 23): CLIPTokenizer.splitTokens has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Text/CLIPTokenizer.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"42739dc61a80550443ffda82609d83390d23110f01fdeac8a6b761be7ab12487"}},{"ruleId":"D2","level":"warning","message":{"text":"DiffusionRunner.run (cognitive 23): DiffusionRunner.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c609d42583316f39eecb99c85495876938af2759c821d54d0bf93e40c43f5729"}},{"ruleId":"D2","level":"warning","message":{"text":"mlir_ops._replace_cache_update_autofuncs (cognitive 23): mlir_ops._replace_cache_update_autofuncs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/mlir_ops.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d05d16cd36d14d98d81466633ed7af1ef9eb15d7acd055e98862de1366a8bbd"}},{"ruleId":"D2","level":"warning","message":{"text":"compression.quantize_pytorch_model (cognitive 22): compression.quantize_pytorch_model has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), ternaries 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":"python/src/coreai_models/export/compression.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"261bb3fd126427ff7d6d660514ab3cbc30384d5e4899d404867d7e67926aea13"}},{"ruleId":"D2","level":"warning","message":{"text":"GptOssForCausalLM.from_hf (cognitive 22): GptOssForCausalLM.from_hf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gpt_oss.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"00dcac863cbd6332c28fa7ee0d1a984992547b5ed61c7fc221c930668c9c04e7"}},{"ruleId":"D2","level":"warning","message":{"text":"LatentPreviewTuner.exportStepPreviewsFromDirectory (cognitive 21): LatentPreviewTuner.exportStepPreviewsFromDirectory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"fabce43ec34129c54078881f69ee3678ff220cba887fb1888f6c0dfc50f4c1c9"}},{"ruleId":"D2","level":"warning","message":{"text":"ThinkTagParser.drainTagPair (cognitive 21): ThinkTagParser.drainTagPair has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 3 (7 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"491aff77bb60a9d52126cb5d503579e0f6f2ef85af0ef8e3f72f860c78b83359"}},{"ruleId":"D2","level":"warning","message":{"text":"ConstrainedGenerationSession.swift._applyBitmask (cognitive 21): ConstrainedGenerationSession.swift._applyBitmask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/GuidedGeneration/ConstrainedGenerationSession.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"27fff3a42bfeb942a295ffa650442e000b7516ddcdd20198894a02ae237c0cb2"}},{"ruleId":"D2","level":"warning","message":{"text":"TrackerLoop.propagate (cognitive 21): TrackerLoop.propagate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoSegmenter/Tracking/TrackerLoop.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c416c21b2838aa372d9c98e852a8e868c78f5c1c1281661c7d3f05ae09e4ea"}},{"ruleId":"D2","level":"warning","message":{"text":"ObjectDetectorCLI.run (cognitive 21): ObjectDetectorCLI.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (5 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/object-detector/ObjectDetectionMain.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8f814290ab4f3a66aa602555cefb091ecf8b4f9977eb4ade68340cca16981e"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3VLForCausalLM._mutate_state_dict (cognitive 21): Qwen3VLForCausalLM._mutate_state_dict has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea80bc0048aced74a7e25ce0ba0eef7d12c76f66ca60f5296cc4c5659e05468a"}},{"ruleId":"D2","level":"warning","message":{"text":"rope.initialize_rope (cognitive 21): rope.initialize_rope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/primitives/macos/rope.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a52df9f771758790d68beecc8186afa2f4d4df53facd4b84e957550a0ac301c"}},{"ruleId":"D2","level":"warning","message":{"text":"FlowTransformerPipeline.generateImages (cognitive 20): FlowTransformerPipeline.generateImages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), match/switch 1, ternaries 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":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a0d28be96b68845def22aad38c18eb5f39dc6adb1a9fba3da5cf3b80eace0b0"}},{"ruleId":"D2","level":"warning","message":{"text":"StaticStateFactory.makeStateSet (cognitive 20): StaticStateFactory.makeStateSet has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Handlers/StateHandler\u002BStatic.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b148a3caa6fd16cf5b6629f5ff57b3d789d9d68b99d997aae465a4863caab5"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMRunner.runVLMGeneration (cognitive 20): LLMRunner.runVLMGeneration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, 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":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0cdce59bd3355eae2367af322a2fd7d383f269f784428f560096cfe1ee599a"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatHandler.swift.tokenizeMessages (cognitive 20): ChatHandler.swift.tokenizeMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 1 (2 pts), error handling 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":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6ce8f3043079d8379f90d8926f3e07ccc8fe5fba96a4a214f6cbd2eed75494"}},{"ruleId":"D2","level":"warning","message":{"text":"pipeline._save_flux2_sidecar_assets (cognitive 20): pipeline._save_flux2_sidecar_assets has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/pipeline.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2b1dbeb0e309b4633eb0cfbf0de2f7bc40612d6f31dfaafc5be58f14e9a041"}},{"ruleId":"D2","level":"warning","message":{"text":"model_registry._action_list_models (cognitive 20): model_registry._action_list_models has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 2, ternaries 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":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eeeb236106f9db01df65b06f3b3f238a0bb14d6da25f9566d22f5f425fc9917"}},{"ruleId":"D2","level":"warning","message":{"text":"Gemma3ForCausalLM._mutate_state_dict (cognitive 20): Gemma3ForCausalLM._mutate_state_dict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6aa35cde2baa6461ed92b284afa5a1a386eafed15b64fee1d2c858e9dd6beb4"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3ForCausalLM._mutate_state_dict (cognitive 20): Qwen3ForCausalLM._mutate_state_dict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d022b2eca0f99be9d02f614019435e5c16a36d5b95aa61c1307359b4424c5cb6"}},{"ruleId":"D2","level":"warning","message":{"text":"EngineImpl.performWarmup (cognitive 19): EngineImpl.performWarmup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1774}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec6973f8a0fff311f6fac1532222a42378d14c2b9f18e616c95020fbda791d9b"}},{"ruleId":"D2","level":"warning","message":{"text":"CLIPTokenizer.bpe (cognitive 19): CLIPTokenizer.bpe has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Text/CLIPTokenizer.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc45e0d927e856732a42ce96eb79fddac4d1047b35b79d715a81d73d85da8fbd"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoSegmenter.run (cognitive 19): VideoSegmenter.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (6 pts), match/switch 2, 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":"swift/Sources/CoreAIVideoSegmenter/VideoSegmenter.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a111b3d2dc7d28d8ba1caffae87af746dec3425c3ba7534425c519446f29abd"}},{"ruleId":"D2","level":"warning","message":{"text":"OcclusionSuppressor.applyObjectWiseNonOverlap (cognitive 19): OcclusionSuppressor.applyObjectWiseNonOverlap has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (7 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoSegmenter/Tracking/OcclusionSuppressor.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"1986ea78578bfac215cf51161fb058bff2800784370f535c3b83049dc13e7349"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMRunner.validate (cognitive 19): LLMRunner.validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. 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":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"01f5280b10d8aa028ba73ef34878fa4a3bc8d3648079312881de1e1eff9a5328"}},{"ruleId":"D2","level":"warning","message":{"text":"MistralForCausalLMForiOS._mutate_state_dict (cognitive 19): MistralForCausalLMForiOS._mutate_state_dict has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"e58498c57995462173578c54c2d4b8c1b425a176f26a521cc75ccc9deaa7370f"}},{"ruleId":"D2","level":"warning","message":{"text":"Olmo2ForCausalLMForiOS._mutate_state_dict (cognitive 19): Olmo2ForCausalLMForiOS._mutate_state_dict has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/olmo2.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"3052836a17c78180cad9657dd0ee2b198cb6ec259e2b358ba28149525503b530"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3ForCausalLMForiOS._mutate_state_dict (cognitive 19): Qwen3ForCausalLMForiOS._mutate_state_dict has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/qwen3.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"581d018c8336684df3cb63bb1afe980746c90c65691a79960cac6d6d090feddb"}},{"ruleId":"D2","level":"warning","message":{"text":"SingleFunctionContext.init (cognitive 18): SingleFunctionContext.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3f4ff88070478d2dd384206ee0b10423073cb86c867244f3c431eeeb3e554f9"}},{"ruleId":"D2","level":"warning","message":{"text":"EngineImpl._encodeNextStepGPU (cognitive 18): EngineImpl._encodeNextStepGPU has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4, boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab905dde4e2782f08450bc9fecbccb537e9d0e8eedc35eba2cda1a90964032c"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAIExecutor.respondVanilla (cognitive 18): CoreAIExecutor.respondVanilla has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1dfb021dd4b6162ab4c2b6aad6b8efc4e0034f8a8b56434290be0eaee5025a3"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAIExecutor.makeTokens (cognitive 18): CoreAIExecutor.makeTokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (3 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"029a6a6dd40fa161c3789b32857a84f0f0df5b37096c1e435cca0861b49078b7"}},{"ruleId":"D2","level":"warning","message":{"text":"ObjectDetector.buildInputNDArray (cognitive 18): ObjectDetector.buildInputNDArray has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIObjectDetector/ObjectDetector.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"46fc6516c9973958fb1016486e8f2d5486408206eac15a9ef16b1f0b73bb633e"}},{"ruleId":"D2","level":"warning","message":{"text":"Attention.__init__ (cognitive 18): Attention.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"673ef41d60345c14b5a0f3d5940ad04bbf66ea02a1d7a2884df4674d57792185"}},{"ruleId":"D2","level":"warning","message":{"text":"FlowTransformerPipeline.blendTile (cognitive 17): FlowTransformerPipeline.blendTile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17761c63c7887d64be35b986f9cf89f57a500623f68c5979116abbc258fd0b1"}},{"ruleId":"D2","level":"warning","message":{"text":"model_registry._action_list_variants (cognitive 17): model_registry._action_list_variants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"4350b5a3b643942c1748f09c944ca97efd7a777288c3e7deb98e978af1dfbb33"}},{"ruleId":"D2","level":"warning","message":{"text":"NDArray\u002BHelpers.swift.fillNDArray (cognitive 16): NDArray\u002BHelpers.swift.fillNDArray has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts) (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":"swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50e7c48090ab32faebfd87d94474b808207a351cc98fee19384c6a408143959"}},{"ruleId":"D2","level":"warning","message":{"text":"model_registry._print_all_tables (cognitive 16): model_registry._print_all_tables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2e423f70e0e71844100fc9c06610fab05c7ccd4ab83d9d092fbe8f626231cb"}},{"ruleId":"D2","level":"warning","message":{"text":"GptOssForCausalLM._mutate_state_dict (cognitive 16): GptOssForCausalLM._mutate_state_dict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gpt_oss.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcf8086c99b724e8ecee527e21b92c11d4c88325fa708dbe9e2beb0803dddd9f"}},{"ruleId":"D2","level":"warning","message":{"text":"DecomposedRoPE.forward (cognitive 16): DecomposedRoPE.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/primitives/macos/rope.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5070f7c1da6ceb0556293bddcce22ec6ab1fa3c5481e19af77a17bae973a46fa"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FlowTransformerPipeline.sanaSprintSigmas: MethodTooLong \u2014 sanaSprintSigmas runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e4758a61c7965c52d3cce4bcf55bae5575e26854346f56c22d01056c630ac7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LLMRunner.runModel: MethodTooLong \u2014 runModel runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e66d463c91df7adb3c59c4c8cc3b3a542eccfe72de9e3f267dbfefc6e3edae8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: InferenceEngines/CoreAIPipelinedEngine.swift: FileTooLong \u2014 1200 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: EngineImpl (550-1910). The bar is 500 significant lines; this is 700 over it, 2.40\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"06cc198505af9a78e251da8b203e723a7e8c8cab7974cd227dab63b6f39c6d03"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: EngineImpl: ClassTooLong \u2014 866 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 466 over it, 2.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb0228613cba3ed1f2b0b2526d446cd56290ec4f11bbc9949d3a8ea0d608dc88"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LLMRunner: ClassTooLong \u2014 821 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 421 over it, 2.05\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0abd0a278043f6681c01bf43280f78b563fb2a15c03f4436bbddb6eeac857a0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CoreAISegmentationEngine: ClassTooLong \u2014 820 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 420 over it, 2.05\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"671ba26ace80dbea35ead0186240124300ff80be0425f9194733eb59a5ce4cef"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: coreai_models/model_registry.py: FileTooLong \u2014 1001 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 501 over it, 2.00\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/model_registry.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b8e8f0b9b6c8c1e11a990ff8d5535d1185d740939f182488f5052f963a9404"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Samplers/MPSGraphSamplers.swift: FileTooLong \u2014 876 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 376 over it, 1.75\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76639793b29fc559a67ce70f0fc834764e7043b36b32d2129a8aa43cee947390"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: llm-runner/LLMRunnerMain.swift: FileTooLong \u2014 859 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: LLMRunner (70-1291). The bar is 500 significant lines; this is 359 over it, 1.72\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"950a119cca9333b458600f11e307fb682472c5fbe066dc14fc8fe87feb2237e5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: CoreAIImageSegmenter/ImageSegmentationEngine.swift: FileTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CoreAISegmentationEngine (23-1276). The bar is 500 significant lines; this is 324 over it, 1.65\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ff793eb33adaf7d049156054cb0c69bb81fbae4f77cd3fd4ad0188ba406ff9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EngineImpl.init: MethodTooLong \u2014 init runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"602505e0e8ef4edcff8e5c92fd961c45364b03564ab212346ff1190471eeed6d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WanPipeline.generateVideo: MethodTooLong \u2014 generateVideo runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/WanPipeline.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"e819578d916d57659174f167fe9a59725d470a31c031c5bfc472406e22b1e0bf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiffusionRunner.runParityTest: MethodTooLong \u2014 runParityTest runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac28da19985565e2a07f781c513c72af82a469ddde940b9002fd1634eb179fd5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EngineImpl._encodeNextStepGPU: MethodTooLong \u2014 _encodeNextStepGPU runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"8068580edfa9d66ee404ff53beef58ab9423eb68d163b5435febb319e4fa5455"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: macos/muse_glimmer.py: FileTooLong \u2014 694 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 194 over it, 1.39\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d009651e1aa50e0120d15eb1967aa6743aaf03907ea29327a054d4713a44203d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: vlm/export.py: FileTooLong \u2014 670 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 170 over it, 1.34\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/vlm/export.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8f9d2ff2c0c9e4a3a75ce1d5060bfffa865c882199c9716a88eb7b6575f7a5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FlowTransformerPipeline: TooManyMethods \u2014 39 methods. The bar is 30 methods; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e063d73ce4a35a2b229aac309b3e2bde8da73f4fb133d473266373684edec97"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ChatHandler.swift.runChatCompletion: FunctionTooLong \u2014 runChatCompletion runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f8d4df5feef0f3e940c602519f7f3a56c210e0f93d3ed0d7cfe733ffc3c6e6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MPSGraphCompositeSampler: ClassTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 118 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"29cf82ec08d0efd4de67338eb20833724b276a64ca2672fbcd82c35a4db4378b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StaticShapeEngine.init: MethodTooLong \u2014 init runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ca22acd10fed26c224e7ae3286e7a640c15c5d12300f811fc54fc86e89d463"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MPSGraphCompositeSampler.init: MethodTooLong \u2014 init runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"6be65000f9b9bad362f53fc1c79b0443da05cb421fdf36be01ba107d5552b978"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/base.py: FileTooLong \u2014 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2775ab74c255cb9068853dd5a8342e5b1250c6101837212d7c5e37429fee8dec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: InferenceEngines/CoreAISequentialVLMEngine.swift: FileTooLong \u2014 603 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: CoreAISequentialVLMEngine (72-914). The bar is 500 significant lines; this is 103 over it, 1.21\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6acb80a93b418f1c116eb47504993b5c613aebf622b8db697f00a4862d3cfd67"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CoreAISegmentationEngine: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f396fff0f41f3965c56cbe0f6d6cad8461e21e3911b31e1a78bc294a8e2fb4e5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: VideoDiffusionRunner.run: MethodTooLong \u2014 run runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/videodiffusion-runner/VideoRunnerMain.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"f83200e662cacaac8f4b0ee3c99f505066f3a742823adc30ef041691dd45a68a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CoreAISequentialVLMEngine: ClassTooLong \u2014 455 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 55 over it, 1.14\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ebe83415aa9dd930a1426db135e03f0ab45cab92d73df6dc90fb2653ad212f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CoreAILanguageModel: ClassTooLong \u2014 451 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 51 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"588dcf6af420178c331291ac1565f015c9b5686bb2212395bbdd06e4f8a395c4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: StaticShapeEngine: ClassTooLong \u2014 447 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 47 over it, 1.12\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"38bfc078ae9d30cad2d7d49f1f655fb371a06b7d1a87419599efd3a1f82c6abb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: segmentation/video_pipeline.py: FileTooLong \u2014 558 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 58 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/video_pipeline.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d7946bf961b09557551bf143b887654376cc3668e52b59fb85bff758ada2f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: InferenceEngines/CoreAIStaticShapeEngine.swift: FileTooLong \u2014 551 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: StaticShapeEngine (20-728). The bar is 500 significant lines; this is 51 over it, 1.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02db70596dd32eff562dbb1b917805ff453977922fd7e8c2526585ff39bd749"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: macos/diffusion_gemma.py: FileTooLong \u2014 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/diffusion_gemma.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"391c4f8ec1851c9bfa88e0d362e7d272ef1e6fdb6d9629f22dd7ce6f6d8a1425"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ImageSegmenterCLI: ClassTooLong \u2014 428 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 28 over it, 1.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"c891463e1c3a2d5186c0bc506740cf6e892ef2dd0bcb75637b924ca342df1047"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CoreAISequentialVLMEngine.init: MethodTooLong \u2014 init runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5da779afb0c1d993d60a42742dc430a951aeab69ccdf92405a30ea68de9470"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: llm-server/ChatHandler.swift: FileTooLong \u2014 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62644e155745fb77b82bf715526d73b1ca7330210a02a017b5fdf41434d17471"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WanPipeline: ClassTooLong \u2014 417 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 17 over it, 1.04\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/WanPipeline.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b500bd9164f8032bb0d44105d33e7e36bd47db1140163916ff78bee0cedb125"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LLMServer.run: MethodTooLong \u2014 run runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/LLMServerMain.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"652eaa4b795b51e27f5e9110acc266d3e7bfd7ea011a1ecd0c31920d62f75c62"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: InstrumentsProfiler: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Profiling/InstrumentsProfiler.swift"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"d768ecc41bba44a2b0a18b3d1b36a89fdfc3f191944a7196d2237f8e98152c4e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ChatHandler.swift.runStreamingLoop: FunctionTooLong \u2014 runStreamingLoop runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d927a79f551e5ef118f9f8fdaeeb5b6d3e096fc2506f8da501569d952b85858"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: SpeechRecognizerMain.swift.runLegacy: FunctionTooLong \u2014 runLegacy runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e81e5e60fbff215d0c60eb087af8869ddd7685388970ca283fdfd475472820"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Stream.decodeFrames: MethodTooLong \u2014 decodeFrames runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a438506d6c98354716f8c851be08607bbf2d246da3b9ca5a8c62be6a94491d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 37 shared lines): python/src/coreai_models/models/macos/gemma3_text.py:116-164 | python/src/coreai_models/models/macos/mixtral.py:78-120 | python/src/coreai_models/models/macos/qwen2.py:55-97 | python/src/coreai_models/models/macos/qwen3.py:60-108 | python/src/coreai_models/models/macos/qwen3_moe.py:61-109 \u2014 These 5 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18954984ce2f9a419041ce68ac0d22ab096a13755f70a9c7666f4cb17828795"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 37 shared lines): python/src/coreai_models/models/ios/mistral.py:53-101 | python/src/coreai_models/models/ios/olmo2.py:57-104 | python/src/coreai_models/models/ios/qwen2.py:56-104 | python/src/coreai_models/models/ios/qwen3.py:58-109 \u2014 These 4 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1fb4c4e8fa0635c981756ecc8552ce1624dbc898b9915a71a6075cf7ae646a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 39 shared lines): python/src/coreai_models/models/macos/gemma3n.py:439-518 | python/src/coreai_models/models/macos/muse_glimmer.py:310-392 | python/src/coreai_models/models/macos/muse_glimmer.py:777-861 \u2014 These 3 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c32836039f6af81ba8c7faf25fdf562396f0cc3be14fb218bec41dc41606b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 21 shared lines): models/t5/export.py:173-224 | models/whisper/export.py:142-184 | models/yolo/export.py:148-200 \u2014 These 3 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/t5/export.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f652cd068c4ed330ec773dabc66845cf70c38328a173e64a3c82e1cf4d9cf81"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:29-59 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:30-60 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"1213327b64239ac2eac98cf0afb1b464105ce3d0bb2e2a2b7bd09531fb8f9bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:222-276 | swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:337-389 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f2e53cb23a014bc940182d886e09be56dc64cc9a6a5385a761174c9534e3871"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): python/src/coreai_models/models/ios/mistral.py:28-42 | python/src/coreai_models/models/ios/olmo2.py:28-46 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"399715a2d3af831d0645a86027abf39878821d9f055417acc8c60700638b6f4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (13 members, 50\u002B identical tokens): python/src/coreai_models/models/ios/mistral.py:260-319 | python/src/coreai_models/models/ios/olmo2.py:258-313 | python/src/coreai_models/models/ios/qwen2.py:261-327 | python/src/coreai_models/models/ios/qwen3.py:266-325 | python/src/coreai_models/models/macos/gemma3_text.py:251-300 | python/src/coreai_models/models/macos/mistral.py:169-195 | python/src/coreai_models/models/macos/mixtral.py:203-289 | python/src/coreai_models/models/macos/olmo2.py:166-192 | python/src/coreai_models/models/macos/qwen2.py:176-217 | python/src/coreai_models/models/macos/qwen3.py:187-237 | python/src/coreai_models/models/macos/qwen3_moe.py:235-334 | python/src/coreai_models/models/macos/qwen3_vl.py:198-256 | python/src/coreai_models/models/macos/qwen3_vl.py:339-402 \u2014 These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5cc15403ad6a4f709e967362bd183ab61bdd6e3664e53b11949db42c9a458bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): models/clap/export.py:138-172 | models/clip/export.py:144-178 | models/depth-anything/export.py:141-170 | models/edsr/export.py:99-128 | models/efficient-sam/export.py:137-193 | models/pvt/export.py:97-126 | models/roberta/export.py:100-131 | models/t5/export.py:140-169 | models/wav2vec2/export.py:107-136 | models/whisper/export.py:104-138 | models/yolo/export.py:115-144 \u2014 These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"9afbce9dc340adb68b485fe3bbd6ffd4d762e095c36afdcfe963dbdd390162ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (10 members, 50\u002B identical tokens): models/clap/export.py:107-117 | models/clip/export.py:113-123 | models/depth-anything/export.py:111-121 | models/edsr/export.py:68-78 | models/pvt/export.py:66-76 | models/roberta/export.py:69-79 | models/t5/export.py:109-119 | models/wav2vec2/export.py:76-86 | models/whisper/export.py:74-84 | models/yolo/export.py:84-94 \u2014 These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd46fb43c4b1aed8e2a2b3bdf7c13b9348515fd72eb088b5e210b710cd3c8cc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift:59-99 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift:75-107 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/PipelineConfiguration.swift:85-117 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:170-250 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:280-400 | swift/Sources/CoreAILMCommon/ReplayTypes.swift:59-79 | swift/Sources/CoreAISpeech/MelSpectrogram.swift:62-81 | swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/VideoConfiguration.swift:67-97 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8955cfc7432f3ea20a7be273d0abfc4300e804ead0853bea7bb3ea69ef7244"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): python/src/coreai_models/models/macos/mistral.py:117-123 | python/src/coreai_models/models/macos/mixtral.py:153-159 | python/src/coreai_models/models/macos/olmo2.py:118-124 | python/src/coreai_models/models/macos/phi3.py:171-177 | python/src/coreai_models/models/macos/qwen2.py:124-130 | python/src/coreai_models/models/macos/qwen3.py:135-141 | python/src/coreai_models/models/macos/qwen3_moe.py:183-189 | python/src/coreai_models/models/macos/qwen3_vl.py:118-124 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfefac80e08f3876b0d4fbb1bf26a4884dbdfb3545ab2f090e915d3fd2bc6646"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): python/src/coreai_models/models/macos/mistral.py:95-101 | python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:176-181 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:128-133 | python/src/coreai_models/models/macos/qwen2.py:102-108 | python/src/coreai_models/models/macos/qwen3.py:113-119 | python/src/coreai_models/models/macos/qwen3_vl.py:96-102 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"7179b25cc0b681bceccda2d2ab3db6113c44ff92b6e9cdaab7d6e88d9395c71b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:481-538 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:552-642 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1195-1258 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1261-1339 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"11712e0f67e21f99c1d43e4ea64aced03b381e01ca9bd42bf50c32ee2dea08ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): python/src/coreai_models/models/ios/mistral.py:169-187 | python/src/coreai_models/models/ios/olmo2.py:167-185 | python/src/coreai_models/models/ios/qwen2.py:172-188 | python/src/coreai_models/models/ios/qwen3.py:177-193 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc3ec542e055e192b9058eb74b520a791bb8a493d6f3b48011c3f18c4fb305a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): python/src/coreai_models/models/ios/mistral.py:199-230 | python/src/coreai_models/models/ios/olmo2.py:197-228 | python/src/coreai_models/models/ios/qwen2.py:200-231 | python/src/coreai_models/models/ios/qwen3.py:205-236 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"920c1e18c551ea5a1c5c1f3455021e770142e7368f7dfbd3456562206c1e32ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): python/src/coreai_models/models/ios/sam3/detr.py:39-46 | python/src/coreai_models/models/ios/sam3/image_encoder.py:45-53 | python/src/coreai_models/models/ios/sam3/mask_decoder.py:28-35 | python/src/coreai_models/models/ios/sam3/sam3_reauthored.py:35-42 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/sam3/detr.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa9281b7d0c0899acc6e254e1748c972d2271e18784c1dd4edbb1c4fac5eec4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): python/src/coreai_models/models/macos/muse_glimmer.py:103-151 | python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:136-171 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:87-123 | python/src/coreai_models/models/macos/phi3.py:82-132 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32f12c5abf1cc3012e62894a674d1b9a73c625faf18055503fe300658d60c88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201345 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:423-467 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1099-1142 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32cbc5d45a461a7d4040cea5086017736f29b1d152b3271b5480f9032719933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201336 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:986-1021 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1532-1560 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"77033ca2955a0ba3c9cedc34553081c11613a9455217dac7b282e2cd02a4b577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201331 lines \u00D7 2): swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedDecodingStrategy.swift:125-155 | swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedGenerator.swift:193-221 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedDecodingStrategy.swift:125\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedDecodingStrategy.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"544efef382556babf94992c02d190859297eb99cbe758c7a462e241ea9cbede6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): swift/Sources/Tools/llm-server/ChatHandler.swift:194-222 | swift/Sources/Tools/llm-server/ChatHandler.swift:409-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060swift/Sources/Tools/llm-server/ChatHandler.swift:192\u0060 calls \u0060Int\u0060, \u0060Date\u0060 and \u0060swift/Sources/Tools/llm-server/ChatHandler.swift:407\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c473e9e5f7148afffbf5978eee1d8cb36353660fa74993a5d518f163234399e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:250-276 | swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:363-389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:250\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62021ef38c39173b09ace1bd1cf63b9abf1be76ecd9c2766d308ec74f480479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:581-606 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1282-1307 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"36599bc194498859a4b0218aabec8b315dfa25dfe123c4dcd6b31dac5e47318d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): swift/Sources/Tools/llm-runner/LLMRunnerMain.swift:952-975 | swift/Sources/Tools/llm-runner/LLMRunnerMain.swift:1018-1041 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/Tools/llm-runner/LLMRunnerMain.swift:952\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060swift/Sources/Tools/llm-runner/LLMRunnerMain.swift:1043\u0060 calls \u0060withFrameCount\u0060 and \u0060swift/Sources/Tools/llm-runner/LLMRunnerMain.swift:977\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"054ea0e9ae71304d1141ead9e5b24e947e710eb1e30c2acfad186dcff79091b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift:27-48 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift:97-118 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b294c3e308a186096f02e141c4501c194a64347d1f25cb002ce455c314aab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:519-538 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:623-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 \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:519\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df134219d89e5e97ce9b3a24e1e37d00f199e8d911e66e973f0a1f9b4e806b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201319 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:612-630 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1317-1328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:612\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4f6f3321c8083ce037a7d8b1a521ef4ef880490534d8d32c20804cc574048c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1240-1258 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1321-1339 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1240\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea172f6a891f841334d28246df8d41178fb2079db1f56ddfd3abc8c0000e39c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201317 lines \u00D7 3): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:988-1004 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1534-1549 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1715-1725 \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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":988}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07461760126ab5ddcbe87104d41949e69cbd9b32c6f19d56d234473d5a904e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:621-637 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1238-1253 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1319-1334 \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 \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:621\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04f8a4d7c816c02ab0184a198884aa13fa1e16ff45b280a0867f56fd483a2b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift:137-152 | swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift:196-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift:137\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift:133\u0060 calls \u0060Array\u0060 and \u0060swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift:194\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/TextGeneration/TextGenerator.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"a009d58a06536793437d586ee7a91fa89cdf79999f97b8a65ab34ca8cdb4b7f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:731-746 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:907-922 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:731\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ee5362848f45ec786b9cdb897ec01e6ceabea7fd2be9cc28e4b6d9a620762f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:950-965 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1511-1524 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"03625c571dedd192ec5b4ef8ef5a7247546baeb3a455e21256227e2eafc996a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:398-411 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1073-1087 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:398\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"520bb74149bff775e1e425a00d97f0cfd755f8a28f1ff204a56b1c1f59de6139"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:519-533 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:623-637 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1240-1253 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1321-1334 \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 \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:519\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7547a7dc832dc81e17e8a8f536b3797bc4249908b45af4933029f13f81b5a06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift:123-136 | swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift:252-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c6d6d86ab94d33beaef9ef655e955e6925bc6e8d149c47c036657d00ac7dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:327-340 | swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:463-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:327\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f6675bb428463e956e4f73832d51f6f31400de81b4025f99b739a833082941"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:382-395 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1051-1064 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:382\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"3472399c236411517a1b5ab1b3109f1c72b28afcfb20b0bc4fb5928446d8e1a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:503-517 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1225-1238 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"c891f1bc5bbf10f1e5c98604851a39bb18c4d80d0cefdd099f10b26842baa847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:88-100 | swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:142-155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIObjectDetector/ObjectDetector.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecced1751e701ca2c8793139dc014cc252f873a8ccf072bc77697b31a1768b77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:544-556 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:617-629 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:544\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cbb0a50824f7652dd0f9b6f2bd7ba6b628f1e24396afe911b914af8f31e0cc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift:63-75 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift:140-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 \u0060swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift:63\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationVisualization.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"041d6eb82a9ebabe3f73f0120aebba9b76f2bfa0095ea0c0ac0a1ea8c9c4c691"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 7): swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift:88-99 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/PipelineConfiguration.swift:106-117 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:239-250 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:387-400 | swift/Sources/CoreAILMCommon/ReplayTypes.swift:68-79 | swift/Sources/CoreAISpeech/MelSpectrogram.swift:70-81 | swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/VideoConfiguration.swift:86-97 \u2014 there are 7 copies across 6 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift:88\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d8e72f58479da419a25261ef4c051dd05cff7cc52fe6451476378ee6246cfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift:79-90 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline.swift:88-99 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/PipelineConfiguration.swift:101-112 | swift/Sources/CoreAILMCommon/ReplayTypes.swift:65-76 | swift/Sources/CoreAISpeech/MelSpectrogram.swift:68-79 | swift/Sources/CoreAIVideoDiffusionPipeline/Pipelines/VideoConfiguration.swift:82-93 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Bundle/DiffusionConfig.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0322bba3ff25698dd2e03718f33a484be0916dad9e60039d2c83670b6121e125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:48-59 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:49-60 \u2014 before extracting anything, compare \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift\u0060 and \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:48\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67fe436f69e3b6a11b0719fe821e5bd4390b0c0948183386a6340cba25d5ac4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift:129-140 | swift/Sources/CoreAILanguageModels/InferenceEngines/ModelConfig.swift:92-103 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift:129\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f97dc7dee8cdc7a0354472219f36366836d6f5064928d1f61aa02f518f8a3032"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1262-1273 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1434-1445 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1262\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"71321f2ac327b4f98fa256a55947fa9c16fd14843bf58c7f54ef1ca01725e51d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:525-536 | swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift:540-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/KVCache\u002BCoreAI.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b693b9cad24c0fb45c756da75d782caf84ed75dd0739c240502c6ad8a62377"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:364-375 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1034-1045 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:364\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"09c42597c6af23e86b75f1a156426eb9fa167aa739c713587ae6baa95030db8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:246-257 | swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:442-453 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:246\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d025bd42d75a1dfe79cb6b7bb3b173c1bd5d765ee48acff4802f4fe8c38a160"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift:636-644 | swift/Sources/Tools/speech-recognizer/SpeechParity.swift:459-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 \u0060swift/Sources/Tools/speech-recognizer/SpeechParity.swift:459\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060swift/Sources/Tools/speech-recognizer/SpeechParity.swift:471\u0060 calls \u0060zip\u0060, \u0060reduce\u0060, \u0060Float\u0060 and \u0060swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift:645\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"4437f1d05ce6d081bbe81c90e8405b6e82eeffab5666ad7509d124a150feb0f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:400-410 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1075-1085 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1177-1187 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:1175\u0060 calls \u0060buildInputs\u0060 and \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:399\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d89a27c0d3195f6873124db721fa57268d53292c793fa80ad44d60d0c1ca1db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Components/CoreAILatentCodec.swift:72-82 | swift/Sources/CoreAIShared/Image/CGImageUtils.swift:31-41 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Components/CoreAILatentCodec.swift: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":"swift/Sources/CoreAIDiffusionPipeline/Components/CoreAILatentCodec.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f52085927ecadde6a08e0f55d7aa849687580904c116a15075005b3ae948d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:567-577 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:593-603 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:567\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"515575a77d0db3adf4aa05e943a4f306ca9537dff35f6d5b6467601d1ec95716"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:29-39 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:30-40 \u2014 before extracting anything, compare \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift\u0060 and \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ea17ca133d6d043c8e7b53ff27b1cda00e2b8e97fd019726445e3a974d3037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:342-352 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:980-988 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:342\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09cc675ccde5460a029af92f74e3654a6ceefcd771ee1781b07480b33199a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift:183-193 | swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift:215-225 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift:183\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"316f4aea7077237ba6353e514be7eb5f5ff0dd9c6dc34e31cfea4843b9e64ac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift:676-686 | swift/Sources/Tools/object-detector/ObjectDetectionMain.swift:235-245 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"swift/Sources/Tools/image-segmenter/ImageSegmentationRunnerMain.swift"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"593610ab7a020fb89099115e7296ba4bd9d48c121b559934207a376eee1921a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift:306-315 | swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:265-274 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift:306\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Components/CoreAIDiffusionModelFunction.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"60cfdac226493532ed4216002f6d72ff7486e97bbca3a0abc8c1a346ee096d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:353-362 | swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:481-490 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift:353\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"swift/Sources/CoreAIDiffusionPipeline/Preview/LatentPreviewTuner.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"883d16a241eb64647dfbcae4e7b597553d677f7039b23d54fce99b17e9422ddc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:18-27 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:19-28 \u2014 before extracting anything, compare \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift\u0060 and \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e859320bd486d416b7e12b5b369b3515a34b2d8e5e34d702fdec9c88f5f3a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:410-419 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:803-812 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:410\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"140c60f5db4b08ba91f0a87b4cb66e7e5e044eec856955e87f6d34b1417b4648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): swift/Sources/CoreAIShared/Video/SequentialVideoReader.swift:32-39 | swift/Sources/CoreAIShared/Video/VideoFrameExtractor.swift:26-35 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Video/SequentialVideoReader.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"178ad50f73ae14a4005e74edebaa4859fba6502e55b16ed653b4fffec142ce8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:598-606 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:686-694 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:697-705 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:950-958 \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":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c3d90bc2decc12659abb9a46c4e20d27ba4fe85ac4d71ae84b0a9d120b858a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:249-257 | swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift:259-267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/Pipelines/FlowTransformerPipeline\u002BFlux2.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"902fb959be539601fdc52e5bfb39148044553cc55ce1c1ccac69a3c7e50bf51e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:108-116 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:124-132 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7922fe8e2b28d11fd4c8f5f6f1a0b4e8b5702d408814c94c12a096753c6cfad8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Handlers/InputHandler\u002BStaticBucket.swift:96-104 | swift/Sources/CoreAILanguageModels/Handlers/InputHandler.swift:84-92 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/Handlers/InputHandler\u002BStaticBucket.swift:96\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060handlers\u0060 to \u0060[any StaticInputHandler]\u0060 in one and \u0060[any SyncInputHandler]\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Handlers/InputHandler\u002BStaticBucket.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e838051bd5531acea9f94a68ce9de837173a8305b43826a21294edd41d5e1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): swift/Sources/CoreAILanguageModels/ToolCallParser.swift:161-169 | swift/Sources/CoreAILanguageModels/ToolCallParser.swift:220-228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/ToolCallParser.swift:161\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/ToolCallParser.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa323d3a57f9c14c14b489ceafa6128216c6794ec34ebd75a8f6fda40bf1b5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): swift/Sources/Tools/llm-server/ChatHandler.swift:108-116 | swift/Sources/Tools/llm-server/CompletionHandler.swift:33-41 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/Tools/llm-server/ChatHandler.swift:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1435ae27ac938545e4e49fed0974ed826c82da7655cf957635ec8d954e9eb67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:719-726 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:756-762 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:756\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce9992d375f92c9ea43d4417c24d9673ea00155463bcd95a96dc8b5cb88e4b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20138 lines \u00D7 4): swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:256-259 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:262-269 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:291-294 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:297-304 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:262\u0060 calls \u0060Int\u0060, \u0060rounded\u0060 and \u0060swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:256\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd06585608952e793b8a7224e92a988f6938545704376ca80ddac81ef1e3839"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1372-1379 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1406-1414 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:1372\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":1372}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e767f8ef2c5ae5173b90b636decb6dc9b25664358556ec712c957fa30e2ee9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): swift/Sources/CoreAILanguageModels/ToolCallParser.swift:189-196 | swift/Sources/CoreAILanguageModels/ToolCallParser.swift:238-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/ToolCallParser.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f138fb6ef2e495bbced63142a97027a45dcddc8bc97e351edbbe8e209ba4b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Profiling/InstrumentsProfiler.swift:637-643 | swift/Sources/CoreAILanguageModels/Profiling/InstrumentsProfiler.swift:657-663 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/Profiling/InstrumentsProfiler.swift"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"83714dc1ed0682c43d13141c6d3290ce373be5cf2ed1998321f7fedad39619c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:213-219 | swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:227-233 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIObjectDetector/ObjectDetector.swift:213\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIObjectDetector/ObjectDetector.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ed2896cf2701739603841661cb6d8684fbb4bed47b0187a680818ee9b742aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:292-298 | swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:326-332 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:292\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"51500a9f1b1489b39d0dcd22ac0f5f400109efa1c8ecfea92a677b746c9bcd69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift:371-377 | swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift:396-402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift:371\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae787997b7f2237a7102426503ce75e4deb73ceba86137bb97363d403c1177c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:1003-1008 | swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:1041-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 \u0060swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift:1003\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"4142300cefc847141de37db408847fbc7960e1713bc34e7234111b5d68888728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedDecodingStrategy.swift:167-172 | swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift:378-383 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"swift/Sources/CoreAILanguageModels/DecodingStrategies/ConstrainedDecodingStrategy.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39fbfceaf5166038ad5bec975d36ca1aec17a6bbea15f6f13ea89139cca1baa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:637-642 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialEngine.swift:110-115 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:637\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ceba786667393095fe611efefae45e106d1fbcca18a0440174fecf02d9e27f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): swift/Sources/CoreAIShared/Runtime/MaskBitset.swift:30-35 | swift/Sources/CoreAIShared/Runtime/MaskBitset.swift:41-47 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAIShared/Runtime/MaskBitset.swift: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Runtime/MaskBitset.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"94858ab75ed6ecd7029847249424eec21bac4a5ca310581d745b0f72935fbd77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:238-243 | swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift:431-439 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAIShared/Runtime/NDArray\u002BHelpers.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b4d1d8f535080033172df4261ee8c2d47013efde2dec2cd4ffdb78094e8b16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift:91-95 | swift/Sources/CoreAISpeech/SpeechRecognitionModel.swift:67-72 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a08b1114ac66689afd63723ca14772863ddf9a8ce9ff619a229a3ce45a1b5976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift:251-255 | swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift: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 \u0060swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/Postprocessing/SegmentationPostprocessor.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5def5a3211d4c1610062d35c6fc17d85ac1d4122ec2d7f194a657e16f1d382b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:690-694 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialEngine.swift:147-151 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift:690\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"d77060b1c2798d6b6c09956a5acb3ff2b3c75284f36175deb236da519230e674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:352-357 | swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift:993-997 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c72c0c9d727aad2c9318babdc6827c4b0a1ce2918420812ee794e207964ba0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAIShared/Image/CGImageUtils.swift:31-36 | swift/Sources/CoreAIVideoSegmenter/FramePreprocessor.swift:42-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 \u0060swift/Sources/CoreAIShared/Image/CGImageUtils.swift: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Image/CGImageUtils.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"e605e8a1abfd1d009ce207055b6a5061e893e9b7ccd7e627ca7415d302a3a1ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift:346-350 | swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift:366-370 \u2014 both copies are in the same file, so extract the block 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":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"f392d14ee24c9cbbfab17c5912370d5423b85a180c5e5a9edac30b31f7c23c21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift:61-65 | swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift:62-66 \u2014 before extracting anything, compare \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift\u0060 and \u0060swift/Sources/CoreAIDiffusionPipeline/RNG/TorchRandomSource.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIDiffusionPipeline/RNG/NumPyRandomSource.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a5f032b2cc0348a0f55e03a3fe61f0d20bb8b03eb69bf3141912eec6cbd489"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialEngine.swift:434-438 | swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift:894-898 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialEngine.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"841802e0f27e149db9ed3efe6775f8683da566d1a54406d32f8b1665bb331be4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): swift/Sources/Tools/llm-server/CompletionHandler.swift:49-53 | swift/Sources/Tools/llm-server/CompletionHandler.swift:59-63 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060swift/Sources/Tools/llm-server/CompletionHandler.swift: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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/CompletionHandler.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2e862b6df6334635c76d1d16d2dcd31c1b58136f78f9db9c96314238ba2ad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42\u201345 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:275-319 | python/src/coreai_models/models/ios/olmo2.py:272-313 | python/src/coreai_models/models/ios/qwen2.py:283-327 | python/src/coreai_models/models/ios/qwen3.py:281-325 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"86fee85a1f7603f2ce9f759c4775c630bdaed1eef0ec03e65c17abb305afb202"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37\u201343 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer.py:321-363 | python/src/coreai_models/models/macos/muse_glimmer.py:788-824 \u2014 both copies are in the same file, so extract the block 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9431f6b1f758319c38b4093f1b4c59b6d1e3efd2abc3e4493dde879c74f9f5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201333 lines \u00D7 2): python/src/coreai_models/models/ios/sam3/sam3_reauthored.py:96-128 | python/src/coreai_models/segmentation/pipeline.py:90-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/sam3/sam3_reauthored.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02da512a9b36a99fcb3693233eea97f8d1b66ebc229b97cdb1c5d5e41f7777c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201332 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:70-101 | python/src/coreai_models/models/ios/olmo2.py:74-104 | python/src/coreai_models/models/ios/qwen2.py:73-104 | python/src/coreai_models/models/ios/qwen3.py:80-109 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/ios/mistral.py:70\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060python/src/coreai_models/models/ios/qwen3.py:77\u0060 calls \u0060q_norm\u0060, \u0060k_norm\u0060 and \u0060python/src/coreai_models/models/ios/mistral.py:70\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d284cd707012b8b4b00dfbfc419706baf6a83758a33741355207a2094f5d54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:199-229 | python/src/coreai_models/models/ios/olmo2.py:197-227 | python/src/coreai_models/models/ios/qwen2.py:200-230 | python/src/coreai_models/models/ios/qwen3.py:205-235 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1939785a0225dfe52a0b32cfaf61aedc393fd4e7446b195897b4bf2058e51500"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): models/clap/export.py:183-210 | models/t5/export.py:180-207 | models/wav2vec2/export.py:147-174 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/t5/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 124 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py:183\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"d572706c6a5d009dcd74a0533c4dd3cb3c3ae4f96e961eb21f1509e56820c2e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201326 lines \u00D7 8): models/clap/export.py:193-217 | models/clip/export.py:199-224 | models/edsr/export.py:149-174 | models/pvt/export.py:147-172 | models/roberta/export.py:152-177 | models/t5/export.py:190-214 | models/wav2vec2/export.py:157-181 | models/yolo/export.py:165-190 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/clip/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py:193\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc2816fc583876a1a1737dccd9fb47ced8415becfc21d2989ce6cfee16e6821f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 8): python/src/coreai_models/models/macos/gemma3_text.py:254-277 | python/src/coreai_models/models/macos/mistral.py:172-195 | python/src/coreai_models/models/macos/mixtral.py:206-229 | python/src/coreai_models/models/macos/olmo2.py:169-192 | python/src/coreai_models/models/macos/qwen3.py:190-214 | python/src/coreai_models/models/macos/qwen3_moe.py:238-262 | python/src/coreai_models/models/macos/qwen3_vl.py:216-239 | python/src/coreai_models/models/macos/qwen3_vl.py:362-385 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/mistral.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e3957d86b9528c9840da7e3d968872f8338ddc0dae3b4e863b6370390dcb17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:137-161 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:87-111 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"33b3260c0a81fb7292f99beff8b6437d0573c560825c1b111aa8b62714daaf17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 3): python/src/coreai_models/models/macos/gemma3_text.py:123-146 | python/src/coreai_models/models/macos/qwen3.py:67-90 | python/src/coreai_models/models/macos/qwen3_moe.py:68-91 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/macos/gemma3_text.py:123\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"9186cb7bd1cfedb88e71b0dd8edd8ca8b2e15f4bf66e3a6ea45517fd0ea3d8d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): python/src/coreai_models/diffusion/export.py:96-120 | python/src/coreai_models/vlm/export.py:920-943 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060python/src/coreai_models/diffusion/export.py:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/export.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cdef632d064be787d7a56424006e48707b6d0f04e24bcd1c72a0f32b3b8f37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 7): models/clip/export.py:188-209 | models/edsr/export.py:138-159 | models/efficient-sam/export.py:203-224 | models/pvt/export.py:136-157 | models/roberta/export.py:141-162 | models/whisper/export.py:148-170 | models/yolo/export.py:154-175 \u2014 \u0060models/clip/export.py\u0060 and \u0060models/edsr/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 100 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clip/export.py:188\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clip/export.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5a106df5f315b97d38b51b74c50be9cfbd724fc3d67943bae55c7ed11443a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 10): models/clap/export.py:199-219 | models/clip/export.py:205-226 | models/depth-anything/export.py:192-211 | models/edsr/export.py:155-176 | models/pvt/export.py:153-174 | models/roberta/export.py:158-179 | models/t5/export.py:196-216 | models/wav2vec2/export.py:163-183 | models/whisper/export.py:160-181 | models/yolo/export.py:171-192 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/clip/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py:199\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d5a9324d30ad75699cad1a6e09fbf81b9c37bf6b73797857d8a1fad7fc4928"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201322 lines \u00D7 2): python/src/coreai_models/models/macos/mixtral.py:242-256 | python/src/coreai_models/models/macos/qwen3_moe.py:289-310 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_moe.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060python/src/coreai_models/models/macos/mixtral.py:259\u0060 calls \u0060pop\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_moe.py:311\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mixtral.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c25889b2d9057b8137010c4ffa02f34a5a89830aeefdac84bf0c77f63255ba9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer.py:371-392 | python/src/coreai_models/models/macos/muse_glimmer.py:841-861 \u2014 both copies are in the same file, so extract the block 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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f521eeb4c066fca67404d87b57ef51d860ffd714ba84186eb3c650f9d25956d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 5): python/src/coreai_models/models/macos/gemma3_text.py:139-159 | python/src/coreai_models/models/macos/mixtral.py:95-115 | python/src/coreai_models/models/macos/qwen2.py:72-92 | python/src/coreai_models/models/macos/qwen3.py:83-103 | python/src/coreai_models/models/macos/qwen3_moe.py:84-104 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/macos/gemma3_text.py:139\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91592971c1b51d980dc975bca266466a6c5d85815d3b65360bd0801686e223f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201320 lines \u00D7 5): python/src/coreai_models/models/macos/gemma3_text.py:281-300 | python/src/coreai_models/models/macos/qwen3.py:218-237 | python/src/coreai_models/models/macos/qwen3_moe.py:266-285 | python/src/coreai_models/models/macos/qwen3_vl.py:241-256 | python/src/coreai_models/models/macos/qwen3_vl.py:387-402 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8a5caf505fe91e17870be9679f1e0b36a4fbceedce0d26b0eef0346c61927b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): models/clap/export.py:178-197 | models/parakeet/export.py:631-650 | models/wav2vec2/export.py:142-161 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/wav2vec2/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 144 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py:178\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e8389883ea78a0b8632b5b3a90dc26bfb71d0ce3a1c6de88e67e5edfb5b48e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): models/clap/export.py:182-200 | models/parakeet/export.py:635-653 | models/t5/export.py:179-197 | models/wav2vec2/export.py:146-164 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/t5/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 124 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py:182\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060models/parakeet/export.py:654\u0060 calls \u0060add_mutually_exclusive_group\u0060 and \u0060models/clap/export.py:201\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"f196354c1beb14133ae7f79affd190a53a30c7249162fb106d9a635e1fe0146f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): models/edsr/export.py:111-128 | models/pvt/export.py:109-126 | models/roberta/export.py:114-131 | models/wav2vec2/export.py:119-136 \u2014 \u0060models/edsr/export.py\u0060 and \u0060models/pvt/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 118 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/edsr/export.py:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/edsr/export.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea7f00beaa84c7fd57fb80ba635027aa38298a4ed3666c7246d8c432b41011a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:76-93 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:62-78 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"779a086aca220e594e3343ebed96474f8346c32ca000480e1a8e91cc2ad6af28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): python/src/coreai_models/models/ios/mistral.py:54-70 | python/src/coreai_models/models/ios/qwen2.py:57-73 | python/src/coreai_models/models/ios/qwen3.py:59-75 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/qwen2.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060python/src/coreai_models/models/ios/qwen3.py:77\u0060 calls \u0060q_norm\u0060, \u0060k_norm\u0060 and \u0060python/src/coreai_models/models/ios/mistral.py:72\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"77dbc53d88292f273b287baaa15a3cf9c0e50f7b4bb0ab942828fb5b75e7a599"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): python/src/coreai_models/models/macos/gemma3_text.py:116-131 | python/src/coreai_models/models/macos/mixtral.py:78-93 | python/src/coreai_models/models/macos/qwen2.py:55-70 | python/src/coreai_models/models/macos/qwen3.py:60-75 | python/src/coreai_models/models/macos/qwen3_moe.py:61-76 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4452483b239960bf7c60c875f071810f50b234372bd3f4d1e587260055c345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer.py:229-244 | python/src/coreai_models/models/macos/muse_glimmer.py:584-599 \u2014 both copies are in the same file, so extract the block 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":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb6ee014bd593d2e8a76e8413cac3bfec9940543e4dc7419df27da75600afe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): python/src/coreai_models/models/macos/gemma3n.py:450-464 | python/src/coreai_models/models/macos/muse_glimmer.py:313-327 | python/src/coreai_models/models/macos/muse_glimmer.py:780-794 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8207967bd67d73e8a1095d3f5d3ce2dd78537901fc0304e6a04af10172a2779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 3): python/src/coreai_models/models/macos/gemma3n.py:475-486 | python/src/coreai_models/models/macos/muse_glimmer.py:343-356 | python/src/coreai_models/models/macos/muse_glimmer.py:805-817 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3c8a48a289058a5fd7556e610f8c8d1abba427e34e27fe234b49e17dce1113"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 3): python/src/coreai_models/models/macos/gemma3n.py:494-505 | python/src/coreai_models/models/macos/muse_glimmer.py:364-377 | python/src/coreai_models/models/macos/muse_glimmer.py:834-846 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060python/src/coreai_models/models/macos/gemma3n.py:506\u0060 calls \u0060_mutate_state_dict\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer.py:847\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"787816485d216cddbcf63a1c028ec903d4f97ced5443c8746ab5789561518cc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): python/src/coreai_models/models/macos/qwen3.py:29-42 | python/src/coreai_models/models/macos/qwen3_moe.py:30-43 | python/src/coreai_models/models/macos/qwen3_vl.py:29-42 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/qwen3.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/macos/qwen3.py:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060Qwen3Config\u0060 in one and \u0060Qwen3MoeConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa258cc57f3d56113357b32d4cfd9fd4bd84421d09c9ad0374e13e4af31c1a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): python/src/coreai_models/models/ios/mistral.py:174-187 | python/src/coreai_models/models/ios/olmo2.py:172-185 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060Olmo2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"240aab91a667d4320fe2339e653dcbe6d231b13983ce7ed48febc7c7a05ab9cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): python/src/coreai_models/models/macos/mistral.py:27-40 | python/src/coreai_models/models/macos/olmo2.py:25-38 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/olmo2.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060Olmo2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dbc698f5e45768c1df5db4eb84a6a41b8ca5d57a391dd66b8f5cebba4d50d5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): python/src/coreai_models/models/macos/mixtral.py:276-289 | python/src/coreai_models/models/macos/qwen3_moe.py:321-334 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_moe.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mixtral.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55cf0e8459d3f2e0f674bf8c6ba5372bc2a06e92aa405aba7f0082aeea64b15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): python/src/coreai_models/segmentation/pipeline.py:293-306 | python/src/coreai_models/segmentation/pipeline.py:471-483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060python/src/coreai_models/segmentation/pipeline.py:293\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/pipeline.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0daff94d94451a8c29a3b668219fbd7c602fb1c415d043fa4e8a3e391d97967"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 12): python/src/coreai_models/models/ios/mistral.py:261-273 | python/src/coreai_models/models/ios/olmo2.py:259-271 | python/src/coreai_models/models/ios/qwen2.py:262-274 | python/src/coreai_models/models/ios/qwen3.py:267-279 | python/src/coreai_models/models/macos/gemma3_text.py:252-264 | python/src/coreai_models/models/macos/mistral.py:170-182 | python/src/coreai_models/models/macos/mixtral.py:204-216 | python/src/coreai_models/models/macos/olmo2.py:167-179 | python/src/coreai_models/models/macos/qwen3.py:188-200 | python/src/coreai_models/models/macos/qwen3_moe.py:236-248 | python/src/coreai_models/models/macos/qwen3_vl.py:214-226 | python/src/coreai_models/models/macos/qwen3_vl.py:360-372 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"d00925e7cd4da7a9711c04bf14c8f8f1df65d113ccf31169652eb4da8e22e26f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): python/src/coreai_models/models/macos/qwen3_vl.py:198-210 | python/src/coreai_models/models/macos/qwen3_vl.py:339-349 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e595acc14bba15379934c6692182122ab3d9b4ca9b7b861ddbb823316d13c0ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 13): python/src/coreai_models/models/ios/mistral.py:260-271 | python/src/coreai_models/models/ios/olmo2.py:258-269 | python/src/coreai_models/models/ios/qwen2.py:261-272 | python/src/coreai_models/models/ios/qwen3.py:266-277 | python/src/coreai_models/models/macos/gemma3_text.py:251-262 | python/src/coreai_models/models/macos/mistral.py:169-180 | python/src/coreai_models/models/macos/mixtral.py:203-214 | python/src/coreai_models/models/macos/olmo2.py:166-177 | python/src/coreai_models/models/macos/qwen2.py:176-187 | python/src/coreai_models/models/macos/qwen3.py:187-198 | python/src/coreai_models/models/macos/qwen3_moe.py:235-246 | python/src/coreai_models/models/macos/qwen3_vl.py:213-224 | python/src/coreai_models/models/macos/qwen3_vl.py:359-370 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060python/src/coreai_models/models/macos/qwen2.py:189\u0060 calls \u0060getattr\u0060 and \u0060python/src/coreai_models/models/macos/gemma3_text.py:264\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"a66c0552c853e4f26ff1c7fcd6eb0bf1c8c027b6dd0ccb78e768f616c656e595"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 9): models/clap/export.py:147-158 | models/clip/export.py:153-164 | models/edsr/export.py:108-119 | models/efficient-sam/export.py:167-178 | models/pvt/export.py:106-117 | models/roberta/export.py:111-122 | models/t5/export.py:149-160 | models/wav2vec2/export.py:116-127 | models/yolo/export.py:124-135 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/clip/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/clap/export.py: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":"models/clap/export.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e8d86de198da52de52f1ce008dfa7d8dfc4dc5fc187c0ccfd46d838dba54c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): python/src/coreai_models/export/pipeline.py:366-378 | python/src/coreai_models/export/pipeline.py:410-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/pipeline.py"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7a6aa4c76ac72a690f63c21fc7158bf4900362142cb625c8714ae97b2eaf60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): python/src/coreai_models/models/ios/qwen2.py:177-188 | python/src/coreai_models/models/ios/qwen3.py:182-193 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/qwen2.py\u0060 and \u0060python/src/coreai_models/models/ios/qwen3.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 224 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/ios/qwen2.py:177\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060Qwen2Config\u0060 in one and \u0060Qwen3Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/qwen2.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"06228f1dbeb36dc50dbaedf2f105f31d743ba077c5d453f62c17f11bcd3a460e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer.py:932-943 | python/src/coreai_models/models/macos/qwen3_vl.py:346-357 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060python/src/coreai_models/models/macos/muse_glimmer.py:932\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f66ea3c641dd36f25eb84c0ed034f9353b5e9c160f0694937c2be5b068d876e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 10): models/clap/export.py:107-117 | models/clip/export.py:113-123 | models/depth-anything/export.py:111-121 | models/edsr/export.py:68-78 | models/pvt/export.py:66-76 | models/roberta/export.py:69-79 | models/t5/export.py:109-119 | models/wav2vec2/export.py:76-86 | models/whisper/export.py:74-84 | models/yolo/export.py:84-94 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/clip/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9dbaf315572a03c5fa3306fce13df82ac1a8bc47d57f8080e04a930c0024277"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): python/src/coreai_models/diffusion/flux2.py:162-171 | python/src/coreai_models/diffusion/flux2.py:258-268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060python/src/coreai_models/diffusion/flux2.py:258\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/flux2.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea182d74095c24410a75fee02396a05a4db278808447743e6adb29e841a47dc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): python/src/coreai_models/models/macos/qwen3_vl.py:155-165 | python/src/coreai_models/models/macos/qwen3_vl.py:307-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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3_vl.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2926423399fd2a07c018a42a095626939644d82d874aa8c3145804c02f2c11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): python/src/coreai_models/models/macos/mistral.py:80-89 | python/src/coreai_models/models/macos/mixtral.py:110-119 | python/src/coreai_models/models/macos/olmo2.py:79-88 | python/src/coreai_models/models/macos/phi3.py:122-131 | python/src/coreai_models/models/macos/qwen2.py:87-96 | python/src/coreai_models/models/macos/qwen3.py:98-107 | python/src/coreai_models/models/macos/qwen3_vl.py:81-90 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060python/src/coreai_models/models/macos/mistral.py:78\u0060 calls \u0060narrow\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py:108\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"38e3ca524343cb6f852c285bab9c9b33bdd8703dba142e48de3ca449ed41c20d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:172-181 | python/src/coreai_models/models/ios/olmo2.py:170-179 | python/src/coreai_models/models/ios/qwen2.py:175-184 | python/src/coreai_models/models/ios/qwen3.py:180-189 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060Olmo2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d3510d838c1aefe4e3b9bb966d2024b30332eb666ef12a9e53af6ff05c6895"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/depth-anything/export.py:153-162 | models/yolo/export.py:127-136 \u2014 \u0060models/depth-anything/export.py\u0060 and \u0060models/yolo/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 49 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/depth-anything/export.py:153\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/depth-anything/export.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ffad410a671b036eaa880696d11e5806dba58917e1d157fcba245ae7cf90a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/t5/export.py:152-161 | models/whisper/export.py:121-130 \u2014 \u0060models/t5/export.py\u0060 and \u0060models/whisper/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 49 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/t5/export.py:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/t5/export.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"807899c511cc7d63a69d078525a1e66fea69acd326e3e19c5c81b2ccd17c1341"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 2): python/src/coreai_models/models/macos/gpt_oss.py:123-132 | python/src/coreai_models/models/macos/olmo2.py:74-80 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060python/src/coreai_models/models/macos/gpt_oss.py:123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gpt_oss.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b845805eeb11760fa9ab1feab2449e1db2349ea0491e189c7e5ed4863152441f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:64-73 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:50-59 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a60e1faf05183922f23a1c70406232272e719049d1ac1d5b5acdcf7c2ccef3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:164-171 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:114-123 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"88607bbc96021d86e6d0141be26f34f5b6d19a5c14cb64b8e891cdabb9784711"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): python/src/coreai_models/primitives/macos/cache.py:52-61 | python/src/coreai_models/primitives/macos/cache_scatter.py:41-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/primitives/macos/cache.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c97886268b854ae58859ed5dcee48ee6cc7fb8f796cc7fa11290601f0c6e9ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): python/src/coreai_models/models/macos/gemma3_text.py:151-159 | python/src/coreai_models/models/macos/mixtral.py:107-115 | python/src/coreai_models/models/macos/olmo2.py:76-84 | python/src/coreai_models/models/macos/qwen2.py:84-92 | python/src/coreai_models/models/macos/qwen3.py:95-103 | python/src/coreai_models/models/macos/qwen3_moe.py:96-104 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/macos/gemma3_text.py:151\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeef48772cb027fb009e8ce1e8ae7bc93e150cb3e1a446698a38656f64d0fc99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): python/src/coreai_models/models/macos/muse_glimmer.py:117-125 | python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:146-154 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:96-104 | python/src/coreai_models/models/macos/phi3.py:99-107 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060python/src/coreai_models/models/macos/muse_glimmer.py: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"a99a8d2bf390b41696d1e864cbf82a74b77c441de75675704aebb4095df0b74b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): python/src/coreai_models/models/macos/muse_glimmer.py:226-234 | python/src/coreai_models/models/macos/muse_glimmer.py:581-589 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:167-175 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0dee41fe2b6eb5d80fe0d268d221a20448536ba48100e50bd17f45c6cf7818"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 3): python/src/coreai_models/models/ios/mistral.py:28-36 | python/src/coreai_models/models/ios/olmo2.py:28-36 | python/src/coreai_models/models/ios/qwen3.py:38-39 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060Olmo2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f044c429f8511cf52e248b624c2240ffffce4c434265b5219b43c6f875c7b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer.py:532-540 | python/src/coreai_models/models/macos/muse_glimmer.py:927-935 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"510c24ee7938aad8191af0a531793841282b319141d8455c89899514f223d203"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): python/src/coreai_models/models/registry.py:23-31 | python/src/coreai_models/models/registry.py:62-70 \u2014 both copies are in the same file, so extract the block 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":"python/src/coreai_models/models/registry.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f071c6d3455b80114c77f334e0af9196a1b0a380c283638497ebd6e955266f44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 8): python/src/coreai_models/models/macos/gemma3n.py:195-202 | python/src/coreai_models/models/macos/mistral.py:83-90 | python/src/coreai_models/models/macos/mixtral.py:113-120 | python/src/coreai_models/models/macos/olmo2.py:82-89 | python/src/coreai_models/models/macos/phi3.py:125-132 | python/src/coreai_models/models/macos/qwen2.py:90-97 | python/src/coreai_models/models/macos/qwen3.py:101-108 | python/src/coreai_models/models/macos/qwen3_vl.py:84-91 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060python/src/coreai_models/models/macos/gemma3n.py:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c4566225adad7015c746060e85aa6b17c88d44b54230a6e9bb9e8fdc2a1b55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): python/src/coreai_models/models/ios/sam3/detr.py:39-46 | python/src/coreai_models/models/ios/sam3/image_encoder.py:46-53 | python/src/coreai_models/models/ios/sam3/mask_decoder.py:28-35 | python/src/coreai_models/models/ios/sam3/sam3_reauthored.py:35-42 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/sam3/detr.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d201ac4cd6ea69cfd3bfe1bd36702df7ad0f2f678643ff9bade04ad45234d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): python/src/coreai_models/models/ios/mistral.py:106-113 | python/src/coreai_models/models/ios/qwen2.py:109-116 | python/src/coreai_models/models/ios/qwen3.py:114-121 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/qwen2.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060Qwen2Config\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc37f9eb574fd9cda7292744adff9eb6dbf6b3fbd433b6e7cf67eccf140f6a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/models/ios/sam3/detr.py:163-170 | python/src/coreai_models/models/ios/sam3/mask_decoder.py:197-204 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/sam3/detr.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e9acf790ce59a92f5c9086fa0094d195af74a9893c64d1aa9fec99bb0bc3d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): python/src/coreai_models/models/macos/diffusion_gemma.py:593-600 | python/src/coreai_models/models/macos/diffusion_gemma.py:656-662 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060python/src/coreai_models/models/macos/diffusion_gemma.py:655\u0060 calls \u0060DiffusionGemmaSelfConditioning\u0060 and \u0060python/src/coreai_models/models/macos/diffusion_gemma.py:592\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/diffusion_gemma.py"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8afea706d5d00dd3e957d8728f872637d8b688c613e2bd2b6cda79fdef91e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/models/macos/gemma3n.py:159-166 | python/src/coreai_models/models/macos/qwen3_vl.py:70-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d412a2a2e7ce6aecf3bc291dd43dfc2d772c40188f57d095441369bc2fad66a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/models/macos/mistral.py:51-58 | python/src/coreai_models/models/macos/qwen3_vl.py:57-64 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_vl.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060python/src/coreai_models/models/macos/qwen3_vl.py:65\u0060 calls \u0060narrow\u0060, \u0060qk_norm\u0060 and \u0060python/src/coreai_models/models/macos/mistral.py:60\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdba97687ecf403b2ef8ec46c270b1578883bd041d2592a481a94a696fce80fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:219-226 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:152-159 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fd17b6da0a57a91db9ee97eb0b3a0c9794145e53b03c5f3e47eace8621ba10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/models/macos/olmo2.py:69-76 | python/src/coreai_models/models/macos/qwen3_vl.py:70-77 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/olmo2.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_vl.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/olmo2.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f30fe228e6aa75d1699854cf46790a3be42aa54a3dd86859078b5ab66f383404"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): python/src/coreai_models/vlm/export.py:429-436 | python/src/coreai_models/vlm/export.py:837-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/vlm/export.py"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca32748ebb4c67b1e44e0f7e55615439f62698ad47f79cdec0623b0dd5ad34a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): python/src/coreai_models/models/macos/mistral.py:117-123 | python/src/coreai_models/models/macos/mixtral.py:153-159 | python/src/coreai_models/models/macos/olmo2.py:118-124 | python/src/coreai_models/models/macos/phi3.py:171-177 | python/src/coreai_models/models/macos/qwen2.py:124-130 | python/src/coreai_models/models/macos/qwen3.py:135-141 | python/src/coreai_models/models/macos/qwen3_moe.py:183-189 | python/src/coreai_models/models/macos/qwen3_vl.py:118-124 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/mixtral.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060MixtralConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"4341c18b958dba4d35dd6d98ef597e2aaa2e7b905b7bd332ad5603f22d01f6ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 6): python/src/coreai_models/models/macos/mistral.py:95-101 | python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:176-181 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:128-133 | python/src/coreai_models/models/macos/qwen2.py:102-108 | python/src/coreai_models/models/macos/qwen3.py:113-119 | python/src/coreai_models/models/macos/qwen3_vl.py:96-102 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/mistral.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen2.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060MistralConfig\u0060 in one and \u0060SimpleNamespace\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mistral.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afc54db460ca29c4438e28da766f53a48797256464ae8254b0152776f510fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:53-59 | python/src/coreai_models/models/ios/olmo2.py:57-63 | python/src/coreai_models/models/ios/qwen2.py:56-62 | python/src/coreai_models/models/ios/qwen3.py:58-64 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f94509760ba7ded02ba01b7e5b0f5a1c99112109bf1f426995cafd3b64a38d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): python/src/coreai_models/models/macos/gemma3n.py:579-585 | python/src/coreai_models/models/macos/muse_glimmer.py:530-536 | python/src/coreai_models/models/macos/muse_glimmer.py:925-931 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3n.py"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"531e87f2e2666925153f2df998b63a7ed00b41cbc41395850985fce0daad6d4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): python/src/coreai_models/models/macos/muse_glimmer.py:60-66 | python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py:68-74 | python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py:54-60 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_dflash.py\u0060 and \u0060python/src/coreai_models/models/macos/muse_glimmer_drafter_ring.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccbdc9726cdf91a2c533080a6b9649a07bdd80cce829fdcf11128516286eae5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20137 lines \u00D7 3): python/src/coreai_models/models/ios/sam3/detr.py:136-142 | python/src/coreai_models/models/ios/sam3/image_encoder.py:74-76 | python/src/coreai_models/models/ios/sam3/mask_decoder.py:177-183 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/sam3/detr.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f7709e4adb65d2ea161ac6853acf77e1e90e610becefa6e27657e0f990d7617"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): python/src/coreai_models/segmentation/video_pipeline.py:477-482 | python/src/coreai_models/segmentation/video_pipeline.py:587-592 \u2014 both copies are in the same file, so extract the block 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":"python/src/coreai_models/segmentation/video_pipeline.py"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"586e78416680befc1639604e1498c4de1b2f085ec86a7c54d776d6e4b5d1838f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): python/src/coreai_models/models/base.py:251-255 | python/src/coreai_models/models/macos/gemma3n.py:469-473 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/base.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"941c79a3abe2dc26b93d371e5c79a942c8bc3960a5f9ee0629f54650f302d862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): python/src/coreai_models/primitives/ios/bidirectional_sdpa.py:88-92 | python/src/coreai_models/primitives/ios/sdpa.py:117-123 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/primitives/ios/bidirectional_sdpa.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c2e100abde0b46ee5a5772160ab524aa896c953403f4d56d7100f99e6c2198e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): python/src/coreai_models/segmentation/pipeline.py:423-427 | python/src/coreai_models/segmentation/video_pipeline.py:695-699 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060FullExportConfig\u0060 in one and \u0060VideoExportConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/pipeline.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"87a688db5e3e799005fffdc665be2d23e43f42d994177102ec218ba1797560b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 11): models/clap/export.py:122-127 | models/clip/export.py:128-133 | models/depth-anything/export.py:126-131 | models/edsr/export.py:83-88 | models/efficient-sam/export.py:106-111 | models/pvt/export.py:81-86 | models/roberta/export.py:84-89 | models/t5/export.py:124-129 | models/wav2vec2/export.py:91-96 | models/whisper/export.py:89-94 | models/yolo/export.py:99-104 \u2014 \u0060models/clap/export.py\u0060 and \u0060models/clip/export.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/clap/export.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"319bb7f943003b2eeaa5a3a085ecc389c3bb64216b63091ceacf87e3f5491266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): models/parakeet/export.py:388-394 | python/src/coreai_models/segmentation/pipeline.py:322-326 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"models/parakeet/export.py"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6e7238968bf9d03f1bbe33122a34b049ba4075a649be4d78a8df9d1e5cfcd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): python/src/coreai_models/llm/export.py:38-47 | python/src/coreai_models/vlm/export.py:868-874 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"python/src/coreai_models/llm/export.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"b747f9bdb47a1304c84018652520ef038ca066bddc19c2c63236efc734fea32c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): python/src/coreai_models/models/ios/mistral.py:124-134 | python/src/coreai_models/models/ios/qwen2.py:127-137 | python/src/coreai_models/models/ios/qwen3.py:132-142 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/qwen2.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb2d1fd984ca63ff44c72ba29484f1abf98906add1c18626f0b159d2a93259f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): python/src/coreai_models/models/ios/mistral.py:139-144 | python/src/coreai_models/models/ios/olmo2.py:137-142 | python/src/coreai_models/models/ios/qwen2.py:142-147 | python/src/coreai_models/models/ios/qwen3.py:147-152 | python/src/coreai_models/models/macos/qwen3_vl.py:273-278 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060RMSNorm\u0060 names \u0060coreai_models.primitives.ios.rms_norm\u0060 in one and \u0060coreai_models.primitives.macos.rms_norm\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c767edb1ce732badda57a549bb8ed1e08e723e60f54e5833efa69243e4b77e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:155-164 | python/src/coreai_models/models/ios/olmo2.py:153-162 | python/src/coreai_models/models/ios/qwen2.py:158-167 | python/src/coreai_models/models/ios/qwen3.py:163-172 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"e35ff0f8eb74dd5c17be0f4535be2f6d465406d5234d058d2b01ae67a829644f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): python/src/coreai_models/models/ios/mistral.py:248-257 | python/src/coreai_models/models/ios/olmo2.py:246-255 | python/src/coreai_models/models/ios/qwen2.py:249-258 | python/src/coreai_models/models/ios/qwen3.py:254-263 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/ios/mistral.py\u0060 and \u0060python/src/coreai_models/models/ios/olmo2.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5888c2bdda32e9d598b57a90ddb5ef8702b95f7e7d6620d457ad5324bfe8356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 10): python/src/coreai_models/models/macos/gemma3_text.py:240-247 | python/src/coreai_models/models/macos/gpt_oss.py:422-429 | python/src/coreai_models/models/macos/mistral.py:158-165 | python/src/coreai_models/models/macos/mixtral.py:192-199 | python/src/coreai_models/models/macos/olmo2.py:158-162 | python/src/coreai_models/models/macos/phi3.py:221-228 | python/src/coreai_models/models/macos/qwen2.py:165-172 | python/src/coreai_models/models/macos/qwen3.py:176-183 | python/src/coreai_models/models/macos/qwen3_moe.py:224-231 | python/src/coreai_models/models/macos/qwen3_vl.py:182-189 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/gemma3_text.py\u0060 and \u0060python/src/coreai_models/models/macos/mistral.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/gemma3_text.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe8a29e90db9af8141b61e3a724b844d46eccf892476b3d933dc7a7fd682a099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): python/src/coreai_models/models/macos/qwen3.py:44-48 | python/src/coreai_models/models/macos/qwen3_moe.py:45-49 \u2014 before extracting anything, compare \u0060python/src/coreai_models/models/macos/qwen3.py\u0060 and \u0060python/src/coreai_models/models/macos/qwen3_moe.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 174 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060config\u0060 to \u0060Qwen3Config\u0060 in one and \u0060Qwen3MoeConfig\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/qwen3.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c38826ac1b256bc605209e5a857d8b7eaeba05bf3f868f3b93e06c26cc32e85"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: CoreAILMCommon: CoreAILMCommon: abstractness 0.00, instability 0.00, distance 1.00 \u2014 the shape a shared-kernel / building-block library has BY DESIGN \u2014 concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c18c861b3838eac331a5704eb77106767fd69b842f884e2cf888dbc3eb81174"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: CoreAIShared: CoreAIShared: abstractness 0.04, instability 0.00, distance 0.96 \u2014 the shape a shared-kernel / building-block library has BY DESIGN \u2014 concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ef4cb97a687d00b6221b71f84fe628aa08f534d8348f414a0ede1404edfec176"}},{"ruleId":"D8","level":"warning","message":{"text":"Coverage not measured \u2014 Swift suite: Coverage NOT MEASURED: the Swift half could not be measured \u2014 the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository\u0027s maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"62e63e619c28f057e129f2997c965d32a457366a9ce18ca019ffb6bdfba85c99"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: malformedLineReportsIndex: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAILMCommonTests/ReplayTypesTests.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdaad940e2d67c3f758f7786ebafa822c4131e22663e4d275254e3fbb7d86a3e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: upsample: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f666e3c9ac6fa121ede579e199f726664d4439f25c0429a193ba85d9590eb0"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: antialiasIgnoredWhenUpsampling: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5403a4489b6ae76b813c172c451154bc6922c6b11945b7d36ee850d38a8c542"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: downsamplePlain: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"327de26a0a729cc9b935a8cd2a806b4e32094b427a6f60a8b8b13d2e3948a87a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: downsampleAntialiased: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1167573917718bd87f7f88a7abd3b3758bcf96cf278e63d67bf589f98a178dbe"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: nonIntegerDownsample: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d86b98f219907570ee78a0f423c5a76116b434189612efadd094329f592be4a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: nonSquare: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/BilinearResamplerTests.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be8fa899fb3f4094ed04a9b57f964bfd84f769f91dad9155cd2190d841dfccf"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: findJumpForwardStringReturnsNilAtChoice: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/GuidedGenerationTests/ConstrainedGenerationSessionTests.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1109790f8350c750cdd233348fdcb7945dc05f243bf0e4fcc2545218d2123df"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: benchmarkPrefill: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputFillerTests.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9378df5557201bc93e1b753fc7729bda23db37327ebd1e7e7b35a2aa1ff4bd0"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: benchmarkPositionIdsIsolated: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputFillerTests.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"1106f213838b5ec31e4b127f437dcca0dc54698f09b9380adaa36b12f2fca00f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: benchmarkStepScalar: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputFillerTests.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e71c7805366f57edc1cc4c91b2198bdf275155afb0f13da4616c86b62ba127"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: benchmarkAsDict: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputFillerTests.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4b4ee3bb628b5c06598844887532882ba0ca812091af7c2b3b0b0001debebc"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: benchmarkModifySubscript: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputFillerTests.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3036d42072a71f9ef9c22ad1b806aaf6f60634d0b7e73d58dba650d29771956"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: tokenConformance: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputHandlerTests.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f9048ba49f2a2ea64728fb6cb2285404e00171881c16ad8525d616b9297688"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: coveragePass: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/InputHandlerTests.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eeab1e0d7f7a38e91a366e017910f61ab15c984848be98ae01dc5bfaa030ed4"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: parseFull: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/LogitsWriterTests.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1b981467606b2bb31bacf9dca23a1ba26e4a25f12c6a8737e49c891702ab62"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: matchingDescriptorValidates: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/PrefillGraphTests.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73f240c019b6ba98092738e57619355dac916ce96a21fd132f6048af33156e2"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: stateOrderDoesNotMatter: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/PrefillGraphTests.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"342bb9d2809ccbbdd6ae408410d1fa51b3ba3a3e33bbf8fdf3bd8213e35de56b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: pipelinedGuardAllowsUnseeded: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/SeededSamplingTests.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"798a69ad7e435e723210e23a6068da0a6c3cbb09e7dd8cd6d00143375b8db5c7"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: growingConformance: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/StateHandlerTests.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"643120ba8bb345fccf385132d51e17e92be2f0bb8f1e84cd72314f900032753d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: fixedConformance: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/StateHandlerTests.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b926027823fa3a288a75c94627e33fabcbf96a74a5dfc5b74021a61478456db"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: bindsVariousCounts: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/StateHandlerTests.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27149f32341923f25d29b79244eb1c364ec9fd439c07b8aa3811562d8cc4ea5"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: composesHandlers: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/StateHandlerTests.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8a9f96b3cb7aca60326a265a5a4520cc27037e02d18b31cad5fefb4457759d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: agenticPriorityOverTagPair: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/ThinkTagParserTests.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"88475bed67fd26934d08c11917eb7861258056238af44822340518eb3703b67f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: eomEotWithoutMessageFallsBack: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/LanguageModelsTests/ThinkTagParserTests.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8b0404d9ca57c515e3f8615c0372bbb6d5f66b2114528d12969f8727e41287"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: wellFormedValidates: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/SpeechTests/ParakeetDecoderTests.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd2c38d05b9dc5f90ab13eb74a3c41dd8ea111daaa66ed39764e7f6f33710d2c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: blankAtTopOfVocabAccepted: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/SpeechTests/ParakeetDecoderTests.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"93976773700049d82800cc288371afea734e41425329d317cb0145b573030858"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: zeroLengthPassesValidation: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/SpeechTests/ParakeetDecoderTests.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fe2125991761a403ac0d4a46b18f59bdf356599c0540c9aad365de3ab752613"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: defaultsAccepted: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/VideoSegmenterTests/HotstartAndMemoryTests.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e7b7ec8082e957e59d62b222b196fbf89593c86205aae4278ac642b8cf394a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: rejectsZeroDimensions: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Tests/CoreAISharedTests/Video/VideoWriterTests.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09f73ee0f68b59350684b41fe45065f4f419323c3f1b456963bfac82fb6b0f5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/Tools/llm-runner/LLMRunnerMain.swift: swift/Sources/Tools/llm-runner/LLMRunnerMain.swift changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in LLMRunner.runModel at line 348. 3 of those changes were fix/bug commits, and the other 16 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/Tools/llm-runner/LLMRunnerMain.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4616524b380bad4ada130fe3a28e91e12aacf6481871d799678075dd587347"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in EngineImpl.init at line 619. 3 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, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d65ef6120abead4b2d0d4f21f12c9940de0e39fefb1a9fbc4e2d3531090689"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift: swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in LanguageConfig.additionalStopTokenIds at line 190. 2 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, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f6d331d9e9e05892c33dbf071bc1a61ac59538dd67628ec00851a45d9c0eb6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in CoreAISequentialVLMEngine.init at line 147. 1 of those changes was a fix/bug commit, 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, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf442c92866df75d4ee5488ad1d84820dc1f45d7961fc85ed5a23a9b71a71a3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/export/pipeline.py: python/src/coreai_models/export/pipeline.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in pipeline._async_export_model at line 146. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/export/pipeline.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/pipeline.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"15cdd5931968727769f6e7c4cf37ab76d138be1ad35b468c1b40ae8a8f1bb58c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/Tools/llm-server/ChatHandler.swift: swift/Sources/Tools/llm-server/ChatHandler.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ChatHandler.swift.runChatCompletion at line 184. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/Tools/llm-server/ChatHandler.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"21198aa261fde54daccf095655789952c382cf13dcb60662b4acc6ba74d95799"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/Tools/llm-server/LLMServerMain.swift: swift/Sources/Tools/llm-server/LLMServerMain.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in LLMServer.run at line 114. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/Tools/llm-server/LLMServerMain.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/LLMServerMain.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e922ded21f384d8f5f18e9684e9f2e2853e4c44400e7f1a1f2978229a13c298"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in StaticShapeEngine.init at line 115. 1 of those changes was a fix/bug commit, 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, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIStaticShapeEngine.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fd48a93b94eb1b9968b50628e18ae13b613c1242a03c7a623142000de5b2fe"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift: swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in CoreAIExecutor.makeTokens at line 613. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/CoreAILanguageModel.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"a11fa99dbf7540143b6192fef505c4af87795b7384a775bff50e646b339483c2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/llm/export.py: python/src/coreai_models/llm/export.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in export._resolve_export_config at line 292. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/llm/export.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/llm/export.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec069b08a35f388a617adb358db18719fdf289c71114ef692202cc5980e2dd0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/diffusion/export.py: python/src/coreai_models/diffusion/export.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in export.main at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/diffusion/export.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/export.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"67edb2ea7717998dc5d83f5191dfd168f0a31e55f54dd4cb923bae58bd8f4b5f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift: swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in DiffusionRunner.run at line 103. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/diffusion-runner/DiffusionRunnerMain.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffee08466d862a68924dea21fde4330d6e44e2102546c2dad7afcc2733aba227"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/diffusion/pipeline.py: python/src/coreai_models/diffusion/pipeline.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in pipeline.export_diffusion at line 61. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/diffusion/pipeline.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/pipeline.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8fb93fb76f8fbdec19871018c45e812c6fda7d127dee9268db0767a4fa5b0d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/segmentation/export.py: python/src/coreai_models/segmentation/export.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in export.main at line 289. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/segmentation/export.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/segmentation/export.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"848d81b7b730f4a86c55791499036c8ee6374601bc9938ebcf3ad64df620ce3f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift: swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ThinkTagParser.drainAgentic at line 173. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/LanguageModel/ThinkTagParser.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ded760f00055087f81d7a497d0218a3a70dbf4fb64faab807744183b7749573"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: python/src/coreai_models/primitives/macos/rope.py: python/src/coreai_models/primitives/macos/rope.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in rope.initialize_rope at line 316. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- python/src/coreai_models/primitives/macos/rope.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/primitives/macos/rope.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e70d09d6474205fc99e54ba17612fefe3cf97aa82fd902218aca8fc072a9661"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift: swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in MultiFunctionContext.init at line 280. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 18:20:47 -07:00\u0027 --until=\u00272026-09-30 18:20:47 -07:00\u0027 --full-history --no-merges -- swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIImageSegmenter/ImageSegmentationEngine.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee61380c40457c8b2df29db2c36c70848e71964e2c668da7b86c37eca9ad76c0"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 23 significant file(s) lose their only recent owner: swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAIPipelinedEngine.swift, swift/Sources/CoreAILanguageModels/Samplers/MPSGraphSamplers.swift, swift/Sources/Tools/llm-server/ChatHandler.swift, swift/Sources/CoreAILMCommon/ServerAPITypes.swift, swift/Sources/CoreAILanguageModels/Output/LogitsWriter.swift, swift/Sources/CoreAILanguageModels/InferenceEngines/InferenceEngine.swift, swift/Sources/CoreAILanguageModels/GuidedGeneration/ConstrainedGenerationSession.swift, swift/Sources/Tools/llm-server/ServerState.swift (\u002B15 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"a34329970a5e8496b8cf18dcfb453d63e3d4c1c82b4fdc26b09650fc05d68eea"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: swift/Sources/CoreAISpeech/ParakeetTDTDecoder.swift, swift/Sources/Tools/speech-recognizer/SpeechParity.swift, swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift, swift/Sources/CoreAISpeech/SpeechRecognitionModel.swift, python/src/coreai_models/diffusion/flux2.py, swift/Sources/CoreAIShared/Text/CLIPTokenizer.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c80ecb9fbfd76d190c4430803f110c9f14d12157c8a22cbc9788252c937a7ab3"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: swift/Sources/CoreAILanguageModels/Profiling/PerformanceMetrics.swift, swift/Sources/CoreAIImageSegmenter/ImageSegmenter.swift, swift/Sources/CoreAIDiffusionPipeline/Components/CoreAILatentCodec.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"74ae05b792d27aef42855c78a8de74d68ff72d729213eceee5c97c40d7ecc2fc"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 3 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 (35 single-owned of 232 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 232 of the 304 production source files in this repository met that bar). They are 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":"D17","level":"warning","message":{"text":"TodoComment: # TODO: migrate once Core AI adds APIs to retrieve shape info from Type object \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/tests/_runner_infra/common/utils/coreai/graph.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"9019f07f124a8258234265bc365d607a3555a7524c2f9ab69d66a7e61e320252"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Make dynamic KV cache the default behavior for all models once mainstream \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/tests/test_model_conversion/test_macos_models.py"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f7a607c6ed95a759d1cae6a61d9947ec01b4c7b582b1e140820ea0f36b8c03a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// TODO: Upstream this to swift-transformers as \u0060Tokenizer.additionalEosTokenIds\u0060 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/Bundle/LanguageConfig.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfefb59b894961bf86dc20268ca1a193044d4bec8efd9e3e0a3785e33cb5d62d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Multi-turn support \u2014 allow multiple image regions per input, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/InputEmbeddings.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"fceebf82fab0d10608f2535b9e285d356f6367e1abb34d2dafb19f1252e96c9e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Multi-turn \u2014 caller can cache InputEmbeddings across turns and pass it \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/InferenceEngine.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c20fdbc3561f252dac4d158c433e12b2e2c03db312f65f9bbfaaf1176966392"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Add pipelined engine variant for higher throughput \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03b940442c0066b6ce70cbbbeeaac346136d4218e3be4491242807e3759fb67"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: the optimized export will need different specialization options. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAIShared/Runtime/ModelStructure.swift"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f05c4ffe5bfd15ab888d599e30a592a7e7cae32eb10e9bdbcb4e6233a99cdf2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Process lifecycle is left to the supervising process. TODO: any in-process \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-server/ChatHandler.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c484852af014a98325e05a3cc6355486c8b6a94fe356c109515cc5df2bdd255"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Pinned to CPU because the monolithic f16/f32 Whisper export decodes incorrectly on the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/speech-recognizer/SpeechRecognizerMain.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b965c34831097da8ea6227862d924153d82bfe22f471e176c804e725c34534"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D22","level":"warning","message":{"text":"Highly fragmented and inconsistent execution API. The type exposes 7 different methods for running inference, mixing naming conventions (\u0027run\u0027 vs \u0027predict\u0027), input formats (raw arrays, ModelInput, NDArray, String-keyed dicts), and output formats (flat Float arrays, String-keyed dicts, NDArray). This forces users to guess the correct method for their specific data type and output needs.: Unify into a single primary execution method, e.g., \u0060run(inputs: [String: NDArray]) -\u003E [String: NDArray]\u0060, with optional convenience overloads for specific common cases (like returning a single NDArray). Remove the low-level raw array methods (\u0060run(floatInputs:...)\u0060, \u0060run(intInputs:...)\u0060) or move them to a private/internal helper. (signatures: CoreAIDiffusionModelFunction.run(floatInputs: [([Float], [Int])], functionName: swift~String): [Float] | CoreAIDiffusionModelFunction.run(inputs: [ModelInput], functionName: swift~String): [Float] | CoreAIDiffusionModelFunction.run(intInputs: [([Int32], [Int])]): [Float] | CoreAIDiffusionModelFunction.predict(inputs: [String: NDArray]): [String: [Float]] | CoreAIDiffusionModelFunction.predictAllOutputs(inputs: [String: NDArray]): [String: [Float]] | CoreAIDiffusionModelFunction.predictAutoNamed(inputs: [NDArray]): [String: [Float]] | CoreAIDiffusionModelFunction.runReturningNDArray(inputs: [ModelInput]): swift~NDArray)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6b35f5fd0299421f5700c7cafa01bc1cee7ff84f45faaaa09779d5802d6d6738"}},{"ruleId":"D22","level":"warning","message":{"text":"Inconsistent method signatures for the same core operation. \u0060DiffusionPipeline.generateImages\u0060 lacks a progress handler, while \u0060FlowTransformerPipeline.generateImages\u0060 includes it. This creates an inconsistent developer experience when switching between pipeline types, as the async/streaming capability is not uniformly exposed.: Add the optional \u0060progressHandler\u0060 parameter to \u0060DiffusionPipeline.generateImages\u0060 to match \u0060FlowTransformerPipeline\u0060, or remove it from \u0060FlowTransformerPipeline\u0060 if progress tracking is not supported by the underlying engine. (signatures: CoreAIDiffusionPipeline.generateImages(configuration: swift~PipelineConfiguration): swift~GenerationResult | FlowTransformerPipeline.generateImages(configuration: swift~PipelineConfiguration, progressHandler: ((PipelineProgress) -\u003E Bool)?): swift~GenerationResult)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8132e7da12a44a7360ddd4a7ad387dd4db87c0c107cd0f2d9ad5e8e786be4e72"}},{"ruleId":"D22","level":"warning","message":{"text":"Inconsistent return types and naming between the high-level \u0060ImageSegmenter\u0060 and low-level \u0060CoreAISegmentationEngine\u0060. \u0060ImageSegmenter\u0060 returns \u0060SegmentationResponse\u0060 (processed/high-level), while \u0060CoreAISegmentationEngine\u0060 returns \u0060SegmentationOutput\u0060 (raw model output). Additionally, \u0060ImageSegmenter\u0060 offers a convenience overload accepting \u0060String\u0060 for prompts, while the engine requires a typed \u0060TextQuery\u0060. This inconsistency makes it unclear when to use which type and what the output format will be.: Ensure the high-level wrapper (\u0060ImageSegmenter\u0060) clearly delegates to the engine. Consider renaming \u0060SegmentationOutput\u0060 to \u0060RawSegmentationOutput\u0060 to distinguish it from the processed \u0060SegmentationResponse\u0060. Ensure the \u0060String\u0060 prompt overload in \u0060ImageSegmenter\u0060 explicitly handles tokenization internally to avoid confusion about where that logic resides. (signatures: ImageSegmenter.segment(image: CGImage, textQuery: swift~TextQuery, parameters: swift~SegmentationParameters): swift~SegmentationResponse | ImageSegmenter.segment(image: CGImage, prompt: swift~String, parameters: swift~SegmentationParameters): swift~SegmentationResponse | CoreAISegmentationEngine.segment(image: CGImage, textQuery: swift~TextQuery, parameters: swift~SegmentationParameters): swift~SegmentationOutput | CoreAISegmentationEngine.segment(image: CGImage, pointQuery: swift~PointQuery, parameters: swift~SegmentationParameters): swift~SegmentationOutput)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6d4337cff0e0126519c5cf347ce6bc22bea800af039adc2f5e1080bc384f92f6"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (41319 LoC, 346 public types across 39 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8a7c60d84ec124dea0266da2cf23510056e10aadd6ac2dae11dd81d8528da72e"},"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":"8a576c2eb4557ec919dde1f57741e7000330d3588051cb43168711e3c5592e1d"},"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":"6ed059458dc0d864f79fffc2c8cd3f09ac2213f256b255ba1e07734350228541"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d546733b9ca45c1bd162da0b0b01ea42af530b6ed35676e28a14281b1424acd0"},"properties":{"dependency":{"package":"anyio","version":"4.13.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9695b4caeb9dd0b4d8037117fdebda587e828c3e1f1a8f807fb1a3f7060e7ce3"},"properties":{"dependency":{"package":"pillow","version":"12.2.0","advisory":"[GHSA redacted]","aliases":["BIT-pillow-2026-54058","BIT-pillow-2026-54059","BIT-pillow-2026-54060","BIT-pillow-2026-55379","BIT-pillow-2026-55380","BIT-pillow-2026-55798","BIT-pillow-2026-59197","BIT-pillow-2026-59198","BIT-pillow-2026-59199","BIT-pillow-2026-59200","BIT-pillow-2026-59203","BIT-pillow-2026-59204","BIT-pillow-2026-59205","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-2253","PYSEC-2026-2254","PYSEC-2026-2255","PYSEC-2026-2256","PYSEC-2026-2257","PYSEC-2026-3451","PYSEC-2026-3452","PYSEC-2026-3453","PYSEC-2026-3454","PYSEC-2026-3493","PYSEC-2026-3494","PYSEC-2026-3495","PYSEC-2026-3496"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b30fec3c9f8f6a22f46f3bcf802f08586f9f93a349d33ba94b7af6b62d057cd1"},"properties":{"dependency":{"package":"diffusers","version":"0.37.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-2446","PYSEC-2026-40","PYSEC-2026-41"],"reachability":{"kind":"production","file":"python/src/coreai_models/diffusion/components.py","line":85}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f268873f65bdaa9fa0eb6931555627e85a8ff8143ca35ae482b4a7d5ea5ae3e9"},"properties":{"dependency":{"package":"urllib3","version":"2.7.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"31a4626c8a479d5df95800c40726de18cd5967079c672e4107288cbea5492fb2"},"properties":{"dependency":{"package":"accelerate","version":"1.13.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-3804"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d0e6a57015dc23cfdd8374d0bc7df076eac4b337374fa23d10cb0ae918b0187d"},"properties":{"dependency":{"package":"pytest","version":"8.4.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-1845"],"reachability":{"kind":"test-or-tooling","file":"python/tests/_runner_infra/testing_utils.py","line":34}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"13586fc0c39afd311c8f68b33f2e89fbb1618f43b2d8bc54d4d00cd4d7925790"},"properties":{"dependency":{"package":"setuptools","version":"82.0.1","advisory":"[GHSA redacted]","aliases":["BIT-setuptools-2026-59890","[CVE redacted]","PYSEC-2026-3447"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c319a5ad644b162c18561a611384cf758c9a8ba67ea3387af6829faaf52373bc"},"properties":{"dependency":{"package":"torch","version":"2.9.0","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-2999","BIT-pytorch-2025-3000","BIT-pytorch-2025-3001","BIT-pytorch-2026-24747","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-193","PYSEC-2025-194","PYSEC-2025-195","PYSEC-2026-139","PYSEC-2026-1856","PYSEC-2026-2286"],"reachability":{"kind":"production","file":"models/clap/export.py","line":25}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dd5b1a79da9bade24ef49c63302bfd383983617e21721e4635170cf092496493"},"properties":{"dependency":{"package":"datasets","version":"4.8.5","advisory":"PYSEC-2026-3716","aliases":["[CVE redacted]"],"reachability":{"kind":"production","file":"python/src/coreai_models/export/compression.py","line":19}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 232 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 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 232 of the 304 production source files in this repository met that bar). 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 most significant first: swift/Sources/CoreAILanguageModels/InferenceEngines/InferenceOutputSequence.swift. 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: CoreAISequentialVLMEngine.swift \u2194 LLMRunnerMain.swift: \u0060swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift\u0060 and \u0060swift/Sources/Tools/llm-runner/LLMRunnerMain.swift\u0060 change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060b63133bb\u0060 Consolidate VLM sequential engine: route construction through EngineF\u2026; \u00600d6c0bf4\u0060 Layered prefill chunk size (#240); \u00605660fc66\u0060 Add repetition penalty to the llm-runner (#176) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/CoreAILanguageModels/InferenceEngines/CoreAISequentialVLMEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc0bacbf00ba83a2a49adc237affdab71517548491eaac8955bd283094cc36a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: LLMRunnerMain.swift \u2194 LLMServerMain.swift: \u0060swift/Sources/Tools/llm-runner/LLMRunnerMain.swift\u0060 and \u0060swift/Sources/Tools/llm-server/LLMServerMain.swift\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u00607ec0a710\u0060 Rename LanguageBundle -\u003E LanguageModelBundle (#307); \u0060a59026f6\u0060 Consolidate model-bundle and diffusion asset resolution (#304); \u00603efa838e\u0060 Remove silent .aimodelc fallback and better naming, polish error mess\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"swift/Sources/Tools/llm-runner/LLMRunnerMain.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c7bc7f852683b22400c88ad029e4b49caac7a0656dd346d551b81adafa76eab"}},{"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":"9658270ba49f37ed04e99ab1263b6393cd42aed8bdfb7aafd9fa1070f5491895"}},{"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":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P1","level":"note","message":{"text":"CI build step not evidenced: A CI pipeline exists but no build step was matched \u2014 changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"251015acef1a259fcc13b7c60660cc8917ccb3ae8056cb5165ae03312dd586e8"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1583 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(d / \u0022pyproject.toml\u0022).exists() and (d / \u0022python\u0022).exists()\u0060 appears character-identically in 4 files \u2014 python/src/coreai_models/diffusion/export.py, python/src/coreai_models/llm/export.py, python/src/coreai_models/segmentation/export.py, python/src/coreai_models/vlm/export.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/diffusion/export.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eeb8bfd2f63fc9f21db0fb96f9e9308228ca138fb8f17bd7d28febaa88b2c93"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060getattr(config, \u0022head_dim\u0022, None) or config.hidden_size // config.num_attention_heads\u0060 appears character-identically in 2 files \u2014 python/src/coreai_models/models/ios/mistral.py, python/src/coreai_models/models/ios/olmo2.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb37bf2a4b8f6d25204c31de9f7cd634a11de1b16ee75c83f2bc3bda51abf707"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060getattr(config, \u0022head_dim\u0022, None) or dim // n_heads\u0060 appears character-identically in 5 files \u2014 python/src/coreai_models/models/ios/mistral.py, python/src/coreai_models/models/ios/olmo2.py, python/src/coreai_models/models/macos/mistral.py, python/src/coreai_models/models/macos/olmo2.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"645a7379b894fdf971296deb5fcc57e031853b003050c1cf52720d3e92547368"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasattr(config, \u0022head_dim\u0022) and config.head_dim is not None\u0060 appears character-identically in 3 files \u2014 python/src/coreai_models/models/macos/mixtral.py, python/src/coreai_models/primitives/macos/cache.py, python/src/coreai_models/primitives/macos/cache_scatter.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/mixtral.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd77f14d914f6bd93568d095c34b8e80d9efc553caab2c45d80afb42216404b2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060k.startswith(\u0022model.\u0022) and \u0022gather_embeddings\u0022 not in k\u0060 appears character-identically in 4 files \u2014 python/src/coreai_models/models/ios/mistral.py, python/src/coreai_models/models/ios/olmo2.py, python/src/coreai_models/models/ios/qwen2.py, python/src/coreai_models/models/ios/qwen3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/ios/mistral.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"75dedd0a38d3893873e70431197c587c9b19598a58d48517dc7797ac218b224a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key.startswith(\u0022layers.\u0022) or key.startswith(\u0022norm.\u0022) or key == \u0022embed_tokens.weight\u0022\u0060 appears character-identically in 2 files \u2014 python/src/coreai_models/models/macos/muse_glimmer.py, python/src/coreai_models/models/macos/qwen3_vl.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/macos/muse_glimmer.py"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e197ef498a37a53e73fdfa361cf93e33e9468c43674fd4423520821357a0d30"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060max_context_length is not None and hasattr(hf_config, \u0022max_position_embeddings\u0022)\u0060 appears character-identically in 2 files \u2014 python/src/coreai_models/models/base.py, python/src/coreai_models/models/macos/phi3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/models/base.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"43038a35d2ce43740aee7c12f82a2276133690453af87a6263d93b7e29ccd719"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060stem == base or stem.startswith(f\u0022{base}_\u0022)\u0060 appears character-identically in 2 files \u2014 python/src/coreai_models/export/pipeline.py, python/src/coreai_models/model_registry.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"python/src/coreai_models/export/pipeline.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cd88c0a0f9b3c8ff44444e117c1348ecc9fe967623e69e0e64933aee04f329"}}],"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-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-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-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"CWE-506","shortDescription":{"text":"CWE-506"},"helpUri":"https://cwe.mitre.org/data/definitions/506.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":14,"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."]}]}