{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D7","name":"Architectural Integrity","shortDescription":{"text":"Architectural Integrity"},"helpUri":"https://codehealth.canine.dev/dimensions/D7"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AC1","name":"Text alternatives","shortDescription":{"text":"Text alternatives"},"helpUri":"https://codehealth.canine.dev/dimensions/AC1"},{"id":"AC2","name":"Forms \u0026 labels","shortDescription":{"text":"Forms \u0026 labels"},"helpUri":"https://codehealth.canine.dev/dimensions/AC2"},{"id":"AC3","name":"Page structure","shortDescription":{"text":"Page structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AC3"},{"id":"AC5","name":"ARIA correctness","shortDescription":{"text":"ARIA correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/AC5"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"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":"ED1","name":"Handler temporal coupling","shortDescription":{"text":"Handler temporal coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/ED1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R5","name":"Dependency Freshness","shortDescription":{"text":"Dependency Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/R5"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"DeviceSynthesizer.buildSmartDevice (cyclomatic 169): DeviceSynthesizer.buildSmartDevice has cyclomatic complexity 169 (threshold 15). Of this number, 165 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"448392552cb97d8c098283a7b8834b6c8d4d875da02b5e79577546c0e28b4c2d"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelRenderPipeline.commitRender (cyclomatic 153): PanelRenderPipeline.commitRender has cyclomatic complexity 153 (threshold 15). Of this number, 120 points are the body\u0027s own statements and 33 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a4b337061d6508798cd76d62209d60714e0487ec4145d30a0832eec01deba0"}},{"ruleId":"D1","level":"warning","message":{"text":"automationSettingsView.bindAutomationSettingsEvents (cyclomatic 152): automationSettingsView.bindAutomationSettingsEvents has cyclomatic complexity 152 (threshold 15). Most of this is not in the body itself: 2 of the 152 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 1211, a function literal at line 1325, handleDraftInput, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc0fb3e1b85af3d496e8c98542dbcbac119ff0e16b4318847015491868b0101f"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.buildKind (cyclomatic 139): homeAssistant.buildKind has cyclomatic complexity 139 (threshold 15). Of this number, 90 points are the body\u0027s own statements and 49 belong to 13 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"636164878603d5570d4e2fdef6d4486771216b6931344fadcdb266786fb0d54c"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.deviceSvgIcon (cyclomatic 138): deviceViews.deviceSvgIcon has cyclomatic complexity 138 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf499c1a9f341218d7d98665a88e10d87576fdd154e6d5bb90e06ccd44403e3b"}},{"ruleId":"D1","level":"warning","message":{"text":"commandEffects.applyCommandToDevices (cyclomatic 137): commandEffects.applyCommandToDevices has cyclomatic complexity 137 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"9791f1d0ad2e770526892a82bf7a4698a51a34f45d600987421511390d721798"}},{"ruleId":"D1","level":"warning","message":{"text":"controlFailure.classifyRawError (cyclomatic 133): controlFailure.classifyRawError has cyclomatic complexity 133 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba37625434337bcdacc482ed63cb0a2b9425ad6316504a99ff7fba5e5a565bdf"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderPrimaryDrawer (cyclomatic 128): deviceViews.renderPrimaryDrawer has cyclomatic complexity 128 (threshold 15). Of this number, 117 points are the body\u0027s own statements and 11 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"246d93ab6b87e2a0094491d721137a49249ec4de36b81062758a40c3fb69b891"}},{"ruleId":"D1","level":"warning","message":{"text":"panelKeyboard.handlePanelKey (cyclomatic 124): panelKeyboard.handlePanelKey has cyclomatic complexity 124 (threshold 15). Of this number, 123 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"17dbe0c679fb74cbd2aa2140a966eb8ce9b7ee94436715523c97dd7c7bc7d3b9"}},{"ruleId":"D1","level":"warning","message":{"text":"commandEffects.inverseCommands (cyclomatic 117): commandEffects.inverseCommands has cyclomatic complexity 117 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d8123eea5190d22db11a19423754904b9d0da2aaf819a7c271700d04cf43d6"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsEvents.bindSettingsEvents (cyclomatic 111): settingsEvents.bindSettingsEvents has cyclomatic complexity 111 (threshold 15). Most of this is not in the body itself: 14 of the 111 points are its own statements and the rest belongs to 27 function items inside it that branch (a function literal at line 1109, a function literal at line 1229, a function literal at line 1030, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"83642abdd657a9709a2b2e764cd8930a3711835a84117322c6d2105eb621b406"}},{"ruleId":"D1","level":"warning","message":{"text":"AutomationEngine.dispatchEvent (cyclomatic 108): AutomationEngine.dispatchEvent has cyclomatic complexity 108 (threshold 15). Of this number, 101 points are the body\u0027s own statements and 7 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f05e271cc6dc950da05e6180b4968a2871589ac39a839ef1f02449ab3927bf"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartDevice.statusSubtitle (cyclomatic 107): SmartDevice.statusSubtitle has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f44b399d343046fdbd68e02f4702ee3fc5382fec5db250735f5de92311e1f4"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.applianceOrGenericIcon (cyclomatic 105): deviceViews.applianceOrGenericIcon has cyclomatic complexity 105 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60fdd2b390234b7ddad962edba89d9439b798f007591f8aff930a721ddc0a19"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderDeviceTile (cyclomatic 105): deviceViews.renderDeviceTile has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac013728825b88378aabf2adcf7e0c12191b2dd9a1a555c3ced890b43155bdce"}},{"ruleId":"D1","level":"warning","message":{"text":"models.deviceStatusSummary (cyclomatic 100): models.deviceStatusSummary has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66fdef1fc4fb6f0142c00695dbb170e27e2e3426a432e53b00757e7dfee8a39"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.onOpenURL (cyclomatic 90): appUrlCommand.onOpenURL has cyclomatic complexity 90 (threshold 15). Of this number, 89 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"a001c1a710a7a354986fdfba4476b0a8fb18ed9a165f37b2d0eb0640708ebb65"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceDeduplicator.capabilityScore (cyclomatic 87): DeviceDeduplicator.capabilityScore has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"140b125fa85122cac0921612376dc658e3d339fdb877b73137bb86a968ed8732"}},{"ruleId":"D1","level":"warning","message":{"text":"MiIOCryptoAndPacket.swift.cleanMalformedFirmwareJSON (cyclomatic 82): MiIOCryptoAndPacket.swift.cleanMalformedFirmwareJSON has cyclomatic complexity 82 (threshold 15). Of this number, 77 points are the body\u0027s own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"aefd49ace741043439e59cf54186239d9066772440a545754355ec2a56de8f4b"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLiveController.resolveCloudCameraStream (cyclomatic 80): CameraLiveController.resolveCloudCameraStream has cyclomatic complexity 80 (threshold 15). Of this number, 73 points are the body\u0027s own statements and 7 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14077f8cae5e2f3cbf0b7f4e4b0124a9260c1ae8b9568fcab397ae12de26183"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceDeduplicator.merge (cyclomatic 79): DeviceDeduplicator.merge has cyclomatic complexity 79 (threshold 15). Of this number, 77 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"808ed5e83f1ddbfaeaaef215bdd0cd0b93024a3ea16101f8594ff8d437764527"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.togglePrimary (cyclomatic 78): HomeStore.togglePrimary has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"29dc42eeae71f208ce7fb35b1a8dfb5d43b9af0fb81ba10f7623d914ca85a64c"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.refreshDevices (cyclomatic 77): cloudRefresh.refreshDevices has cyclomatic complexity 77 (threshold 15). Of this number, 73 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2eee15e56875a739c971f54d3ca0e60f0ce904c707032fbe433ec2a7311ddfa"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotCommandMapper.map (cyclomatic 74): MiotCommandMapper.map has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7fc278aa6a824f83470bb03703dfed15793fa00f7e7b779bcfc5ccfcff46cb"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.handleProviderEvent (cyclomatic 73): HomeStore.handleProviderEvent has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"23239120be2751ac58e167ab00c340332a68ef0dec965c77ff54061ff55515b5"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartDevice.sfSymbolName (cyclomatic 73): SmartDevice.sfSymbolName has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5842d4a0e922e4d140f95e713a3b86c4fc14688dbab42314116a8d2e09b72f"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.topSuggestions (cyclomatic 73): UserHabitMemory.topSuggestions has cyclomatic complexity 73 (threshold 15). Of this number, 51 points are the body\u0027s own statements and 22 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6670cf4da39d19de439b663d41df8819979c443ec20dcc8da2359ea4a15f8d"}},{"ruleId":"D1","level":"warning","message":{"text":"layoutGestures.bindLayoutGestures (cyclomatic 73): layoutGestures.bindLayoutGestures has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 1 of the 73 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 174, a function literal at line 271, a function literal at line 137, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"7efabb208fb11b1c3bd1891c7577cbe3cd372de744f540d3cd406259880f129a"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.haServiceCall (cyclomatic 72): homeAssistant.haServiceCall has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f34d47589f243ef01da0b857f31e0aefa1457ab8c4284a21eb2aa76f18fb65"}},{"ruleId":"D1","level":"warning","message":{"text":"intent.parseChineseDeviceCommand (cyclomatic 71): intent.parseChineseDeviceCommand has cyclomatic complexity 71 (threshold 15). Of this number, 65 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabae7781e0673f467143c8f203feb7101ca767f80ab884a611de4e949c2bf85"}},{"ruleId":"D1","level":"warning","message":{"text":"cameraLiveModalView.renderCameraLiveModalView (cyclomatic 71): cameraLiveModalView.renderCameraLiveModalView has cyclomatic complexity 71 (threshold 15). Of this number, 62 points are the body\u0027s own statements and 9 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0a2ffa39d60e4567c39c21d24c3c7aa862e3ae60dbde0e0e130c033b86d6f7"}},{"ruleId":"D1","level":"warning","message":{"text":"verify-flyout-layout.evaluateSnapshot (cyclomatic 70): verify-flyout-layout.evaluateSnapshot has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b51cf345df75faf69d0a67b9a0d49f3f5abf528a71d245b3950aba458bc1ae4"}},{"ruleId":"D1","level":"warning","message":{"text":"models.hasDetailDrawer (cyclomatic 70): models.hasDetailDrawer has cyclomatic complexity 70 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e934e55b4c1ef6f8c10d72dc72f03f733880334603efaee8b178873531fa0b"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.bindDetailDrawerEvents (cyclomatic 70): detailDrawers.bindDetailDrawerEvents has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 1 of the 70 points is its own statement and the rest belongs to 19 function items inside it that branch (a function literal at line 654, a function literal at line 773, a function literal at line 688, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"f40a3bd09a69a09e914474b32d060abbd7bb385a5b72640d719666136e24dd10"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalIntentParser.parseEnglishCommand (cyclomatic 68): LocalIntentParser.parseEnglishCommand has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3deb93e736db8f27a3caf9c47ce23e9878649748fb348010761a177729a0d6"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.buildUpperCardFactories (cyclomatic 67): activityStackView.buildUpperCardFactories has cyclomatic complexity 67 (threshold 15). Of this number, 51 points are the body\u0027s own statements and 16 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1408}}}],"partialFingerprints":{"codehealthFindingId/v1":"27af235415b7cba5edf6116dccfdc5707c8dd40db4f462cc5c39c516b548e66d"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartDevice.mergingOptimisticFields (cyclomatic 66): SmartDevice.mergingOptimisticFields has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/OptimisticField.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc56c024b8e2927b7f8f1c08cd6b9d5074682acd2c2f1fdffda39390807dd57"}},{"ruleId":"D1","level":"warning","message":{"text":"automationSettingsView.renderAutomationAndSafetySettingsSections (cyclomatic 65): automationSettingsView.renderAutomationAndSafetySettingsSections has cyclomatic complexity 65 (threshold 15). Of this number, 53 points are the body\u0027s own statements and 12 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7eb39c5799e986cc7376b30311224bdf5c6b45d9b01c83b13bc81699a3f0afd"}},{"ruleId":"D1","level":"warning","message":{"text":"promptContext.catalogStateSummary (cyclomatic 64): promptContext.catalogStateSummary has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"b780c549a445880d27960cb5ba8596704661c15103479b131980d69303a32554"}},{"ruleId":"D1","level":"warning","message":{"text":"MacContextAutomation.events (cyclomatic 63): MacContextAutomation.events has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MacContextAutomation.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"3376852e5be3936715ebc0957683b72704414171c4822470c8155cf1d3f89775"}},{"ruleId":"D1","level":"warning","message":{"text":"OptimisticField.changedFields (cyclomatic 63): OptimisticField.changedFields has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/OptimisticField.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be0dcaaa2aca056468a42441859b8edd3cd3694715ae037ef6032f363b1c8e6"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.executeDirectAskPreset (cyclomatic 63): appUrlCommand.executeDirectAskPreset has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (appUrlCommand.executeDirectAskPreset::runDirectCover) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6bfa41d7d0100cb3d1ee2ada0be38b33dba870d1601fedc5de0b61c591e1919"}},{"ruleId":"D1","level":"warning","message":{"text":"connectionsAndDiagView.renderConnectionsAndDiagSection (cyclomatic 63): connectionsAndDiagView.renderConnectionsAndDiagSection has cyclomatic complexity 63 (threshold 15). Of this number, 48 points are the body\u0027s own statements and 15 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"839d85820115bb9ef80c2e3a1c156eab58c717b09fad2028108175dc5a42234f"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalIntentParser.parseDeviceCommand (cyclomatic 61): LocalIntentParser.parseDeviceCommand has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"d139daae05f7b29bbf62fd07ed4da1f293c3618a470a0dfccd89930da00298d1"}},{"ruleId":"D1","level":"warning","message":{"text":"DemoHomeProvider.applying (cyclomatic 60): DemoHomeProvider.applying has cyclomatic complexity 60 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"74b43f864ddbad378f9a632497bdf0397cb354c9a197f7f9e71ca0d7f97119e1"}},{"ruleId":"D1","level":"warning","message":{"text":"synthesis.applianceActivity (cyclomatic 60): synthesis.applianceActivity has cyclomatic complexity 60 (threshold 15). Of this number, 59 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a7250941ffb5d9c1f3cde21472c086c0e743feacad1d3db4948baea3f06efb3"}},{"ruleId":"D1","level":"warning","message":{"text":"naturalCommand.handleNaturalCommand (cyclomatic 60): naturalCommand.handleNaturalCommand has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"901e32845a689e0acd00d52f53a93ee14acbf2f93d6e2e1f755998744cfd0282"}},{"ruleId":"D1","level":"warning","message":{"text":"reconciler.extractControlIdentityKey (cyclomatic 59): reconciler.extractControlIdentityKey has cyclomatic complexity 59 (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":"windows/src/ui/reconciler.ts"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d0e938c56c65c1bfbf6ec205fbe0cefaa792ce0b5b486627d949fb690939f8"}},{"ruleId":"D1","level":"warning","message":{"text":"commandDispatch.applyCommand (cyclomatic 58): commandDispatch.applyCommand has cyclomatic complexity 58 (threshold 15). Of this number, 56 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd303a2f4ea9073c8ee324bf0a1c823d8bf905066be0b1a258f0826b8522c506"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceSynthesizer.synthesize (cyclomatic 57): DeviceSynthesizer.synthesize has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"150a49d14dc4700b4336655331ea464670c6bf71ed6c55a7144ef3a27708232b"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.topSuggestions (cyclomatic 57): UserHabitMemory.topSuggestions has cyclomatic complexity 57 (threshold 15). Of this number, 56 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e36ad74a15e563bbad7ef03b6173b525904a3247e270df3a1e5f593a39376f3"}},{"ruleId":"D1","level":"warning","message":{"text":"onboardingGuide.mountOnboardingGuide (cyclomatic 57): onboardingGuide.mountOnboardingGuide has cyclomatic complexity 57 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 41 belong to 12 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dccac7028861e365fbcfbd36f8ad21ac8db5fd1d68b2cf3e9a6c2732d8e3e67"}},{"ruleId":"D1","level":"warning","message":{"text":"AppURLParser.parseEnvelope (cyclomatic 56): AppURLParser.parseEnvelope has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AppURLCommand.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e253deb56a299cf44cd2b120f1b2b11ee54a6190dc52f3e75aab3ab668af027"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuMijiaWindowsApp.performUndo (cyclomatic 56): MenuMijiaWindowsApp.performUndo has cyclomatic complexity 56 (threshold 15). Of this number, 52 points are the body\u0027s own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9525049fc18ab0ca72cefec019d4b2b48970fec5c43d2851ba85d26754b0ca9"}},{"ruleId":"D1","level":"warning","message":{"text":"energyHistory.sanitizeStored (cyclomatic 54): energyHistory.sanitizeStored has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab76dbeed9b962d0cc212db886a27f2940cf10fce95b78cd748785b50510f4b"}},{"ruleId":"D1","level":"warning","message":{"text":"settings.loadSettings (cyclomatic 54): settings.loadSettings has cyclomatic complexity 54 (threshold 15). Of this number, 50 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98cb43c3502098268848c30fd13a712fdad491b74f2d3910bb67c0636cbbdb6"}},{"ruleId":"D1","level":"warning","message":{"text":"HAWebSocketProvider.mapCommandToService (cyclomatic 53): HAWebSocketProvider.mapCommandToService has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"300257d8d733d1d8b2523b2caf7e263281d531682d122a6b44c86f259077b407"}},{"ruleId":"D1","level":"warning","message":{"text":"reconciler.syncElementAttributesAndProps (cyclomatic 53): reconciler.syncElementAttributesAndProps has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e0493fa6442abb1fd3f9551069d557dbc43c57b58aa4c08d107cc25dd10d3c"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartDevice.hasDetailDrawer (cyclomatic 51): SmartDevice.hasDetailDrawer has cyclomatic complexity 51 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1476}}}],"partialFingerprints":{"codehealthFindingId/v1":"4407647837af0b144c6a666971539d9d319a393b8e057e728ade6f921e5f5a2e"}},{"ruleId":"D1","level":"warning","message":{"text":"models.deviceAcceptsControlWrites (cyclomatic 51): models.deviceAcceptsControlWrites has cyclomatic complexity 51 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: models.localizeApplianceMode (cyclomatic 59) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d9e8be6525f6dd376427258194eac9935ed6dfcd8e98a1d2065bd317086779e"}},{"ruleId":"D1","level":"warning","message":{"text":"cameraHubs.resolveLiveCameraTarget (cyclomatic 51): cameraHubs.resolveLiveCameraTarget has cyclomatic complexity 51 (threshold 15). Of this number, 49 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfce94a3d011734110280db610d22d27cab4a7c7e939e51bb2951dd7bda450b1"}},{"ruleId":"D1","level":"warning","message":{"text":"intentExecution.executeIntents (cyclomatic 51): intentExecution.executeIntents has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (intentExecution.executeIntents::runTargetBatch) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"630c382c9b6d376f95f364c1497817754b37f437ff8e899ad037878efa4d01b2"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentValidator.normalize (cyclomatic 50): IntentValidator.normalize has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"b18a57e589dd8a64aacdefeb350a629637faae3bf464c6ee8a7a38165ab50ec9"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplianceActivity.init (cyclomatic 50): ApplianceActivity.init has cyclomatic complexity 50 (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":"Sources/MijiaCore/Models.swift"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9988c5b16cd15b8b16f7b0a197e32bc0c458eb4e1720569ec426bb106fc0804"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.refreshMultiAccountXiaomiDevices (cyclomatic 50): cloudRefresh.refreshMultiAccountXiaomiDevices has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a76717c4e3367ba9ed0fff31a36c240bad9f418588384013ade6a28af6798b"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.refreshDualSourceDevices (cyclomatic 49): cloudRefresh.refreshDualSourceDevices has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"556ab3bf92ed55644648f3e5ffd35c3f7d0906786217ca8b871985cde5fd21d9"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildSingleHAFacet (cyclomatic 48): haDomains.buildSingleHAFacet has cyclomatic complexity 48 (threshold 15). Of this number, 47 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"130c6bd7e47433651bce64f3f659f673414818bb3dc0ec11af678b76709f54f1"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.assistantEffect (cyclomatic 47): HomeStore.assistantEffect has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"5719eef8922adbc92bd81700201bea1e3cf2074d3476b10a7c378e2e529e9bd4"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderClimateStrip (cyclomatic 47): deviceViews.renderClimateStrip has cyclomatic complexity 47 (threshold 15). Of this number, 42 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc8379501e2dc7a3fe141906f41b39fd29c9575300938c2aa0c07ed65109234"}},{"ruleId":"D1","level":"warning","message":{"text":"miAccountsStore.mergeMiAccountSnapshots (cyclomatic 46): miAccountsStore.mergeMiAccountSnapshots has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec61d7d7ed680ea70fe7ab27ca7c8f0d9eb6b8fabb9abf0c0159fa228d75ebc"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.patchCloudPresentation (cyclomatic 46): cloudRefresh.patchCloudPresentation has cyclomatic complexity 46 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e850322cf4cc67bea3c2e9e5aac2800e52bc2c708be76c6e34c9918de890541"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelKeyRouter.afterSearch (cyclomatic 45): PanelKeyRouter.afterSearch 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":"Sources/MenuBarMijiaApp/PanelKeyRouter.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"79451d029b9d369446af8f4a554b7ea87f38eb0e9d020f65d2a3a23840e49fe9"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentCatalog.stateSummary (cyclomatic 45): IntentCatalog.stateSummary 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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"542bc32f5be37816b9c8972416830892f56eac37d971dcc399a0c497e4c18deb"}},{"ruleId":"D1","level":"warning","message":{"text":"panelView.renderPanel (cyclomatic 45): panelView.renderPanel has cyclomatic complexity 45 (threshold 15). Of this number, 39 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e885d049f6253a792a470487d723e611e750f275193f05f73c70b8ae556be9d"}},{"ruleId":"D1","level":"warning","message":{"text":"reconciler.reconcileElementTree (cyclomatic 45): reconciler.reconcileElementTree has cyclomatic complexity 45 (threshold 15). Of this number, 39 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d0eb6d65aef7dee84f7aabbf3396163701932e561d102ed92d4b027e59193c4"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.executeIntentPlan (cyclomatic 44): HomeStore.executeIntentPlan has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca2d7b4172e1a0ee90e8e212ec87d86ada651baeecff360498e035bc883f6a52"}},{"ruleId":"D1","level":"warning","message":{"text":"ManualControlPolicy.facetRequiresConfirmation (cyclomatic 44): ManualControlPolicy.facetRequiresConfirmation has cyclomatic complexity 44 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ManualControlPolicy.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"d814e46e09f95877e550671dcd47b9b6e6741f7b1b17a1fe65f2fb5ae5795c9b"}},{"ruleId":"D1","level":"warning","message":{"text":"demo.demoSensorHistorySamples (cyclomatic 44): demo.demoSensorHistorySamples has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"28b90b1cb620ebc84e0d84743124a96e345b984c170fa8886fb0d07a8e0d7112"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarPanelController.handleMouseDown (cyclomatic 43): MenuBarPanelController.handleMouseDown has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb3d6347ecc25706f051f4c6a2d68148560947dd042d6d2c10c578bf3de9abb"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.executeQuickAction (cyclomatic 43): HomeStore.executeQuickAction has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b8550fc05caebf6c69f022adbdeea1234e5ac17e1e2bf074a67a7d429df00f"}},{"ruleId":"D1","level":"warning","message":{"text":"HAHomeSnapshot.receive (cyclomatic 43): HAHomeSnapshot.receive has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"2323434bc6cfc0fa6115a110967995274b1105e79bfbf15ec98933e50a2f7719"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelSearch.action (cyclomatic 42): PanelSearch.action has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/PanelSearch.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"317f5426cf6a8ecde5d3688046361d9a736bf7eb04c479d303a53a8d4ade6f1e"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudProvider.resolveCameraStream (cyclomatic 42): MiCloudProvider.resolveCameraStream has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"18812eac6959de5a2e87d6595834470889538912c59f9b363f50869d22da2fef"}},{"ruleId":"D1","level":"warning","message":{"text":"command.coercePropValue (cyclomatic 42): command.coercePropValue has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b70c161b4aa528cdf24dd18248be1604345709704a038b4f77fd83a0704e66ae"}},{"ruleId":"D1","level":"warning","message":{"text":"DoorbellDetector.ingestHASnapshot (cyclomatic 42): DoorbellDetector.ingestHASnapshot has cyclomatic complexity 42 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5c0b4c630951115669ebd59528254f5161fd9ba5138656afbbda69f5a81063"}},{"ruleId":"D1","level":"warning","message":{"text":"automationEngine.parseStoredRule (cyclomatic 42): automationEngine.parseStoredRule has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"d848f11090562ecbbab352cdc2a19b94cdffa5b9239b2f7fb7b6c70b3ec0b11c"}},{"ruleId":"D1","level":"warning","message":{"text":"URLCommandHandler.execute (cyclomatic 41): URLCommandHandler.execute 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":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b0be1e9a3f6fa9f27b9e25997ecd0448deed826e3159746d1c8e4ba85fcfdf"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentDeviceCategory.init (cyclomatic 41): IntentDeviceCategory.init has cyclomatic complexity 41 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"6261bd5a12b6e8022da928c3b5098bc498c395687f64805a50784f65c4492bdc"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceKind.acceptsControlWrites (cyclomatic 41): DeviceKind.acceptsControlWrites has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf7a9ad0a53fb1586cff0d9d7c2a04a61e2cacecbc36fdb712cbbeefe6d6a76"}},{"ruleId":"D1","level":"warning","message":{"text":"SafetyMonitor.evaluate (cyclomatic 41): SafetyMonitor.evaluate 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d01c41bb80f9e4be359d6d132dbb8f0841fa694aa71c4df17710aa5b5fe6c2e"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeAssistantSynthesizer.synthesize (cyclomatic 41): HomeAssistantSynthesizer.synthesize has cyclomatic complexity 41 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 18 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"8638ff1081c4cff6bb32b7a0188aa0fac356c0cafcf0c73aec0188df720e2d5d"}},{"ruleId":"D1","level":"warning","message":{"text":"habits.habitActionable (cyclomatic 40): habits.habitActionable has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"d54245b6f49b6deb112a921ba42df5bff0fe18191769870b465490d4701a2925"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.parseHomeAssistantHistoryResponse (cyclomatic 40): sensorHistory.parseHomeAssistantHistoryResponse has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"be6e935daa0a328669dac4837b7a91b97187cf55d4da1693958dbece53ef7f9f"}},{"ruleId":"D1","level":"warning","message":{"text":"dualSourceProvider.extractHADeviceIdentities (cyclomatic 40): dualSourceProvider.extractHADeviceIdentities has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f02750caff772f728acc0842892338060f21385ff1c2f6a6ab3e767cca149b"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.isActionable (cyclomatic 39): UserHabitMemory.isActionable has cyclomatic complexity 39 (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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"f568170e1e79690cbe2e17aa75e358a7d209389c1c8c1ddc2a5d284649b89ab6"}},{"ruleId":"D1","level":"warning","message":{"text":"optimisticLock.syncDirectCommandToFacets (cyclomatic 39): optimisticLock.syncDirectCommandToFacets has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"582747b7d215609b98dc0c0520272c04c325bf7d1c9b2e9833bc83ff83254ed2"}},{"ruleId":"D1","level":"warning","message":{"text":"roomOrderEditor.bindRoomOrderEditorEvents (cyclomatic 39): roomOrderEditor.bindRoomOrderEditorEvents has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 7 of the 39 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 519, 472, 597, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"3058a4597ef35413b0c74b8a403d5a961fd1b7dc7a9d6f095791d976a33b8715"}},{"ruleId":"D1","level":"warning","message":{"text":"panelView.renderNotificationStack (cyclomatic 39): panelView.renderNotificationStack has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6655b55196f2859a76416ee3564fe583b7e603245157a1e8f3c7b538c4308e"}},{"ruleId":"D1","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseFragment (cyclomatic 38): FragmentedMP4Demuxer.parseFragment has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c6ca9118b1e3f44b76066082e3472eca2313e8fe3657184901fa528c6e7d1e"}},{"ruleId":"D1","level":"warning","message":{"text":"Context.coerce (cyclomatic 38): Context.coerce 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":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b98293592f1c2caeb125cf4eff1571f2349f04586af421037a865f274c1e34"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildMediaPlayerKind (cyclomatic 38): haDomains.buildMediaPlayerKind 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":"windows/src/core/haDomains.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd8778570b1e1b177f2758b9332e9980e67e9da3712015e2720c046a1ca1cb6"}},{"ruleId":"D1","level":"warning","message":{"text":"UnsupportedDeviceScanner.scan (cyclomatic 38): UnsupportedDeviceScanner.scan 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":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb485bd3b13125243091e4f43db277b1c1cf36f7d03907e9cf74237358682b8"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.refreshHADevices (cyclomatic 38): cloudRefresh.refreshHADevices has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"1399d0098329a0b95be86248d62a10292d22705375c9477a4b9328c24e6619d5"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.mapHAFacetCommand (cyclomatic 37): haDomains.mapHAFacetCommand has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c35e0386907c6eeedbaa40a40e21a893a7267f17d35d4136ed106b1f780950"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.record (cyclomatic 37): UserHabitMemory.record has cyclomatic complexity 37 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"804c73d6766cc2fc0f3aa7c157e9f432e78cabd5b0272cc37ea818ba646ce9f6"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelIntentResolver.decodeChatOp (cyclomatic 37): ModelIntentResolver.decodeChatOp has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a96a25c32f94479ad27139c66aed7f9c91ab7196a700fe075ee1ce3bebdec7"}},{"ruleId":"D1","level":"warning","message":{"text":"facets.facetControls (cyclomatic 36): facets.facetControls has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"105a45ccffb923b26c4c1d93ac834e5c7a48b2d47a9a8cbd72b5d0d93b38d541"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistoryView.renderSensorHistorySection (cyclomatic 36): sensorHistoryView.renderSensorHistorySection has cyclomatic complexity 36 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db9c9fa53986c38770963c99c863ffc0d306c2f824367e45389764f32995ac9"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.bindUnifiedUpperStack (cyclomatic 36): activityStackView.bindUnifiedUpperStack has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 3 function items inside it that branch (finishPointer, a function literal at line 1627, a function literal at line 1616). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1603}}}],"partialFingerprints":{"codehealthFindingId/v1":"263f3f45a19516f0df361d44978f986e2466c253b30f5b2605e380527c414a69"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.init (cyclomatic 35): HomeStore.init has cyclomatic complexity 35 (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":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"40483b569065a72172a2de7e34acd6ed5a420f0f0cd0b50d205c936487a990a9"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.commitManualWrite (cyclomatic 35): HomeStore.commitManualWrite has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a8bdca30f25d058dd12767e7fac5e5ae2af1e10d5cf0099625e9cf01e213d5"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelIntentResolver.planFromSystemOne (cyclomatic 35): ModelIntentResolver.planFromSystemOne has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20499d76645ac7332777fc3b71da956cf78712f06179eb024eb309a4ba7b959"}},{"ruleId":"D1","level":"warning","message":{"text":"commandDispatch.scheduleEchoReadBack.executeSingleDeviceReadBack (cyclomatic 35): commandDispatch.scheduleEchoReadBack.executeSingleDeviceReadBack has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebbbaca13840b349447704a1942685796fc530a00460b216fa6db43e184130f2"}},{"ruleId":"D1","level":"warning","message":{"text":"connectionsAndDiagView.performSignOutSingleMiAccountOnHost (cyclomatic 35): connectionsAndDiagView.performSignOutSingleMiAccountOnHost has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e66b0ae55d4943ecc449525c26369842ee8ec4e119045aaa2a9e08151147584"}},{"ruleId":"D1","level":"warning","message":{"text":"intentExecution.executeSingleCommand (cyclomatic 35): intentExecution.executeSingleCommand has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"063fe7cf0ccebf4a8e3b6b78e6d46d85b50d08a76b8fb0f954bee3959f5f9beb"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderCollapsedInlineSlider (cyclomatic 35): deviceViews.renderCollapsedInlineSlider has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"1111b28ca930bc267826390abe76647cbf3a78d747b1504fa05e04200db7de77"}},{"ruleId":"D1","level":"warning","message":{"text":"menuViews.renderContextMenu (cyclomatic 35): menuViews.renderContextMenu has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45bef3c8a7d85466f11796f833e1e8896aa9bc2d13f2b4f12e4447f4f05f422"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicDeviceCardView.headerRow (cyclomatic 34): ClassicDeviceCardView.headerRow has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf2388f2b341719db7a8b876156aebd8a80cfdf8933244189856091036fc9c6"}},{"ruleId":"D1","level":"warning","message":{"text":"HAFacetEngine.control (cyclomatic 34): HAFacetEngine.control has cyclomatic complexity 34 (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":"Sources/MijiaCore/HAFacets.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c47a28766cd2e5a7b9fc7e18af45e02be36675fcb6fa4bbce6301fe58cf03d24"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.runAssistantCommand (cyclomatic 34): HomeStore.runAssistantCommand has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"109570b4616376054b27e0d3420e0a751bd75b03eba6cc7f698951389871367e"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.evaluateSafetyFacetValue (cyclomatic 34): safetyAndHealth.evaluateSafetyFacetValue has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"519c9f401bc378667cb3d2387b71cd4aae189349bc20c5718e2352e58655f3f1"}},{"ruleId":"D1","level":"warning","message":{"text":"dom.morphMatchingDom (cyclomatic 34): dom.morphMatchingDom has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/dom.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b5d2121919a75aa1e1a6924afe0d18071cad0a3bd48a3b4aa11e9f2da79179"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.rebuildLiveProvider (cyclomatic 33): HomeStore.rebuildLiveProvider 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":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"7963b91fd8416fa853f43d6cc1339f9cb4baa6189d521b56c26e2831f981e18c"}},{"ruleId":"D1","level":"warning","message":{"text":"verify-flyout-layout.main (cyclomatic 33): verify-flyout-layout.main has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf0ff0b39fb4a46f75a1a05270141afedd70985b97c73e86db198fe55780fac"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.buildWeeklyHealthReport (cyclomatic 33): safetyAndHealth.buildWeeklyHealthReport has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"6586ded68726ba048ba81846944ac9ccd2de1a5e4c359489ebfebd7f2edad23a"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.renderWeeklyHealthMarkdown (cyclomatic 33): safetyAndHealth.renderWeeklyHealthMarkdown 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"41dc2472e0ea3d85059c4123c2887909d2e534063c93d27c8f0aee8e1e92fac7"}},{"ruleId":"D1","level":"warning","message":{"text":"automationEngine.commandsForPowerIntent (cyclomatic 33): automationEngine.commandsForPowerIntent 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":"windows/src/core/automationEngine.ts"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c09dae83a591fb226e0beb4c6669fe3647df622451d506b3ff8990725fcd15c"}},{"ruleId":"D1","level":"warning","message":{"text":"automationEngine.executeAutomationRule (cyclomatic 33): automationEngine.executeAutomationRule has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f2008b69630fe76588edac180968c9dfb7b2926125eab4b1593120dc9cf72a2"}},{"ruleId":"D1","level":"warning","message":{"text":"EnergyHistory.record (cyclomatic 33): EnergyHistory.record 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":"windows/src/core/energyHistory.ts"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc74389a7583c8f6704e5dc42d06540b6dd910c40dcc6ab40a89ec8c27016156"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.executeAutomationCardUndo (cyclomatic 33): activityStackView.executeAutomationCardUndo has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab477cd44e32f49a48f41405fc5fe47d119ae7f713319b665cba8bef95c82d4f"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.record (cyclomatic 32): UserHabitMemory.record has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfea5d8b77d98ff4c6d6418223019f4232ca443f3ad5f2f7601c4bde51d220ee"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.auxiliaryEntitiesForCover (cyclomatic 32): haDomains.auxiliaryEntitiesForCover has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch (matches, labelOf, isBatterySensor). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0b7b589d9c7297fa2cba35f42cc3eac58b7aede392dc6e278d8e0fb1c33c38"}},{"ruleId":"D1","level":"warning","message":{"text":"optimisticLock.applyHAExtendedCommandEffect (cyclomatic 32): optimisticLock.applyHAExtendedCommandEffect has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bbac60c5dba0a0af387a3f002345e685c321c63d482095c6b0f6d1efcc1b4fd"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistoryView.bindSensorHistoryEvents (cyclomatic 32): sensorHistoryView.bindSensorHistoryEvents has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 956, 1002, 1030, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8f3ee79e000340892672b2af371f34a0249fe74a3868bb7bd7d8b0749d5369"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceCardView.headerRow (cyclomatic 31): DeviceCardView.headerRow 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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ae216f4a8bb47926aa26d913705638579c65206f742881a814f5411c85d941"}},{"ruleId":"D1","level":"warning","message":{"text":"GrokBallAnimator.sample (cyclomatic 31): GrokBallAnimator.sample has cyclomatic complexity 31 (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":"Sources/MenuBarMijiaApp/GrokBallView.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"9488aab221af1df4ccf90619110156528006eb76b55788f7f1fd521f76d4890a"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.genericApplianceStatusText (cyclomatic 31): MiotSynthesizer.genericApplianceStatusText has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1531}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f03a558f87db99bb9b1ba13f84e60544765035fe13a95ad3dbf1a27d154e73a"}},{"ruleId":"D1","level":"warning","message":{"text":"habits.shareHabitSentence (cyclomatic 31): habits.shareHabitSentence 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":"windows/src/core/assistant/habits.ts"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"e81b3872616464055ccad5cec035f7f97fe236a887a52ef86aec6584bd7eb382"}},{"ruleId":"D1","level":"warning","message":{"text":"synthesis.genericApplianceStatusDescription (cyclomatic 31): synthesis.genericApplianceStatusDescription has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: synthesis.coverStatusWord (cyclomatic 52) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"34de4cccbbd0b9f2e07a1e82c37495a7eac0ca87c0b073775e1e29781871a353"}},{"ruleId":"D1","level":"warning","message":{"text":"commandDispatch.captureReversibleFacetBeforeWrite (cyclomatic 31): commandDispatch.captureReversibleFacetBeforeWrite has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"f05993cfa4a1646da3a69c69f99b415b273594a3cbec083e7781bc5633701da2"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLiveController.commitCameraStreamUrl (cyclomatic 31): CameraLiveController.commitCameraStreamUrl has cyclomatic complexity 31 (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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"292b930b7c3b79f80ff9241419540c49d12e2d1ddea489362fd7bc168d93c35a"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentReply.describe (cyclomatic 30): IntentReply.describe has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc926198832ec799d56b7c16abc6da154d0fe86ebc67fc08d33b12f0d2efb80a"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.undoTurnAllOff (cyclomatic 30): HomeStore.undoTurnAllOff has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"404dc4fd738b10b896837f106967007d58302829f3f2b8a8890c254605395793"}},{"ruleId":"D1","level":"warning","message":{"text":"optimisticLock.runTrackedDevicePresetCommands (cyclomatic 30): optimisticLock.runTrackedDevicePresetCommands has cyclomatic complexity 30 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 11 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"6125baaf4ff6cc45ad60e2383104a55fb11c8b7a1d89b31802e341adc57e0c6a"}},{"ruleId":"D1","level":"warning","message":{"text":"MiAccountsStore.loadUnlocked (cyclomatic 30): MiAccountsStore.loadUnlocked has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1fa6054ff43a690fccdd888c3afa99c8e1521d51cd9101e3471da1ee27ce55"}},{"ruleId":"D1","level":"warning","message":{"text":"appLifecycle.hydrateCredentials (cyclomatic 30): appLifecycle.hydrateCredentials has cyclomatic complexity 30 (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":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"38237d83342f9c05792722b36169fdbc9b6124e03af451431ee23ed32d0908ec"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuMijiaWindowsApp.bindOpenAnimation (cyclomatic 30): MenuMijiaWindowsApp.bindOpenAnimation has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 1678, a function literal at line 1708, normalizeEdge, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1561}}}],"partialFingerprints":{"codehealthFindingId/v1":"6407c6a94605ccc1a4662eb8433edbab01f6bcac788694dd61d26bc0f27d476a"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.buildActivityFeed (cyclomatic 30): activityStackView.buildActivityFeed has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd0ad0518c5fe6adfe5748a69002f24b2ae20e3713303d9001d15849504e0655"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicDeviceCardView.compactHeaderRow (cyclomatic 29): ClassicDeviceCardView.compactHeaderRow has cyclomatic complexity 29 (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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"794a097d9a5c15c67d45720617ccc6ea5b25875dbd0b43ef598a84e8489aa5e5"}},{"ruleId":"D1","level":"warning","message":{"text":"HAHomeSnapshot.receive (cyclomatic 29): HAHomeSnapshot.receive has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HAHomeSnapshot.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ec3c62e2630f4a4e1a7f9b9697db6a31e8eca28c85df3232a748007c304ded"}},{"ruleId":"D1","level":"warning","message":{"text":"WeeklyHealthReport.markdown (cyclomatic 29): WeeklyHealthReport.markdown has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/WeeklyHealthReport.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"179b0625848b21f7f0795e97977d8d3becefd0cd2fb0cf8f6d41a265377297df"}},{"ruleId":"D1","level":"warning","message":{"text":"HabitShare.swift.shareHabitSentence (cyclomatic 29): HabitShare.swift.shareHabitSentence has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HabitShare.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"58173d30e391aaaf34da3d6f4b815a2e2782fd701985556c36a8641fab87ec9b"}},{"ruleId":"D1","level":"warning","message":{"text":"MjpegStreamReader::spawn (cyclomatic 29): MjpegStreamReader::spawn has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"c155178314cf897eb9afa70ffebb0c58fcb15edd105ce8924935905597766e32"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::camera::drain_complete_jpeg_frames (cyclomatic 29): menubarmijia_windows::camera::drain_complete_jpeg_frames has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"46da22c9503744978bd2d4dae2ea765b0e7579e89546937094781edd54e2d267"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.haEnergyKwh (cyclomatic 29): homeAssistant.haEnergyKwh has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ca52e48802eb3bd502f93ebb463696ea3bc70312e4f5840a975ac89c2f9d17"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistoryView.triggerRemoteHistoryFetchIfNeeded (cyclomatic 29): sensorHistoryView.triggerRemoteHistoryFetchIfNeeded has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2e269fe0067a86eab0e35144a737b11b26cb0673d9d3bc5b30e293681c773a"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderSensorCard (cyclomatic 29): deviceViews.renderSensorCard has cyclomatic complexity 29 (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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"608059518250ebbe82e3b994aedd87e7f24885c47d9e21eb8dd4b471e1302a26"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::camera::is_likely_concealed_gray_jpeg (cyclomatic 28): menubarmijia_windows::camera::is_likely_concealed_gray_jpeg has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1391}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad06bc33270ed59e34ac571e1c5dd63545de5992974d2507c378fecf2d18ab8"}},{"ruleId":"D1","level":"warning","message":{"text":"cameraHubs.resolveCameraHub (cyclomatic 28): cameraHubs.resolveCameraHub has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d004e41d551c56cf80298ef8a00707c270d2ffd8b5a1dd183a9c97cca37fce"}},{"ruleId":"D1","level":"warning","message":{"text":"optimisticLock.mergeHomeSnapshotRespectingLocks (cyclomatic 28): optimisticLock.mergeHomeSnapshotRespectingLocks has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"004bf1264eb19b2b681d603f09c90303df956fc4fe86fc70809531c1ca041248"}},{"ruleId":"D1","level":"warning","message":{"text":"panelView.renderSliderDeck (cyclomatic 28): panelView.renderSliderDeck has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d697966af1533c65038ca6dd0952b1c9f9ec8356fedda9f73a63b8703e1698"}},{"ruleId":"D1","level":"warning","message":{"text":"ResumeRecoveryController.flush (cyclomatic 28): ResumeRecoveryController.flush has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab4c74e4b8642fbe6b9a408dcc3c2d945dfe46cc453e5696f55e585a0df0a564"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuMijiaWindowsApp.renderDeviceGrid (cyclomatic 28): MenuMijiaWindowsApp.renderDeviceGrid has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"11393f783f0586873d7f526bc54d07eed457f4aa5bd0b30b59e8e07d98639177"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplianceDetailDrawer.body (cyclomatic 27): ApplianceDetailDrawer.body 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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2354c2f1f737f0927169443e67d0e102c9288738a3979a20c3e18ef6f978137"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechInputController.start (cyclomatic 27): SpeechInputController.start 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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"6578e6db5e9d035acaf7335d94a516053574ded74bdbf0fa21ab112bfe57d4d2"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLiveVideoPlayer.enqueue (cyclomatic 27): CameraLiveVideoPlayer.enqueue has cyclomatic complexity 27 (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":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e116ba68e7c3390b0fb7493332e575b6d499c934d9aeea588c2b19ea224a99"}},{"ruleId":"D1","level":"warning","message":{"text":"HADiscovery.isAllowedLANDiscoveryHost (cyclomatic 27): HADiscovery.isAllowedLANDiscoveryHost has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"2efe54b2d5397f951acb21662ab39f6a4e923bbcba0a37c5a853cca0575dcdf8"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.confirmUndoTargets (cyclomatic 27): HomeStore.confirmUndoTargets 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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":889}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f943ed09b462f037b6d8b36a44cf4b668bf1226d6148fc689b0b6383fca779"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.applyUndoCommands (cyclomatic 27): HomeStore.applyUndoCommands 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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8722f03929882f945d81f61c40353d046328917ce312d130c19e23a617a79b"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.executeRaycastPower (cyclomatic 27): HomeStore.executeRaycastPower 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfc319d1eb4a343d03dc5678d717e5643f52fa1071eee1fdb6cacca08c11362"}},{"ruleId":"D1","level":"warning","message":{"text":"MiAccountsProvider.updateAccounts (cyclomatic 27): MiAccountsProvider.updateAccounts has cyclomatic complexity 27 (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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8aea4d42043b9049c5c98bc79854e0338bae86c350c6eed0fa30a09831209b"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.parsePropValues (cyclomatic 27): MiCloudClient.parsePropValues 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"467eadc00ec3a829e81626a676fda0c38751762729b93c5831b8466cce10c028"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildSyntheticPrimaryHAFacets (cyclomatic 27): haDomains.buildSyntheticPrimaryHAFacets 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":"windows/src/core/haDomains.ts"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"a143e6fc16ed6aecea40e438e198c997856b58cd52712d553f061e1910968385"}},{"ruleId":"D1","level":"warning","message":{"text":"quickActions.planQuickAction (cyclomatic 27): quickActions.planQuickAction has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/quickActions.ts"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ee1d31e4948bb2d7f350f907271158ca486f391c1876270d85d86e426537aa"}},{"ruleId":"D1","level":"warning","message":{"text":"raycastSnapshot.normalizeLightGroupOwners (cyclomatic 27): raycastSnapshot.normalizeLightGroupOwners has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 11 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b856c74a65e10945f1f33d9fa84de9949e62bab2e29dbe2c37ad4b6a0fff48"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.extractMiHistoryRawNumbers (cyclomatic 27): sensorHistory.extractMiHistoryRawNumbers 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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1002}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f605f4be697c63b9349da8b56aa63c03297a44576228312b1929ef563be8b87"}},{"ruleId":"D1","level":"warning","message":{"text":"dualSourceProvider.reconcilePairedHALightGroups (cyclomatic 27): dualSourceProvider.reconcilePairedHALightGroups has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd87f1d6c5c7c663d99a9e617e6c9d9ed03ad575a862e7b23ddf2dbedb04a817"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceSynthesizer.auxiliaryEntities (cyclomatic 26): DeviceSynthesizer.auxiliaryEntities has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to one function item inside it that branches (matches). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e6cdb57dafe93b762376fa503fa5eba1ffa3347e1f620eade797e4b8ed8774"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.executeRaycastDirectCommand (cyclomatic 26): HomeStore.executeRaycastDirectCommand 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f8de3d39190440690e52b68a152a663d8ce88b37aff978e2d3951c5813359d"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotFacetEngine.alertCondition (cyclomatic 26): MiotFacetEngine.alertCondition has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd375e2aa1dd5ce305bd8ac4a7dd9235549423dcbaa30792dee85c46b057e35"}},{"ruleId":"D1","level":"warning","message":{"text":"XiaomiCameraBridge.spawnCS2UDPRelay (cyclomatic 26): XiaomiCameraBridge.spawnCS2UDPRelay has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1335}}}],"partialFingerprints":{"codehealthFindingId/v1":"034e88e2bb6075e103c2bd2ea18150db71be6f07aff5eb59a14b4f74a9c07499"}},{"ruleId":"D1","level":"warning","message":{"text":"verify-flyout-layout.runLaunchChromeStartupSelfTest (cyclomatic 26): verify-flyout-layout.runLaunchChromeStartupSelfTest 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":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3fe2a328d5c2eab4c7534af60d224a52372a3f84440710414ed9398d6d0cf47"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.haBinarySensorKind (cyclomatic 26): haDomains.haBinarySensorKind has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd90d5a1c1b26fc4d279d8f870141b5fb10cab83d32f2e64b93f05cb9e241629"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildValveKind (cyclomatic 26): haDomains.buildValveKind has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/core/haDomains.ts"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d1611e228a8c0285be4f2defb4cc347b54231fbfc225e09bf2b7727cd6fbc2"}},{"ruleId":"D1","level":"warning","message":{"text":"percentScale.rawFromPercent (cyclomatic 26): percentScale.rawFromPercent has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/percentScale.ts"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"a892e9dc6923dd5f5bf654d7adac78279e8b8e7cc6ee8b1ca40279ef524ae230"}},{"ruleId":"D1","level":"warning","message":{"text":"speakerActions.coerceSilentExecutionArg (cyclomatic 26): speakerActions.coerceSilentExecutionArg has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8920f18b79a95cd5eccab711002765bc2002d8d1d6d9808e46f673e90732ce5"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.resolveTarget (cyclomatic 26): appUrlCommand.resolveTarget has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"d32539806bf3137fbd2aeb2ea2029e814248170cb6720aeae467db77b6f7bb16"}},{"ruleId":"D1","level":"warning","message":{"text":"facetViews.row (cyclomatic 26): facetViews.row has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 5 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a5da53a40d671aecef2c2cca8e9586f00bab0f0848e4abd7c5db5df2b7c278"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.renderApplianceDrawer (cyclomatic 26): detailDrawers.renderApplianceDrawer has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"50cbb652a5d5a51a589320fe15d5f8bb180f24a694c4509e7bc05a204e25afcb"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.bindCollapsedInlineSliders (cyclomatic 26): detailDrawers.bindCollapsedInlineSliders has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 925, 905, 927). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"176d5c9c917ed9f1768e651bb39f74b7eef6b79cab3d5470a6827c9b11b717d6"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsEvents.commitSettingsSave (cyclomatic 26): settingsEvents.commitSettingsSave has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"725fb20af8372bb5d5451ed5508b35de217fd8d7313c26cd219b1ae52bcb2afc"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.doesUndoStepActivateHighRiskDevice (cyclomatic 26): activityStackView.doesUndoStepActivateHighRiskDevice has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 682). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94111c9bbe127bfbda7bdc8069577ef0bf05c289b02b0b0be6be2df5d7c76be"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.dismissActivityById (cyclomatic 26): activityStackView.dismissActivityById 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"212383444b04b3f1654d1291900b38a9356cc81da07fa4381b59157a45ad3d98"}},{"ruleId":"D1","level":"warning","message":{"text":"AssistantResponseArea.body (cyclomatic 25): AssistantResponseArea.body 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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"112a5485b5a7a9f83adddc7504491e74cee2a264acce183738e11fcda1dbec96"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLivePanelController.present (cyclomatic 25): CameraLivePanelController.present 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"af3ea1b1def5e8630717d6a55f79709549dfca04565e3fd8693db34d9f4cab32"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalIntentParser.bareCategoryOutcome (cyclomatic 25): LocalIntentParser.bareCategoryOutcome has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"2254096ccc5af81f043e93e1afa083b6aead5c47e65b5dafbc9fd32c1013355f"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelIntentResolver.planFromSystemOne (cyclomatic 25): ModelIntentResolver.planFromSystemOne 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. This is NOT this file\u0027s highest cyclomatic complexity: ModelIntentResolver.systemOneOperation (cyclomatic 27) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bdf46f3f4e0603fe0d5e1cb4748e653fec670c05505a7bda7dc7b0a62e800b8"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.interpretedLockStatus (cyclomatic 25): MiotSynthesizer.interpretedLockStatus has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5256dc4c4f5fc80cde5775461feb5b286dc43b27faa4114f02f3e716e5264b4"}},{"ruleId":"D1","level":"warning","message":{"text":"models.airQualityFromRaw (cyclomatic 25): models.airQualityFromRaw has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: models.localizeApplianceMode (cyclomatic 59) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"777faf93ab11652a19cd978d4ed26ac61bbe67e6539fbcfb08b550fdce5bc845"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.haCoverSubtype (cyclomatic 25): haDomains.haCoverSubtype has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b06c29e516e0b30b886316d0799f59b90206a338eb1fc1d80096b382a68c7ae"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.unrecord (cyclomatic 25): UserHabitMemory.unrecord has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d0827d8bc329443c58ecf6fbb31447ca53330b3bec04af14ae96e6324392790"}},{"ruleId":"D1","level":"warning","message":{"text":"habits.mentionedHabitTargets (cyclomatic 25): habits.mentionedHabitTargets has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"179b1a638a16eb61f8fec790746d40d8312cedbcc2cf7fd5329e2d29af3a38b7"}},{"ruleId":"D1","level":"warning","message":{"text":"synthesis.interpretLockStatus (cyclomatic 25): synthesis.interpretLockStatus has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: synthesis.coverStatusWord (cyclomatic 52) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2969a6239e143dac5af53623e00844f7db4b4393c28a56702614f220d101e67"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.inferHAMetricFromMeta (cyclomatic 25): sensorHistory.inferHAMetricFromMeta has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1263}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca98d64b2cab4a833ad2478fa796bb0b4abe1967a47e44d0f4de3af42420fbb"}},{"ruleId":"D1","level":"warning","message":{"text":"appLifecycle.bindGlobalKeys::onKeyDown (cyclomatic 25): appLifecycle.bindGlobalKeys::onKeyDown 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":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d84757010827d77664b6750a6d6aca720a25d98fbb10d360d1aaf8b8a49f570"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelRenderPipeline.patchPopover (cyclomatic 25): PanelRenderPipeline.patchPopover 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":"windows/src/ui/reconciler.ts"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"2302d607fce50224e631fea59ca729721355f6e1202a770e4147d08126d2e368"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.bindActivityStackAfterRender (cyclomatic 25): activityStackView.bindActivityStackAfterRender has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 7 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b456a328d260f6b92cc7ac91a5286dbab0ebcb4fc744a22b0164cac39a1da5"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLivePlayback.start (cyclomatic 24): CameraLivePlayback.start has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePlayback.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc587fd5c3f665e66b03576105a732ee4823ee0afa9a2297749c319376f84efa"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceCardView.compactHeaderRow (cyclomatic 24): DeviceCardView.compactHeaderRow has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8eae777c7019becf5247cfa11f833902aaa1d855ddca70bb97ffd14a8ceee1b"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorCardView.chartPlot (cyclomatic 24): SensorCardView.chartPlot has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c217c0704d45aa36e926d96874607cc826a13b124d2d739547357bccdae76fb"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemActivityMonitor.apply (cyclomatic 24): SystemActivityMonitor.apply has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SystemActivityMonitor.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"608565bcb9d4043e8d6d077b6f9ad425d818d7c6eb29638b9c4e163b84af71d8"}},{"ruleId":"D1","level":"warning","message":{"text":"URLCommandHandler.resolve (cyclomatic 24): URLCommandHandler.resolve has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c40b5c903ac6eb6583df79acde9619fc24e58fd9648b76e6dbd297c06be3d1"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicSensorCardView.chartPlot (cyclomatic 24): ClassicSensorCardView.chartPlot has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"4967f389946d96f3b5f5511c83fb42e1848b025399f5100959c322df645cd7ec"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudProvider.fetchPropsHybrid (cyclomatic 24): MiCloudProvider.fetchPropsHybrid has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c185351650b0399ad3f64001fd6f2b2bc6132cf4573fb43463f30ce4297577"}},{"ruleId":"D1","level":"warning","message":{"text":"CdpSession.constructor (cyclomatic 24): CdpSession.constructor has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 238, failAll, a function literal at line 237). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cea4024197725a7adf422c5e4daceed3da303da2f0f248b8f827bcb3da4aaa3"}},{"ruleId":"D1","level":"warning","message":{"text":"miotFacetText.facetValue (cyclomatic 24): miotFacetText.facetValue has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: miotFacetText.genericSymbolName (cyclomatic 30) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miotFacetText.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"359fe97459fba30cddffddfaaff38985333e0e323572a9fbb85cf2792c52cd29"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.resolveHACameraMotionFallback (cyclomatic 24): haDomains.resolveHACameraMotionFallback has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"8280bf2c18defe5c6b8a95d9c8232631d966ede5d8c692279d914a577886d713"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.extractSensorObservations (cyclomatic 24): safetyAndHealth.extractSensorObservations has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbd46aed9cda6dc26677f7964d08d951e6d996ca41c001bf4573f32d99e840c"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.extractSensorLiveMetrics (cyclomatic 24): sensorHistory.extractSensorLiveMetrics has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"028d54766aa368ab899b3dd814f2cb992e6908727effcefe1647742da66e1753"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.resolveHomeAssistantSensorEntityIds (cyclomatic 24): sensorHistory.resolveHomeAssistantSensorEntityIds has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1371}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a6040dc883c2dfb5195200fbcc31b0a1e90e6202f9d0fa2357eaeda0e31e2a"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsViews.renderGeneralPanel (cyclomatic 24): settingsViews.renderGeneralPanel has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6002879d208caa54a1f7d1c31a9f992d63d9e4a0665886e01496535527280669"}},{"ruleId":"D1","level":"warning","message":{"text":"bindEvents.toggleDeviceForHost (cyclomatic 24): bindEvents.toggleDeviceForHost has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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":"windows/src/ui/bindEvents.ts"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e97793a3ad9690e99965058acd6abbfbb947eec5fe62a6c3911763ea75530dd"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorCardView.body (cyclomatic 23): SensorCardView.body has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5458834d4e85c851c2a423e1bd9d181bea51bc0bde6023c91aa6d9f8abf5749"}},{"ruleId":"D1","level":"warning","message":{"text":"LGWebOSClient.handleIncomingMessage (cyclomatic 23): LGWebOSClient.handleIncomingMessage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ed4df3a4ec04a8604948a2ee7fb55f3c348e0e96f04f87be8067c6539bbc72c"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.extractRawNumbers (cyclomatic 23): MiCloudClient.extractRawNumbers has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d895aa5f2344bb376c6f7464bcd7f125ed8b2a4e1b4ee4ee1f64c85e3d755fd"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudProvider.execute (cyclomatic 23): MiCloudProvider.execute has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4557ee1dc48339de45722029f0b4dbaf6582ac80b6bbf0b260929120b6db807"}},{"ruleId":"D1","level":"warning","message":{"text":"models.deviceEnvironmentReading (cyclomatic 23): models.deviceEnvironmentReading has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file\u0027s highest cyclomatic complexity: models.localizeApplianceMode (cyclomatic 59) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a79b521821b4458fc4d9357a6a48790f7b79b400c926b2f6ab9d6f290ee0f4e"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.mergeRoomPage (cyclomatic 23): MiCloudClient.mergeRoomPage has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"8549fa38ba5e74174006117d220d8743525dd0d2fc075d03411f7738faca469a"}},{"ruleId":"D1","level":"warning","message":{"text":"intent.bareCategoryOutcome (cyclomatic 23): intent.bareCategoryOutcome has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. 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":"windows/src/core/assistant/intent.ts"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde4fda85909b45c7d1ce4fa825da9ed28d00dd3e6fdb1137b92327345ed298d"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.cachedKind (cyclomatic 23): homeAssistant.cachedKind has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f755f0430e6073d1dbd28e54dfe1ad01b905b98dfc4808fb214e2075330af65"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.homeAssistantIdentity (cyclomatic 23): homeAssistant.homeAssistantIdentity has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3be92ad7c1def42db5a336aa2c874715cec7e1c76b07fb4ce505fc4e5ce895"}},{"ruleId":"D1","level":"warning","message":{"text":"scheduledCommands.parseOperation (cyclomatic 23): scheduledCommands.parseOperation has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cea3f65030878aa28fa852c3e8eb5a8add090f8290c7d5cd280eebc963fafb9"}},{"ruleId":"D1","level":"warning","message":{"text":"automationSettingsView.renderTriggerOptionsEditor (cyclomatic 23): automationSettingsView.renderTriggerOptionsEditor has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 9 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"32520b1eb222b07da0bea7057c99d19751e116dcb63a24ff721ca2a8b86c76c9"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.updateLiveSliderReadout (cyclomatic 23): detailDrawers.updateLiveSliderReadout has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"619dd69c9ff1165b9cd56a6cb620ff57eb3751741ab1c2f73c85d04909c186ab"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsEvents.probeAssistantConnection (cyclomatic 23): settingsEvents.probeAssistantConnection has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad09ec097a6a9c78923cb36a7e2e25caecf1baec55bbe6c7f1f5293667061286"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.tickSafetyHealthAndAutomation (cyclomatic 23): activityStackView.tickSafetyHealthAndAutomation has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ba6dedc67146759d1d57bc71230607ab54d7eb380b03d6b7c49fe1acfa247e"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceCardView.contextMenuItems (cyclomatic 22): DeviceCardView.contextMenuItems has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9efeb4ebbc49e3cc73cfd8efb698611b1ddeba4c7e1a63b2644d96773d090785"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceCardView.fanDrawer (cyclomatic 22): DeviceCardView.fanDrawer 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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb9ddd9fcf59684eb24d07db305811ab12ff136cdab2ebdfc940eee443b3078"}},{"ruleId":"D1","level":"warning","message":{"text":"GrokBallRenderer.drawRibbons (cyclomatic 22): GrokBallRenderer.drawRibbons 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":"Sources/MenuBarMijiaApp/GrokBallRenderer.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"195ffd37fa063f2b1a8419beb0a2b606fb35c5e424192cfd4dff2adcb3e6f662"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicDeviceCardView.fanDrawer (cyclomatic 22): ClassicDeviceCardView.fanDrawer 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bbd9d475fa5122254822950b31fe5a6a7fb2fba54eb869901dde1b3f459207"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceDeduplicator.reconcilePairedHALightGroups (cyclomatic 22): DeviceDeduplicator.reconcilePairedHALightGroups 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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"924f49a0ca3e07d168d41e48ea0d37c8b6033cb2fdebbe77210614760a7e10a9"}},{"ruleId":"D1","level":"warning","message":{"text":"EnergyHistory.record (cyclomatic 22): EnergyHistory.record 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":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b86aa6fcafbccf963fb15804c3e723314dc48f73dea5c24370f1a8963f0c474"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.buildQuickActionItems (cyclomatic 22): HomeStore.buildQuickActionItems has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b38414f05e93de2989259365c7b30ab6088c0e4b5188e5d05b5390e1d366edb"}},{"ruleId":"D1","level":"warning","message":{"text":"UpdateManifest.parse (cyclomatic 22): UpdateManifest.parse has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateManifest.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b12cdf52af4d31983657b11e75d492aac20b26a248220bf800ea4bbf1e2d6a7"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.parseRooms::appendHomes (cyclomatic 22): MiCloudClient.parseRooms::appendHomes 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac2273bb7f0fce4bee36607dc9518cf3680e722db8fd770d06b08ca9dd9f8cfe"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.cachedExtendedKind (cyclomatic 22): haDomains.cachedExtendedKind 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":"windows/src/core/haDomains.ts"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d579bf8cd611566eb699a9b0b7b822fdbc5bc9db719a268f6c5027f5d77d272"}},{"ruleId":"D1","level":"warning","message":{"text":"habits.decodeHabitOperation (cyclomatic 22): habits.decodeHabitOperation 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":"windows/src/core/assistant/habits.ts"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6fc465b49534d00756bedbcb8bffc06ffcf0d0806eabe05cc38d68b20d6218"}},{"ruleId":"D1","level":"warning","message":{"text":"automationEngine.readSensorMetricValue (cyclomatic 22): automationEngine.readSensorMetricValue 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":"windows/src/core/automationEngine.ts"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d64ce748ed09c3206ce770987f89403cddf2aa3d3e5bfc674104e1c80718bd"}},{"ruleId":"D1","level":"warning","message":{"text":"homeAssistant.haPowerWatts (cyclomatic 22): homeAssistant.haPowerWatts has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9d0744a4853d5d1ad4bc833013fe96bf4301421f3986aa647e2a0303a46339"}},{"ruleId":"D1","level":"warning","message":{"text":"speechGuard.bindCompanionAndUpdaterEvents (cyclomatic 22): speechGuard.bindCompanionAndUpdaterEvents has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1268, 1305, 1260). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest. This is NOT this file\u0027s highest cyclomatic complexity: speechGuard.toggleVoiceInput (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"722e9e3a3cd78107bf13d2b94375046f8d36282a655d685b3c51dea5befc9747"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistoryView.computePlotGeometry (cyclomatic 22): sensorHistoryView.computePlotGeometry has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1522c4fa21544d9b8e9baa6de4d71b7d91ddd505f8afae6350cd3b4cc1233a5"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.coverActionTitle (cyclomatic 22): detailDrawers.coverActionTitle has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"09862d0caf14a7ffc20fd44e9fa13dc295a4d1d08a578a7473e2bee6a60a8ee2"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelSearchKeyboard.handle (cyclomatic 21): PanelSearchKeyboard.handle has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"320d2521e9dea25ff68a16f78d39dc16714c61725ab52310e3950853efb44371"}},{"ruleId":"D1","level":"warning","message":{"text":"GrokBallSidecarController.handlePointer (cyclomatic 21): GrokBallSidecarController.handlePointer has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/GrokBallSidecarController.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e187a50b511a52e21f022759822eadd2855a98bc795180f6516134f46862d18"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusItemEventDecision.decide (cyclomatic 21): StatusItemEventDecision.decide has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/StatusItemEventDecision.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"700a4635bd6cdb98e486f99e038bacee4d0dcc4a50ebcda260d9c8f658bc826f"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicDeviceCardView.contextMenuItems (cyclomatic 21): ClassicDeviceCardView.contextMenuItems 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"93537ade480f9a9070842df8710a6e769eca5ef7d49b77283cfb2dea775caaa8"}},{"ruleId":"D1","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseTrak (cyclomatic 21): FragmentedMP4Demuxer.parseTrak has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce615abe256591545dd122116dd58fde0e075f738aabfe58bc48e7a99a61fb2"}},{"ruleId":"D1","level":"warning","message":{"text":"PanelHealthResolver.resolve (cyclomatic 21): PanelHealthResolver.resolve 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":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb104c90981f299f931f97f096febb01f7b7cde5580934890ba93923ce984505"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.revert (cyclomatic 21): HomeStore.revert has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdf3bb9a2b65fec277713bfb07bcf3cf20caa7e52cc0d3ff561d5bcb0281a97"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.menuBarText (cyclomatic 21): HomeStore.menuBarText has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BMetrics.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f2d5ff6e5bfd947fff5209f3e6173e8cc1c9c7bab708a666b457211813cc91"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.turnAllOff (cyclomatic 21): HomeStore.turnAllOff 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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"24f02cda7186c52073150a46020ed4593e66ce6d9311cbf1edbb5b885a651eb0"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.executeCoverPosition (cyclomatic 21): HomeStore.executeCoverPosition 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4c5844e9a69cd0852a408fbd1d1dc6bbbeeb2a95eb7b9c32bc04ea5a4a6f07"}},{"ruleId":"D1","level":"warning","message":{"text":"LGWebOSProtocol.friendlySourceName (cyclomatic 21): LGWebOSProtocol.friendlySourceName 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":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f585fbfa4b72d8c78cc7f3cbbaa3b507ab470162dcbf5fd06f7b8bc029b433e"}},{"ruleId":"D1","level":"warning","message":{"text":"CoverSubtype.init (cyclomatic 21): CoverSubtype.init has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b333405b3a677516b5bb445c9ee37405b1383c12016fa89012e77eb600b692"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartDevice.environmentReading (cyclomatic 21): SmartDevice.environmentReading has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"07079226db52c3d0786b8b430d675280526a79434ba54dfe5c18423a47675fc7"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorHistory.mergeCloudSamples (cyclomatic 21): SensorHistory.mergeCloudSamples has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1f7bd38afcab448b550ed62393ca1b0d433df871529bc40a431a6c0808f2cd"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.parseDeviceRecord (cyclomatic 21): MiCloudClient.parseDeviceRecord 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"480b82a514bc5d1477a1cf770760b1e2b58023c2ebd9298abb3627d786aa8421"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildCoverKind (cyclomatic 21): haDomains.buildCoverKind has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e4718a9acbe801c150810b688cc92fc6d14552b68cbe156507d92142c0b0d6"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildHumidifierKind (cyclomatic 21): haDomains.buildHumidifierKind has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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":"windows/src/core/haDomains.ts"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"ace7b411853dedf6421e728042fa8f4dd3c4789967aee280dccffa9acce5363e"}},{"ruleId":"D1","level":"warning","message":{"text":"CredentialVault.deleteMiSession (cyclomatic 21): CredentialVault.deleteMiSession has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 471). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b4f51cda312c8734bf1e74f293208be72f9c7c01ea520003d82eaa8a73fc03"}},{"ruleId":"D1","level":"warning","message":{"text":"miAccountsStore.refreshMiAccountsConcurrently::refreshOne (cyclomatic 21): miAccountsStore.refreshMiAccountsConcurrently::refreshOne has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b7b909d1493a05316a4ecd976d83bb50e7c0bacf319900e515d2628b8cfefe"}},{"ruleId":"D1","level":"warning","message":{"text":"energySettingsView.renderEnergySettingsSection (cyclomatic 21): energySettingsView.renderEnergySettingsSection has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25ba3a13788a0a9f8919eabf8da9fc67bc6113f6540c8b2786a221018775754"}},{"ruleId":"D1","level":"warning","message":{"text":"proactive.maybeRefreshProactiveInBackground (cyclomatic 21): proactive.maybeRefreshProactiveInBackground has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/proactive.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd164572fa403c72668dffc80d7bae0e83d2777bd5dfc5a60c6b65b4388b500"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLiveController.bindEvents (cyclomatic 21): CameraLiveController.bindEvents has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 1312, 1270, 1290, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea422c6d6dd49d2747539c61e870ee57f19fee716541221e850c642f4714583b"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceViews.renderSmallDeviceTile (cyclomatic 21): deviceViews.renderSmallDeviceTile has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a4d4ef933cd0dd123702a5ad3dae49386ce3263912f9f1549d93f1448a46959"}},{"ruleId":"D1","level":"warning","message":{"text":"bindEvents.bindDeckEvents (cyclomatic 21): bindEvents.bindDeckEvents has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1517, 1478, 1494, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1452}}}],"partialFingerprints":{"codehealthFindingId/v1":"be5f34778e94145f589d01ac0ba768b43b252e5799e7d8d549ad14891538c66d"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.pruneOrphanedDeviceActivities (cyclomatic 21): activityStackView.pruneOrphanedDeviceActivities has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c9dbf576069cb350fae01c45d7562e702795c0ade5924657b4db2ce5430c7f"}},{"ruleId":"D1","level":"warning","message":{"text":"ControlCenterPanel.deviceCollectionView (cyclomatic 20): ControlCenterPanel.deviceCollectionView 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":"Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bd3a65fa3270d606f845d84f89084c7e4046aae702da6a4934a392f6a0f527"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarPanelController.showPanel (cyclomatic 20): MenuBarPanelController.showPanel 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":"Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa33c663d62a4b1ae87b1e94853e0dc3d05d29d06d6dc3282313cb581e690c06"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.confirmToggleReadBack (cyclomatic 20): HomeStore.confirmToggleReadBack 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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17db319785cab1bc154787fca43a498238a11e7d1f0fe608d7aacaada6d8b8d"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalIntentParser.parse (cyclomatic 20): LocalIntentParser.parse 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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"379b694a03e94aac20f88f98e621e8b53ba546fe56aaca4a34376470e39edcdb"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalIntentParser.extractEnglishNumericOperations (cyclomatic 20): LocalIntentParser.extractEnglishNumericOperations 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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d2ec750b89ea24620195cf3a7ba03252b8fb7306bd6fd1e606ee9a9b446173"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelActionPolicy.decide (cyclomatic 20): ModelActionPolicy.decide has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelActionPolicy.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bffac2f762987bf07282b7ad4eda4ffc2d34ddaf92bca2c5244dee6fdf01dad"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.unrecord (cyclomatic 20): UserHabitMemory.unrecord 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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a59b209436728c0818b4b84dd40024d32af0ac58ecc0a5c7451d1036b8e623e"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::main (cyclomatic 20): menubarmijia_windows::main has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/main.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"69bc2eafb5b2e847932949bd4d2f10d57ce2b611e5caf9f5f9e94ba2133b5ccc"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::network::native_http (cyclomatic 20): menubarmijia_windows::network::native_http 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":"windows/src-tauri/src/network.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"042429233031abd5fe858aa1478cf0d53253cb777fbaa849cf46093743620bff"}},{"ruleId":"D1","level":"warning","message":{"text":"deviceCategory.deviceCategory (cyclomatic 20): deviceCategory.deviceCategory 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":"windows/src/core/assistant/deviceCategory.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"266126fdc11159bd6d191f00dc1924de13a65130ca2d2ade60cff720446305e3"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.haLightCapabilityFlags (cyclomatic 20): haDomains.haLightCapabilityFlags 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":"windows/src/core/haDomains.ts"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"25fa396ea1333c4adc5467c2958bbb07387cfb583560d0bd92981c3ad3ce11b6"}},{"ruleId":"D1","level":"warning","message":{"text":"MiAccountLogin.parseServiceTokenCookie (cyclomatic 20): MiAccountLogin.parseServiceTokenCookie 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":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"db5a299b203291a2c28c5073b8df868835ff8608d6979e502b4dc64dff01d9d3"}},{"ruleId":"D1","level":"warning","message":{"text":"OfflineHistory.load (cyclomatic 20): OfflineHistory.load 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"d135cf41ba073fc07485694734c1c79ef7b9ca2b657136e9cf126dc0097ca8a2"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.findUniqueAskDevice (cyclomatic 20): appUrlCommand.findUniqueAskDevice has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"4acefec2db677eb2723422e8bf91d9a403ac0f0010cb9a73767ea4a56c9d0c50"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.executeDirectAskPreset::runDirectCover (cyclomatic 20): appUrlCommand.executeDirectAskPreset::runDirectCover 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. This shape REPEATS in the file: one other method here (appUrlCommand.executeDirectAskPreset) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"e998cb9d4d4e3b70eb9572f6b9940f5b543ed79838e0ba8f96ca140b68b062b5"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.classifyFacetMetric (cyclomatic 20): sensorHistory.classifyFacetMetric has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"27cdff2e34b03a065af602f86e2d9048b0bf3a25316d6a3f246a2d862d78397e"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.resolveMiotSensorPropertyKeys (cyclomatic 20): sensorHistory.resolveMiotSensorPropertyKeys 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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"20dc6e3bd98678b4f8db4dc12d6615cc5d57d19c5ecdd4eee15243368ce488f3"}},{"ruleId":"D1","level":"warning","message":{"text":"DiagnosticsLog.loadFromStorage (cyclomatic 20): DiagnosticsLog.loadFromStorage 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":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d0dfd9e658f136b8555ec59240c40a16a418857d02ed1de88a0c970fd5657d"}},{"ruleId":"D1","level":"warning","message":{"text":"EnergyHistory.deviceTotals (cyclomatic 20): EnergyHistory.deviceTotals has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"e363388e75359d82762e371a6b90dc05bced648956aa52b9bc95d0d944af56d8"}},{"ruleId":"D1","level":"warning","message":{"text":"automationSettingsView.triggerIconSvg (cyclomatic 20): automationSettingsView.triggerIconSvg has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"9245b2ef413870282a1469377d38e8ad335103b1fa19e5e445f343769d835ce2"}},{"ruleId":"D1","level":"warning","message":{"text":"automationSettingsView.summarizeRuleDetails (cyclomatic 20): automationSettingsView.summarizeRuleDetails 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":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d267764a4688fb27c0041b7d25a9dbdad04dca4248b22ad6cd4d9bcf900d50"}},{"ruleId":"D1","level":"warning","message":{"text":"energySettingsView.recordHostSnapshotIfLive (cyclomatic 20): energySettingsView.recordHostSnapshotIfLive 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":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f196eb373e9123b7c58a136685b8cb1396031005c628223014d69c7eedcb29"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistoryView.syncSensorHistoryHost (cyclomatic 20): sensorHistoryView.syncSensorHistoryHost 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":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"039d005de515fa46c4bbd3fd0bc32023017190c03e2f350de2b80981000e5520"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.bindSpeakerCommandBars::submitSpeakerInput (cyclomatic 20): detailDrawers.bindSpeakerCommandBars::submitSpeakerInput 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"d182eaac154503d0d5b2207f2b07c0d451244892b78639a1388b66cd18af336b"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarStatusSummary.text (cyclomatic 19): MenuBarStatusSummary.text 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":"Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff0ab3a50aee0fe2ce42fd9b882bf3da5a91c896baafe166c033ac76be43085"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicControlCenterPanel.pageSections (cyclomatic 19): ClassicControlCenterPanel.pageSections 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"262de39365b46a056bc3075436edd512fd2366f7f25f5f67dfb023b17bc433e3"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraPTZDragPlanner.direction (cyclomatic 19): CameraPTZDragPlanner.direction 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":"Sources/MijiaCore/CameraPTZ.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80bba517db1f8a184665284d05a90001818ca6169bf430c3c9842e536c783cf"}},{"ruleId":"D1","level":"warning","message":{"text":"DualSourceHomeProvider.handle (cyclomatic 19): DualSourceHomeProvider.handle 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":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"77e87e3b00f1ce6549594ac17d0bb85a2773990156ba97d435c77aacf3365406"}},{"ruleId":"D1","level":"warning","message":{"text":"HADiscovery.parseMDNSZoneOutput (cyclomatic 19): HADiscovery.parseMDNSZoneOutput 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":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac14b7ba759c16a41abcd61ea8c42419feadd3897697844a93e96f1ee9e449d5"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.showToast (cyclomatic 19): HomeStore.showToast has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"454eeebedeeb861519048e913b53b4a016b943f902feb7e9aa866115a0515934"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.startUpdateInstallation (cyclomatic 19): HomeStore.startUpdateInstallation 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":"Sources/MijiaCore/HomeStore\u002BUpdate.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"472510bd71db65da20fd6107edc43728bfa756611ff74c85df85b32b31321e84"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.exportRaycastSnapshotIfNeeded (cyclomatic 19): HomeStore.exportRaycastSnapshotIfNeeded has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab9d1eadfd0e3a32adf6005e9accd6b4a71eb1b7a6dbe5ab3f01f66ed8bf721"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudClient.decodeResponse (cyclomatic 19): MiCloudClient.decodeResponse 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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f4a64253d234eb6a932943550f4c71cd9d43094c6a96b831415eb6d752446e"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudProvider.runLoop (cyclomatic 19): MiCloudProvider.runLoop 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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7d6d58e4030e11538ae9fb7f4004572ef53f62c246643a42dffcb14ef8c9a7"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.buildKitchenAppliance (cyclomatic 19): MiotSynthesizer.buildKitchenAppliance has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c641e0171d49929eba2d26dd00f12b6744338b9a67906135cad8adf48c0a86a"}},{"ruleId":"D1","level":"warning","message":{"text":"habits.forgetHabitItem (cyclomatic 19): habits.forgetHabitItem has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3b902eac75f9784d3de453c01be8cc9fc284d33029a05c56e23101e7aa21ab"}},{"ruleId":"D1","level":"warning","message":{"text":"synthesis.primaryMiotService (cyclomatic 19): synthesis.primaryMiotService has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: synthesis.coverStatusWord (cyclomatic 52) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"b170a031599e681166f722684059bebc2f1ab25c4488c571dd9b80a989241d01"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.evaluateSensorAlerts (cyclomatic 19): safetyAndHealth.evaluateSensorAlerts 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f62ca65e2d02c6bda029f56021e04611f18fd861ae372179b60dadd1200e6f7"}},{"ruleId":"D1","level":"warning","message":{"text":"raycastSnapshot.buildQuickActionItems (cyclomatic 19): raycastSnapshot.buildQuickActionItems has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 370, 361, 364). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2f380f8b1d4059ad1df0ed559cdb40db00f69306027a5466876f39f6c1ca17"}},{"ruleId":"D1","level":"warning","message":{"text":"appUrlCommand.describeResolvedTarget (cyclomatic 19): appUrlCommand.describeResolvedTarget 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":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4186892f26fc3f4cf6257e8ba1033a4d2856795f3a97b1990a9258852c9d2c9"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.sanitizeStoredBucket (cyclomatic 19): sensorHistory.sanitizeStoredBucket 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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"268c95c3d1e73cc7ff63a4fb5bb42cb95cade4b669189aba8550bc7c836f59cd"}},{"ruleId":"D1","level":"warning","message":{"text":"sensorHistory.parseMiCloudHistoryPoints (cyclomatic 19): sensorHistory.parseMiCloudHistoryPoints 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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"297bf0510bb80aa12fa3076fc4ab25ceb1b7817a5490b0d8d1650b94e4117cae"}},{"ruleId":"D1","level":"warning","message":{"text":"scheduledCommands.parseQueues (cyclomatic 19): scheduledCommands.parseQueues has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"b247224fd4f765665f8b18f02963e4e7ee45344a9bf67695e738e2e817a657bf"}},{"ruleId":"D1","level":"warning","message":{"text":"cloudRefresh.cloudPanelStructureFingerprint (cyclomatic 19): cloudRefresh.cloudPanelStructureFingerprint has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 498, 553). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d18e63a6af43b131f36995b8d734226d0c0fe7f67ed35eeb14aa749d9910e34"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.renderCoverDrawer (cyclomatic 19): detailDrawers.renderCoverDrawer 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62a651b9fc476385b7e95b1e1d565023f947c14f328c18632d1b5628d9d564e"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsEvents.hasUnsavedSettingsChanges (cyclomatic 19): settingsEvents.hasUnsavedSettingsChanges has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"d818651b67a38af2f0ad8a6e219938d036f9e6f6a3ad5c169b578a99375873a8"}},{"ruleId":"D1","level":"warning","message":{"text":"bindEvents.bindEvents::writeFacet (cyclomatic 19): bindEvents.bindEvents::writeFacet has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f246b66d6fb4dfa48bc2a9ea094c184c9c8238363ff4b5dccc3632e5ed9c8b7"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLivePanelController.startMJPEGStream (cyclomatic 18): CameraLivePanelController.startMJPEGStream 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":991}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbf4ad61a0ee4c71e40a04310e12710b7ff6bc6de51862ad0f56af2e5329b947"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLivePanelView.viewportContent (cyclomatic 18): CameraLivePanelView.viewportContent 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d2497de1aa649eb54e5452b5fbe3b6ee259d61919a2ea45d8493d7ec9f456c"}},{"ruleId":"D1","level":"warning","message":{"text":"RoomOrderRowView.body (cyclomatic 18): RoomOrderRowView.body has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/RoomOrderEditor.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b890a9799eb33228fab276e174efda903041c78f8499bd9d228adbcd3283b0"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentCatalog.init (cyclomatic 18): IntentCatalog.init 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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7959e5a364e727c9d68722d96443dbca6d7dc42e044a62f67ee5f10ce20f53"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceSynthesizer.haEnergyKwh (cyclomatic 18): DeviceSynthesizer.haEnergyKwh has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1742}}}],"partialFingerprints":{"codehealthFindingId/v1":"c542cc60dde2d27ed38415b3ef31df5016ebbff28639ca9b58ac12a634ba9a30"}},{"ruleId":"D1","level":"warning","message":{"text":"VideoNALUnits.annexBToLengthPrefixed (cyclomatic 18): VideoNALUnits.annexBToLengthPrefixed 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82b671d8d5c23342ebc2333109041aaf308bf665f22c7ba433f46801a7ea026"}},{"ruleId":"D1","level":"warning","message":{"text":"HADiscovery.buildInstance (cyclomatic 18): HADiscovery.buildInstance has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb72ed91d16308b92ab62b2d7eb8a8df58d8f208127398edf69e081153d9e3c0"}},{"ruleId":"D1","level":"warning","message":{"text":"HADiscovery.isPrivateLANIPv4 (cyclomatic 18): HADiscovery.isPrivateLANIPv4 has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2bfa8cf97e15c95b477db406878eafcb9624ad64d0f9820cb7736e91621a1f"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.allOffChange (cyclomatic 18): HomeStore.allOffChange has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1b1eb301e3ddcbb87c0c2a44c996a690b5fa090bf4e6e24c1240d7983a2ff0"}},{"ruleId":"D1","level":"warning","message":{"text":"SceneVisualCategory.init (cyclomatic 18): SceneVisualCategory.init has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: ApplianceActivity.localizedLabel (cyclomatic 19) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1644}}}],"partialFingerprints":{"codehealthFindingId/v1":"9239de0480911191468d2821e24835fdb6c9019a00161604dc5ccb5e0febceb6"}},{"ruleId":"D1","level":"warning","message":{"text":"UserHabitMemory.suggestionTitle (cyclomatic 18): UserHabitMemory.suggestionTitle has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce3a542aee8a14f81e9c3084b44781de68efc9c7cdeadc08bed643ce66407211"}},{"ruleId":"D1","level":"warning","message":{"text":"MiAccountLogin.parseSetCookieExpiry (cyclomatic 18): MiAccountLogin.parseSetCookieExpiry 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":"Sources/MijiaCore/MiCloud/MiAccountLogin.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dabc190f8cc21f1673ad2e01badfc5aacabd984386fe576a30c43ddb77e12f3"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotFacetEngine.controls (cyclomatic 18): MiotFacetEngine.controls 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":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"5821c4aed2b5da28c9c5e945acd33542481567587b33831234c17aa9949c1cdc"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.synthesize (cyclomatic 18): MiotSynthesizer.synthesize has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"461e545acc40a6233a40b8e4f3c7353518b215965bcf1eff75dcbf73b935bb6a"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.buildSensor (cyclomatic 18): MiotSynthesizer.buildSensor has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee8807f7a6b752ae94e90acceaa560955cfb88a578d09952ad151f2617aaacf"}},{"ruleId":"D1","level":"warning","message":{"text":"Go2RTCOwnerRecord.parse (cyclomatic 18): Go2RTCOwnerRecord.parse has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"81d7e2ac84e0cbe2b7e20ce55db580f43912c4a8deec62ad49bef0c22d20f6c7"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::camera::spawn_cs2_udp_relay (cyclomatic 18): menubarmijia_windows::camera::spawn_cs2_udp_relay 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1983}}}],"partialFingerprints":{"codehealthFindingId/v1":"7629a38925551b1ac707767594b7d160b9282f775e7d8b7bc8bf053a6612277d"}},{"ruleId":"D1","level":"warning","message":{"text":"menubarmijia_windows::companion::handle_ipc_client (cyclomatic 18): menubarmijia_windows::companion::handle_ipc_client 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":"windows/src-tauri/src/companion.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"211a1e68a9e83bae208289d62c3ed1e8c6d11ebb4f5ca1153bbcf66fab61400b"}},{"ruleId":"D1","level":"warning","message":{"text":"actionPolicy.confirmationHazard (cyclomatic 18): actionPolicy.confirmationHazard has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a8ca09362645cf952012055cb333241ddbefb572189d47d60d1e0c60bb2c7f"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildHAFacets (cyclomatic 18): haDomains.buildHAFacets 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":"windows/src/core/haDomains.ts"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"817ba45fcd91df61492dc80cbb12165d6841b863394c05d49e6cb421adff46e1"}},{"ruleId":"D1","level":"warning","message":{"text":"promptContext.deviceSpecificCriteria (cyclomatic 18): promptContext.deviceSpecificCriteria 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":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fcc85452a2d38c619ca8c4cc00155439f6611a5a468148d4fc19387c815d8ed"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorHistoryStore.mergeCloudSamples (cyclomatic 18): SensorHistoryStore.mergeCloudSamples 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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"859cc6cfeb56b11c2278d4af30492a60fa3f0305f8a89be1d03e30beafa0c1d4"}},{"ruleId":"D1","level":"warning","message":{"text":"controlFailure.isCancellationError (cyclomatic 18): controlFailure.isCancellationError has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c09c8f6b737007028fcbe6a57cd60305c67250578bc312936af6efee0a0ba6"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiAccountMiCloudProvider.execute (cyclomatic 18): MultiAccountMiCloudProvider.execute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: miAccountsStore.extractDeviceMiotCommandDids (cyclomatic 20) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1351}}}],"partialFingerprints":{"codehealthFindingId/v1":"72882b26e7b1d612ff2d73950fe8d0827faa2129c9a582a2a5f848bdeed2a53f"}},{"ruleId":"D1","level":"warning","message":{"text":"CameraLiveController.openCameraLiveView (cyclomatic 18): CameraLiveController.openCameraLiveView has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f38396571582c13974c17ed6e10e4e497e9f8d701caa86723be9a9df006ae4"}},{"ruleId":"D1","level":"warning","message":{"text":"detailDrawers.renderPlugDrawer (cyclomatic 18): detailDrawers.renderPlugDrawer 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"375aa5c57033a100c0667586c0b8c1f5c920816348a8440e4a9eb70f7cc5d28c"}},{"ruleId":"D1","level":"warning","message":{"text":"appLifecycle.checkForAppUpdate (cyclomatic 18): appLifecycle.checkForAppUpdate has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"9253cb9b1c7690632aab58216955f24c3a983f53d9da631380ab8b15e3b39875"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuMijiaWindowsApp.panelHealth (cyclomatic 18): MenuMijiaWindowsApp.panelHealth 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":"windows/src/ui/app.ts"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"12999a97246d71a79520f27db1833ff2841de757b940a1f2df9d28b2c7ac4493"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuMijiaWindowsApp.swapIfNeeded (cyclomatic 18): MenuMijiaWindowsApp.swapIfNeeded has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ddc0214582b4aeb73319a49ec591618af347be78ec6e74fec7983a07138067"}},{"ruleId":"D1","level":"warning","message":{"text":"HotkeyAndNotificationManager.roomOrderKeyAction (cyclomatic 17): HotkeyAndNotificationManager.roomOrderKeyAction 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. This is NOT this file\u0027s highest cyclomatic complexity: HotkeyAndNotificationManager.perform (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"20787d71d0a379dee4aae8a6791927a95ab7887f02483c0a7edae1a205f08a34"}},{"ruleId":"D1","level":"warning","message":{"text":"LiquidGlassSlider.classicBody (cyclomatic 17): LiquidGlassSlider.classicBody has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"12cc83bf3f13c64857711fde411765a5adccdc5ea6ac7ccddf127287666df7d6"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicLiquidGlassSlider.classicBody (cyclomatic 17): ClassicLiquidGlassSlider.classicBody has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c54174a6204645747132b8164da7467e95229a52ccf2bad8dc06fe51e6b79d"}},{"ruleId":"D1","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseConfigRecord (cyclomatic 17): FragmentedMP4Demuxer.parseConfigRecord 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d6a4f0902e6d65914efeab2dac0e1bcb05f06612b9f9c7a5e042ebbc9beb424"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.beginOptimisticWrite (cyclomatic 17): HomeStore.beginOptimisticWrite has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"787c6040227fddf59f52893efbab1ad7f67ee55df5e8f4570c4d21f3c8591ef9"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.setFacetValue (cyclomatic 17): HomeStore.setFacetValue has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba58d8f72617e5f503b53b0039cb41ae7814aafc301d68d3cd64690afa8f713"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorBucketRecord.addSample (cyclomatic 17): SensorBucketRecord.addSample 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":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b4dc7feac3936e7b5ea88776fe27b5374231146871136406355584bd5b0cbd"}},{"ruleId":"D1","level":"warning","message":{"text":"AirQualityLevel.init (cyclomatic 17): AirQualityLevel.init has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: SmartDevice.localizeApplianceMode (cyclomatic 25) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df195b47a709a6d83725bc4978dcff649d3757e50ee10db4ac0fe6a29e959db"}},{"ruleId":"D1","level":"warning","message":{"text":"UnsupportedDeviceCollector.homeAssistant (cyclomatic 17): UnsupportedDeviceCollector.homeAssistant 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":"Sources/MijiaCore/UnsupportedDeviceCollector.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48cbcdb97d6f0fb72f27c567f12871dc30ca2a3f44e8ec1bd60ee4e3be4ff04"}},{"ruleId":"D1","level":"warning","message":{"text":"AppUpdater.stageUpdate (cyclomatic 17): AppUpdater.stageUpdate has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateChecker.swift"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f75ae9bed081d21d3435a1602ef7b36f08efa412b5970ab52c3e12a235ae2b8"}},{"ruleId":"D1","level":"warning","message":{"text":"MiAccountsProvider.publishSnapshot (cyclomatic 17): MiAccountsProvider.publishSnapshot has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"837c730e662ea5af04aea80022cd18bcf81820768a3bc4bf98115d211b902ad3"}},{"ruleId":"D1","level":"warning","message":{"text":"MiCloudProvider.extractStreamURL (cyclomatic 17): MiCloudProvider.extractStreamURL 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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1403}}}],"partialFingerprints":{"codehealthFindingId/v1":"546a5c7f20bd0b862e3ea55cf29a4fd38cdf7cf49047674427973efe39046967"}},{"ruleId":"D1","level":"warning","message":{"text":"MjpegStreamReader::next_frame_jpeg (cyclomatic 17): MjpegStreamReader::next_frame_jpeg 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8ed6cf5dc83cc8b03493fbf37f1227f44d581f94b8c51e1433561975b810895"}},{"ruleId":"D1","level":"warning","message":{"text":"intent.extractEnglishNumericOps (cyclomatic 17): intent.extractEnglishNumericOps 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":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"0329d3dbbe2756492d03c55e26c1233bbf02ff687a2e6f5527343e809005c239"}},{"ruleId":"D1","level":"warning","message":{"text":"haDomains.buildWaterHeaterKind (cyclomatic 17): haDomains.buildWaterHeaterKind has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"51548b1c460b145e7cbd4a77c9e324c515dc0545b32bcaab735fe3bb58581e5a"}},{"ruleId":"D1","level":"warning","message":{"text":"speakerActions.findDirectiveAction (cyclomatic 17): speakerActions.findDirectiveAction 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":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c309ccf092f436c4b73b4488b600ae313835be344ba7ef69ecd5937223816f"}},{"ruleId":"D1","level":"warning","message":{"text":"provider.isLocalNetworkEndpoint (cyclomatic 17): provider.isLocalNetworkEndpoint has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/provider.ts"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a7f5bf24229f8a0672250f4b0832743de36395d9b7b3cca08f93c257c78dd4"}},{"ruleId":"D1","level":"warning","message":{"text":"promptContext.buildIntentCatalog (cyclomatic 17): promptContext.buildIntentCatalog has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b4781c3e65826b50f106f5d5f5bf6668e28b3ee302dac40461fb8adeb579ea"}},{"ruleId":"D1","level":"warning","message":{"text":"safetyAndHealth.collectMaintenanceForDevice (cyclomatic 17): safetyAndHealth.collectMaintenanceForDevice has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae77159511d9a21e720709a80308c516d2cecafc4100c3f97922d637f5c27bee"}},{"ruleId":"D1","level":"warning","message":{"text":"miAccountsStore.readAccountIndex (cyclomatic 17): miAccountsStore.readAccountIndex 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. This is NOT this file\u0027s highest cyclomatic complexity: miAccountsStore.extractDeviceMiotCommandDids (cyclomatic 20) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2499155c1542c263000883f177f6ab911ad61df32f5440491eae3efd6f3502f"}},{"ruleId":"D1","level":"warning","message":{"text":"dualSourceProvider.readTuplePairs (cyclomatic 17): dualSourceProvider.readTuplePairs 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":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"a590ff3db1830931f535b69db7eca5cd14e622836155f0a72731ae585d1e8038"}},{"ruleId":"D1","level":"warning","message":{"text":"intentExecution.executeIntents::runTargetBatch (cyclomatic 17): intentExecution.executeIntents::runTargetBatch 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. This shape REPEATS in the file: one other method here (intentExecution.executeIntents) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a92123ad7a4e3902d43feea6b54b85a848f485a51d0782d5c8f6595709f43fa"}},{"ruleId":"D1","level":"warning","message":{"text":"speechGuard.executeBuiltInQuickAction (cyclomatic 17): speechGuard.executeBuiltInQuickAction has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: speechGuard.toggleVoiceInput (cyclomatic 24) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc0daba65cf7c522e737deff20d5505cd3273385a40f0f83f4817f9068cf4ed"}},{"ruleId":"D1","level":"warning","message":{"text":"settingsViews.renderUpdateSection (cyclomatic 17): settingsViews.renderUpdateSection 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":"windows/src/ui/settingsViews.ts"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac7a72f5dc3ae2f42173bb7bfbd0be22aaa264a1512445f42f2750ca2d93650"}},{"ruleId":"D1","level":"warning","message":{"text":"roomOrderEditor.renderRoomOrderEditorModal (cyclomatic 17): roomOrderEditor.renderRoomOrderEditorModal has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c884dc3098105b4ad8708914266cce350e206b922f2ca21765789ebbf044e8"}},{"ruleId":"D1","level":"warning","message":{"text":"liquidGlassSlider.syncLiquidGlassSlider (cyclomatic 17): liquidGlassSlider.syncLiquidGlassSlider has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fa89f8b9f07feff7e51ce647676230f4f91ba6bef1eaa9d5de588a901bbb2b"}},{"ruleId":"D1","level":"warning","message":{"text":"ControlCenterPanel.emptyStateView (cyclomatic 16): ControlCenterPanel.emptyStateView 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":"Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"e500d00e79649e1c00d2f5c7148f0d7aa8dade98b3c9082a68744d5357478df1"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceFacetSection.rowBody (cyclomatic 16): DeviceFacetSection.rowBody 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":"Sources/MenuBarMijiaApp/DeviceFacetViews.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"981f18aca6f4f3e3490ab8789bf455c6a71dea8c11cd75bc5c6bad581a42df74"}},{"ruleId":"D1","level":"warning","message":{"text":"ConnectionSettingsTab.body (cyclomatic 16): ConnectionSettingsTab.body 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":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81ec4b2052a0db7a5891bdeff5a03a1be20527fde3b90d71f7624460febef52"}},{"ruleId":"D1","level":"warning","message":{"text":"URLCommandHandler.description (cyclomatic 16): URLCommandHandler.description 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":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a5041b69aa990cf0638138b4f410ce6ed93b77dc23041a17d6d24e740d6824"}},{"ruleId":"D1","level":"warning","message":{"text":"UnsupportedDeviceScanner.readHomeAssistantRegistry (cyclomatic 16): UnsupportedDeviceScanner.readHomeAssistantRegistry has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/UnsupportedDeviceScanner.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5228ecacd67a110add1f0b056135db9e173f4399d825dbf0f37e183c26d2d1"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicClimatePanelModule.strip (cyclomatic 16): ClassicClimatePanelModule.strip 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ee3b97d48ff8d4678a846e99abf5e854187307dce96a7235ccb705fdcd6416"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicControlCenterPanel.emptyStateView (cyclomatic 16): ClassicControlCenterPanel.emptyStateView 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa7f2ae1591d0d264307ac4c83d6a84bd2177bde77088daea9ad2c21372c55c"}},{"ruleId":"D1","level":"warning","message":{"text":"ClassicControlCenterPanel.tileDragGesture (cyclomatic 16): ClassicControlCenterPanel.tileDragGesture 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdfc277ed37ab33b91ad04d6add5d9a2e8764235c8966b9339cee40f8e4860b3"}},{"ruleId":"D1","level":"warning","message":{"text":"AssistantProviderPreset.infer (cyclomatic 16): AssistantProviderPreset.infer 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":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"77c4f86b98226a02e6b1347e3c89bd1085920e5b85656caec7d568e2a087a553"}},{"ruleId":"D1","level":"warning","message":{"text":"IntentCatalog.text (cyclomatic 16): IntentCatalog.text 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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"59586b0ef7c38f1b3fa928065dd5610069f22546254bd358e654daa4c80d7b95"}},{"ruleId":"D1","level":"warning","message":{"text":"ControlFailure.classify (cyclomatic 16): ControlFailure.classify has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ControlFailure.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"925e0c3eefe2dc3b6d4ac09651d149269111613d849dd7c855c70cb36fd60343"}},{"ruleId":"D1","level":"warning","message":{"text":"FragmentedMP4Demuxer.append (cyclomatic 16): FragmentedMP4Demuxer.append 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"b090c4ffa812dbec576448655b24dbf0a5acbd99c636941a63904c124a54a75b"}},{"ruleId":"D1","level":"warning","message":{"text":"HAWebSocketProvider.connectAndListen (cyclomatic 16): HAWebSocketProvider.connectAndListen 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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d48f3b8949c7782eb54e8b09b90b4c58edac28aa98c84eab619f1dd3242400"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.setCoverMotor (cyclomatic 16): HomeStore.setCoverMotor 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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb910aa151f7e16f693d18c3f0947fa5b2970f7e909345e9bb1eedbd71fe8abb"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeStore.resolveCameraStream (cyclomatic 16): HomeStore.resolveCameraStream has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1489}}}],"partialFingerprints":{"codehealthFindingId/v1":"8194f535a6569caf46c14d0a432fe42d9b2c80ebc208a0dce75f17e9a202c41f"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelActionPolicy.hazard (cyclomatic 16): ModelActionPolicy.hazard has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelActionPolicy.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e5113d606ba00d19b37a175372035515e27f582a9d3479705c255c0a3c799c"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelIntentResolver.extractBalancedJSONObject (cyclomatic 16): ModelIntentResolver.extractBalancedJSONObject has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: ModelIntentResolver.systemOneOperation (cyclomatic 27) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1339a5b897d53fdd88e74f6bf296c27240764ed6eb3330b568bdda84fbae8a"}},{"ruleId":"D1","level":"warning","message":{"text":"SafetyMonitor.evaluate (cyclomatic 16): SafetyMonitor.evaluate 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":"Sources/MijiaCore/SafetyMonitor.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1229a3e73c2c0b69b3263efbfa15c461653d9392da7ccfe34f428df236b6fff"}},{"ruleId":"D1","level":"warning","message":{"text":"DiagnosticsReportBuilder.markdown (cyclomatic 16): DiagnosticsReportBuilder.markdown 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":"Sources/MijiaCore/UnsupportedDeviceCollector.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f47de1c1c5d348215d3a0d7aeb9d46b2593dfc30a214ad915011383a002b62"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.facetProps (cyclomatic 16): MiotSynthesizer.facetProps has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3946c5779c2159bcf78b1ef7d430023887e62860291ee1062e0fe54d93e5f29"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.primary (cyclomatic 16): MiotSynthesizer.primary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa6be4bc93b5b11f5fae1307138c5e3ff58ae09ef3bc875aa30e8e7dd84f2090"}},{"ruleId":"D1","level":"warning","message":{"text":"MiotSynthesizer.vacuumStatus (cyclomatic 16): MiotSynthesizer.vacuumStatus has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: MiotSynthesizer.genericSymbolName (cyclomatic 21) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1503}}}],"partialFingerprints":{"codehealthFindingId/v1":"2916ce3af3fb2b03d03f08019f8372627a58ee082f9efbcfd4d47bea1ce4f831"}},{"ruleId":"D1","level":"warning","message":{"text":"facets.propertyFacet (cyclomatic 16): facets.propertyFacet 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":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2b2ae3b2ef862adc3e022b42a4ae35f1cb2d5c3d3cbf7f50a535b5c9a068f5"}},{"ruleId":"D1","level":"warning","message":{"text":"chineseIntentTables.spokenChineseNumber (cyclomatic 16): chineseIntentTables.spokenChineseNumber 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":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"d927beb2d4b89937bbe8770a74b98938cd5136ef7a7b881babc62dae1a43046f"}},{"ruleId":"D1","level":"warning","message":{"text":"provider.inferAssistantPreset (cyclomatic 16): provider.inferAssistantPreset 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":"windows/src/core/assistant/provider.ts"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf35e5886712a8b0900187da43a6bb2cfff01824dc3dd3b82b9ea0790d4f342"}},{"ruleId":"D1","level":"warning","message":{"text":"modelIntentResolver.extractBalancedJSONObject (cyclomatic 16): modelIntentResolver.extractBalancedJSONObject has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: ModelIntentResolver.decodeSystemOneOp (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4adff1e41b34780041ce8e4c09ca47fb8833294167d075946d015414b5eefa"}},{"ruleId":"D1","level":"warning","message":{"text":"raycastSnapshot.buildDeviceCapabilities (cyclomatic 16): raycastSnapshot.buildDeviceCapabilities has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: raycastSnapshot.categoryTitleForDevice (cyclomatic 17) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ed94c4bd4f3cd862f9cff57a08f96eddc9e5bc355cd3791e2f4adba913c266"}},{"ruleId":"D1","level":"warning","message":{"text":"AutomationEngine.evaluateSensorThresholdRules (cyclomatic 16): AutomationEngine.evaluateSensorThresholdRules 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":"windows/src/core/automationEngine.ts"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a59ce439929719b8c562c2069dece85adcab3f88da75da5440dd9bf22dc1ee9"}},{"ruleId":"D1","level":"warning","message":{"text":"updateChecker.parseInstallerAssetRecord (cyclomatic 16): updateChecker.parseInstallerAssetRecord 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":"windows/src/core/updateChecker.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5214d2f136db894b7ca49fa96117ebbadd5d4d12f21fc780bf1e640838fa523"}},{"ruleId":"D1","level":"warning","message":{"text":"updateChecker.parseUpdateState (cyclomatic 16): updateChecker.parseUpdateState 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":"windows/src/core/updateChecker.ts"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a8e52a6bff9afee6c66af1e123fdd7bbac1ee58f85e2eb8fd066150305b96fe"}},{"ruleId":"D1","level":"warning","message":{"text":"connectionsAndDiagView.buildDesensitizedDiagnosticsMarkdown (cyclomatic 16): connectionsAndDiagView.buildDesensitizedDiagnosticsMarkdown has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5cb67e3ade35ff4410e980259e797ccd0a626db32730b4138f01cfcfaf09e4c"}},{"ruleId":"D1","level":"warning","message":{"text":"onboardingGuide.switchConnectionModeInOnboarding (cyclomatic 16): onboardingGuide.switchConnectionModeInOnboarding 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":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"5419b5aebfa8553d1e3894a159e1f70c8f6733a03f453d71ec45215e01b81984"}},{"ruleId":"D1","level":"warning","message":{"text":"panelKeyboard.submitPanelInput (cyclomatic 16): panelKeyboard.submitPanelInput has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9b03a4a385c7d2ecf3d19c715ea4bd08c17143cc12f40801b1bedf03e03ba4"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.partitionUndoStepsByHighRiskConfirmation (cyclomatic 16): activityStackView.partitionUndoStepsByHighRiskConfirmation 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb4d15f723ee0d7d8404d4fc7ce5dcbf655e1914545f291c483b541bdfc8787"}},{"ruleId":"D1","level":"warning","message":{"text":"activityStackView.renderSingleActivityRow (cyclomatic 16): activityStackView.renderSingleActivityRow 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"17da0937efaf387dda773c611e9d261dbf6ced135052492593c6fbf9711fb645"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceSynthesizer.buildSmartDevice (cognitive 237): DeviceSynthesizer.buildSmartDevice has cognitive complexity 237 (threshold 15). Drivers by points: boolean chains 87, if/else 60 (83 pts), ternaries 18 (42 pts), loops 9 (21 pts), match/switch 2 (4 pts) (nesting depth added 61). Of this number, 233 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed74b44c259cc74e0b88fae4c7376045e5e879f0d9ecbe630f33c644fafbe4c2"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderPrimaryDrawer (cognitive 228): deviceViews.renderPrimaryDrawer has cognitive complexity 228 (threshold 15). Drivers by points: ternaries 63 (165 pts), if/else 27 (39 pts), boolean chains 24 (nesting depth added 114). Of this number, 192 points are the body\u0027s own statements and 36 belong to 11 function literals inside it that branch. 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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"084eec8da2e11afbb22a6e423e95d533399edb252f286ba7f2f08b42f51a7fa0"}},{"ruleId":"D2","level":"warning","message":{"text":"commandEffects.applyCommandToDevices (cognitive 202): commandEffects.applyCommandToDevices has cognitive complexity 202 (threshold 15). Drivers by points: if/else 61 (149 pts), boolean chains 38, ternaries 2 (9 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 98). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb65144198b77108d1fa84f609f250cc978ad66e8f165afd780f07c0a9aed705"}},{"ruleId":"D2","level":"warning","message":{"text":"commandEffects.inverseCommands (cognitive 202): commandEffects.inverseCommands has cognitive complexity 202 (threshold 15). Drivers by points: if/else 40 (109 pts), ternaries 27 (71 pts), boolean chains 21, match/switch 1 (nesting depth added 113). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"d10b808bac6fba4f18fbe3bb1252a5fe0608b0ae785a539f37dcd2e1bbaa6441"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelRenderPipeline.commitRender (cognitive 200): PanelRenderPipeline.commitRender has cognitive complexity 200 (threshold 15). Drivers by points: if/else 63 (112 pts), boolean chains 57, ternaries 13 (23 pts), loops 3 (8 pts) (nesting depth added 64). Of this number, 156 points are the body\u0027s own statements and 44 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"792e17922fdd1580ff1d44d84d101324127e9b92191aa1c9463529ce28bc2877"}},{"ruleId":"D2","level":"warning","message":{"text":"AutomationEngine.dispatchEvent (cognitive 198): AutomationEngine.dispatchEvent has cognitive complexity 198 (threshold 15). Drivers by points: if/else 52 (130 pts), ternaries 10 (26 pts), loops 9 (22 pts), boolean chains 19, match/switch 1 (nesting depth added 107). Of this number, 191 points are the body\u0027s own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"938c533eef784b380a86080a92a6fb6f341ec52e9a9358cda8288e8dc008960b"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.resolveCloudCameraStream (cognitive 192): CameraLiveController.resolveCloudCameraStream has cognitive complexity 192 (threshold 15). Drivers by points: if/else 50 (125 pts), ternaries 10 (46 pts), boolean chains 15, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 114). Of this number, 186 points are the body\u0027s own statements and 6 belong to 4 function items inside it that branch. 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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed9c2be63cd0bd818545e167645a316067a9dd4eea828d0e3238c79fb401f5cb"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartDevice.statusSubtitle (cognitive 171): SmartDevice.statusSubtitle has cognitive complexity 171 (threshold 15). Drivers by points: if/else 66 (128 pts), ternaries 9 (21 pts), boolean chains 16, match/switch 3 (6 pts) (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c41ba1d00d0966f8b00e28a8acc4c6118a0931f764e9925d64371f0802f6b47"}},{"ruleId":"D2","level":"warning","message":{"text":"models.deviceStatusSummary (cognitive 169): models.deviceStatusSummary has cognitive complexity 169 (threshold 15). Drivers by points: if/else 50 (97 pts), ternaries 24 (62 pts), boolean chains 9, match/switch 1 (nesting depth added 85). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"2947e1966d521e8393aa8d5bcd62c3f73b204ef8e89a1c608a7571e32eadd073"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.onOpenURL (cognitive 146): appUrlCommand.onOpenURL has cognitive complexity 146 (threshold 15). Drivers by points: if/else 36 (72 pts), ternaries 21 (54 pts), boolean chains 19, match/switch 1 (nesting depth added 69). Of this number, 145 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"255e9d6081314a2861574105e504e0a2320d0203292c9b2b2b1bdc4eee86af61"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.handleProviderEvent (cognitive 143): HomeStore.handleProviderEvent has cognitive complexity 143 (threshold 15). Drivers by points: if/else 44 (101 pts), boolean chains 20, loops 5 (16 pts), ternaries 2 (5 pts), match/switch 1 (nesting depth added 71). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"34955846abfc21c9be25125489a030cfcb1d5870f06278d708fd7448d3752df3"}},{"ruleId":"D2","level":"warning","message":{"text":"homeAssistant.buildKind (cognitive 137): homeAssistant.buildKind has cognitive complexity 137 (threshold 15). Drivers by points: if/else 36 (56 pts), boolean chains 42, ternaries 15 (35 pts), loops 2 (4 pts) (nesting depth added 42). Of this number, 103 points are the body\u0027s own statements and 34 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59d6f2e483da348cb9498e58780c507279015b7511a682619b1eca18b4b1271"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderDeviceTile (cognitive 137): deviceViews.renderDeviceTile has cognitive complexity 137 (threshold 15). Drivers by points: ternaries 70 (110 pts), boolean chains 22, if/else 5 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"407b76232c9cf381806ba371915dacb6b84dbc3f4ae38c0ce89bcd283dc39d4e"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceDeduplicator.capabilityScore (cognitive 136): DeviceDeduplicator.capabilityScore has cognitive complexity 136 (threshold 15). Drivers by points: if/else 63 (126 pts), boolean chains 7, ternaries 1 (2 pts), match/switch 1 (nesting depth added 64). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4adeacc8e701e62816406d0a73d0475ee7d910dc6aff0d32286d9b00d0466f6"}},{"ruleId":"D2","level":"warning","message":{"text":"MiIOCryptoAndPacket.swift.cleanMalformedFirmwareJSON (cognitive 136): MiIOCryptoAndPacket.swift.cleanMalformedFirmwareJSON has cognitive complexity 136 (threshold 15). Drivers by points: if/else 28 (77 pts), loops 11 (27 pts), boolean chains 23, match/switch 4 (9 pts) (nesting depth added 70). Of this number, 129 points are the body\u0027s own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"f21fbf57d2b6534755c5f970fc91b054a8a148a0e52c82bcc230fe3334db6d9e"}},{"ruleId":"D2","level":"warning","message":{"text":"panelKeyboard.handlePanelKey (cognitive 132): panelKeyboard.handlePanelKey has cognitive complexity 132 (threshold 15). Drivers by points: if/else 49 (78 pts), boolean chains 34, ternaries 6 (20 pts) (nesting depth added 43). Of this number, 131 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"da264c068083c12af3b8f7f0e06fbd571fdbb1909eaaba078a503ba3ebbe3277"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.togglePrimary (cognitive 131): HomeStore.togglePrimary has cognitive complexity 131 (threshold 15). Drivers by points: if/else 46 (90 pts), ternaries 11 (26 pts), boolean chains 7, match/switch 3 (5 pts), error handling 2 (3 pts) (nesting depth added 62). 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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6790e686f0014333800cba407dd51392d0c5157d012e0cb9cb438755a7d78e06"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsEvents.bindSettingsEvents (cognitive 130): settingsEvents.bindSettingsEvents has cognitive complexity 130 (threshold 15). Drivers by points: if/else 79 (106 pts), boolean chains 17, ternaries 5, error handling 1, loops 1 (nesting depth added 27). Most of this is not in the body itself: 12 of the 130 points are its own statements and the rest belongs to 27 function items inside it that branch (a function literal at line 1229, a function literal at line 1109, a function literal at line 1030, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf8562c293a3c9c7c4f164f9c21ae4a7ba1cfdbfd876680c74ae9cf23fca7610"}},{"ruleId":"D2","level":"warning","message":{"text":"miAccountsStore.mergeMiAccountSnapshots (cognitive 117): miAccountsStore.mergeMiAccountSnapshots has cognitive complexity 117 (threshold 15). Drivers by points: if/else 24 (79 pts), loops 11 (21 pts), boolean chains 9, ternaries 3 (8 pts) (nesting depth added 70). 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":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"e81ecd5ef2202397a57adb829962788ea703fd5481b675b3f65be1ab04d18d65"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceDeduplicator.merge (cognitive 112): DeviceDeduplicator.merge has cognitive complexity 112 (threshold 15). Drivers by points: if/else 32 (56 pts), boolean chains 25, loops 16 (19 pts), ternaries 5 (7 pts), match/switch 2 (5 pts) (nesting depth added 32). Of this number, 110 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d1e31e56adcb20b63d08674e23ca51d009c0a8330854f535d8ca18dbaaaaa5f"}},{"ruleId":"D2","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseFragment (cognitive 112): FragmentedMP4Demuxer.parseFragment has cognitive complexity 112 (threshold 15). Drivers by points: if/else 22 (78 pts), ternaries 6 (20 pts), loops 4 (8 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 76). Of this number, 108 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"1edf1c39fea834636a8d48fa3e5c32a9fa4f5a25047aa9eba11ad29bad9926d3"}},{"ruleId":"D2","level":"warning","message":{"text":"panelView.renderNotificationStack (cognitive 109): panelView.renderNotificationStack has cognitive complexity 109 (threshold 15). Drivers by points: ternaries 21 (85 pts), if/else 12 (19 pts), boolean chains 5 (nesting depth added 71). Of this number, 106 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. 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":"windows/src/ui/panelView.ts"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"40256bfcf6be1ab1e4b84f234528d9eaa3cd778e6af6801a64302afcff9cc2de"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.parseDeviceCommand (cognitive 107): LocalIntentParser.parseDeviceCommand has cognitive complexity 107 (threshold 15). Drivers by points: if/else 26 (62 pts), loops 15 (18 pts), boolean chains 16, ternaries 3 (8 pts), match/switch 1 (3 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f9a66e033923abfd5e46765a2ad2cf77437268caae8df61a91b8c679bc208e6"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartDevice.mergingOptimisticFields (cognitive 103): SmartDevice.mergingOptimisticFields has cognitive complexity 103 (threshold 15). Drivers by points: if/else 50 (99 pts), boolean chains 3, match/switch 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/OptimisticField.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"313cb5732331a7729c0dddfc5bd01d8c85e6618addf40db5f11c920cd1a68135"}},{"ruleId":"D2","level":"warning","message":{"text":"intent.parseChineseDeviceCommand (cognitive 103): intent.parseChineseDeviceCommand has cognitive complexity 103 (threshold 15). Drivers by points: if/else 29 (63 pts), loops 16 (20 pts), boolean chains 12, ternaries 3 (8 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"810a64eb02be918b02b4dd2675af883b4cca8992e9ea3f319d63ba4bbb8d1470"}},{"ruleId":"D2","level":"warning","message":{"text":"layoutGestures.bindLayoutGestures (cognitive 101): layoutGestures.bindLayoutGestures has cognitive complexity 101 (threshold 15). Drivers by points: if/else 46 (74 pts), boolean chains 21, ternaries 4 (6 pts) (nesting depth added 30). None of this is in the body itself: all 101 points belong to 7 function items inside it that branch (a function literal at line 174, a function literal at line 271, a function literal at line 337, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"369249c25b83c53651764416e6e604fc4552914c4f873a5b96c3cd1aa8381ef4"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.parseEnglishCommand (cognitive 100): LocalIntentParser.parseEnglishCommand has cognitive complexity 100 (threshold 15). Drivers by points: if/else 27 (55 pts), boolean chains 19, loops 19, ternaries 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"03bcfb4542c16424d115ccb766f8b8986878fc68b7f8cecd03eebad0b78ff02a"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartDevice.sfSymbolName (cognitive 100): SmartDevice.sfSymbolName has cognitive complexity 100 (threshold 15). Drivers by points: if/else 21 (43 pts), ternaries 14 (34 pts), boolean chains 22, match/switch 1 (nesting depth added 42). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"255811f183a14ee1748acb25e24c283cb5840a994d6ccb5a678be4dc221f7801"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotCommandMapper.map (cognitive 98): MiotCommandMapper.map has cognitive complexity 98 (threshold 15). Drivers by points: if/else 30 (58 pts), ternaries 7 (18 pts), boolean chains 15, match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd53afe97f2f88a6c0943efaed8eb08cb02c6c385d81435c26e6fdcea092928a"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.topSuggestions (cognitive 95): UserHabitMemory.topSuggestions has cognitive complexity 95 (threshold 15). Drivers by points: if/else 35 (61 pts), boolean chains 15, loops 8 (10 pts), ternaries 7 (9 pts) (nesting depth added 30). Of this number, 74 points are the body\u0027s own statements and 21 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa9880d5c18bea27602bf5d466386f8227b3225e07f2375d865dea6db1a401c"}},{"ruleId":"D2","level":"warning","message":{"text":"automationSettingsView.renderAutomationAndSafetySettingsSections (cognitive 95): automationSettingsView.renderAutomationAndSafetySettingsSections has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 59 (91 pts), boolean chains 3, if/else 1 (nesting depth added 32). Of this number, 70 points are the body\u0027s own statements and 25 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"e352411d08daf32355b8701cb4c81c0ed5ad8572c4cd061501c6395c6372ca58"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.refreshDevices (cognitive 95): cloudRefresh.refreshDevices has cognitive complexity 95 (threshold 15). Drivers by points: if/else 37 (55 pts), boolean chains 21, ternaries 6 (17 pts), error handling 2 (nesting depth added 29). Of this number, 92 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"48140cb3c08679605a8d8a0fa26fa3e7b3a155791661b99e35afe9ce035b41cf"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.deviceSvgIcon (cognitive 95): deviceViews.deviceSvgIcon has cognitive complexity 95 (threshold 15). Drivers by points: if/else 28 (57 pts), boolean chains 24, ternaries 6 (13 pts), match/switch 1 (nesting depth added 36). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44d346fa7f5f6dd3a6df09916e5b8a3985fd927005765087a20bbe0f56fc982"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceSynthesizer.synthesize (cognitive 94): DeviceSynthesizer.synthesize has cognitive complexity 94 (threshold 15). Drivers by points: if/else 24 (58 pts), boolean chains 26, loops 7 (10 pts) (nesting depth added 37). 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"26abc1c619f8311ce24314e8ac23b0f3beb09f7d28ecf52a5d18368d4bffa4b0"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.executeDirectAskPreset (cognitive 94): appUrlCommand.executeDirectAskPreset has cognitive complexity 94 (threshold 15). Drivers by points: if/else 46 (69 pts), ternaries 20 (39 pts), boolean chains 17 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (appUrlCommand.executeDirectAskPreset::runDirectCover) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"502ffc97ad5b595841bba61dcba5893f79919b9d4f2c85329fe32ef45529280e"}},{"ruleId":"D2","level":"warning","message":{"text":"verify-flyout-layout.evaluateSnapshot (cognitive 93): verify-flyout-layout.evaluateSnapshot has cognitive complexity 93 (threshold 15). Drivers by points: if/else 34 (58 pts), ternaries 7 (14 pts), boolean chains 13, loops 4 (8 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ef19dde274b8f187a8840f53622d83de85b917c776ed2f709aad4b9ffa015de"}},{"ruleId":"D2","level":"warning","message":{"text":"dualSourceProvider.extractHADeviceIdentities (cognitive 93): dualSourceProvider.extractHADeviceIdentities has cognitive complexity 93 (threshold 15). Drivers by points: if/else 15 (49 pts), ternaries 7 (22 pts), loops 6 (15 pts), boolean chains 7 (nesting depth added 58). 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":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94fdab5e2dba9ec7d994e35145403395c5105da1372f9a390d3efae79e7b446"}},{"ruleId":"D2","level":"warning","message":{"text":"OptimisticField.changedFields (cognitive 92): OptimisticField.changedFields has cognitive complexity 92 (threshold 15). Drivers by points: if/else 44 (87 pts), boolean chains 4, match/switch 1 (nesting depth added 43). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/OptimisticField.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"721a3d89c52030f3496e8112338b748e87a7a2b14bb0d0139c8e2b8ad3249cff"}},{"ruleId":"D2","level":"warning","message":{"text":"promptContext.catalogStateSummary (cognitive 91): promptContext.catalogStateSummary has cognitive complexity 91 (threshold 15). Drivers by points: ternaries 21 (45 pts), if/else 18 (38 pts), boolean chains 7, match/switch 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c605aed81bf2caba57ec13eb99a60592413f3af0928e697f572470c0cd38dd"}},{"ruleId":"D2","level":"warning","message":{"text":"optimisticLock.syncDirectCommandToFacets (cognitive 91): optimisticLock.syncDirectCommandToFacets has cognitive complexity 91 (threshold 15). Drivers by points: if/else 21 (61 pts), ternaries 4 (17 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"709f9abd5ac481b51f690f4d7d83c90aa09838c4a7e1240a71b057c43b31bad2"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.resolveCameraStream (cognitive 88): MiCloudProvider.resolveCameraStream has cognitive complexity 88 (threshold 15). Drivers by points: if/else 27 (68 pts), boolean chains 14, error handling 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 45). 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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfd47a903bdadb5a77a90066a94876b122d3f1b6eab9953e8909d773cb725dd"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.loadSettings (cognitive 83): settings.loadSettings has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 31 (65 pts), boolean chains 14, if/else 2 (3 pts), error handling 1 (nesting depth added 35). Of this number, 81 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f52803dd4689b987d59ba148841683dfa9dd6e1dfa582e9da49c9b6e88ae007"}},{"ruleId":"D2","level":"warning","message":{"text":"reconciler.reconcileElementTree (cognitive 82): reconciler.reconcileElementTree has cognitive complexity 82 (threshold 15). Drivers by points: if/else 31 (68 pts), boolean chains 7, loops 5, ternaries 1 (2 pts) (nesting depth added 38). Of this number, 68 points are the body\u0027s own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecfd8eabbf55cbf496cd8a05f77a475c56ad135a1453b393a42878ac6c299fea"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuMijiaWindowsApp.performUndo (cognitive 82): MenuMijiaWindowsApp.performUndo has cognitive complexity 82 (threshold 15). Drivers by points: if/else 31 (58 pts), boolean chains 13, ternaries 4 (8 pts), loops 2 (3 pts) (nesting depth added 32). Of this number, 78 points are the body\u0027s own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"992777ddcac9edd2f4d483ad955387c415c2341d33a17d6e3ba3ce18d641339e"}},{"ruleId":"D2","level":"warning","message":{"text":"homeAssistant.haServiceCall (cognitive 81): homeAssistant.haServiceCall has cognitive complexity 81 (threshold 15). Drivers by points: if/else 26 (57 pts), ternaries 8 (15 pts), boolean chains 8, match/switch 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"395a598d4d303dc184e5129447c3e5b1cf449b235e10b2cf2b281e5a41b215d9"}},{"ruleId":"D2","level":"warning","message":{"text":"intentExecution.executeIntents (cognitive 81): intentExecution.executeIntents has cognitive complexity 81 (threshold 15). Drivers by points: if/else 55 (131 pts), ternaries 7 (22 pts), boolean chains 18, loops 7 (12 pts), error handling 2 (7 pts) (nesting depth added 101). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (intentExecution.executeIntents::runTargetBatch) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"d26aecdac0905e8c29328dc84835101ee5c7bf1fd4263bc235adfb44c98a93b1"}},{"ruleId":"D2","level":"warning","message":{"text":"cameraHubs.resolveLiveCameraTarget (cognitive 80): cameraHubs.resolveLiveCameraTarget has cognitive complexity 80 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 18, loops 3 (11 pts), ternaries 7 (8 pts) (nesting depth added 33). Of this number, 75 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"04981141286a3f0046f6c6b25a487c561ea2ea42193ca123fe6fae1faeebcb42"}},{"ruleId":"D2","level":"warning","message":{"text":"energyHistory.sanitizeStored (cognitive 80): energyHistory.sanitizeStored has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 8 (17 pts), boolean chains 16, ternaries 1 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f08d30567679518f0d24aa631b2bd6e3dce2d2f6f3f521ab108ea17870360b"}},{"ruleId":"D2","level":"warning","message":{"text":"facets.facetControls (cognitive 78): facets.facetControls has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 12 (46 pts), if/else 9 (20 pts), boolean chains 11, loops 1 (nesting depth added 45). 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":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eab3cc37920233918d19ecec38c282120acc05f6bb004636de2ca4d1362a82a"}},{"ruleId":"D2","level":"warning","message":{"text":"commandDispatch.applyCommand (cognitive 78): commandDispatch.applyCommand has cognitive complexity 78 (threshold 15). Drivers by points: if/else 23 (35 pts), ternaries 12 (22 pts), boolean chains 18, loops 2, error handling 1 (nesting depth added 22). Of this number, 76 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c5222390d003ba00ffc8c2bd4a0fdfcd14d12b58d0e7135b99b049cecd308e"}},{"ruleId":"D2","level":"warning","message":{"text":"demo.demoSensorHistorySamples (cognitive 78): demo.demoSensorHistorySamples has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 28 (68 pts), boolean chains 5, loops 2 (3 pts), if/else 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e25b440d341ade03c2b1ab126d54a153d9e0f2ed08d8c52d7358ed3953cbc5"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::camera::drain_complete_jpeg_frames (cognitive 76): menubarmijia_windows::camera::drain_complete_jpeg_frames has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (60 pts), match/switch 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d8ad93010f2f1da4a76a9a1f73546597024c1cc18197b73765012f6570b247"}},{"ruleId":"D2","level":"warning","message":{"text":"HAHomeSnapshot.receive (cognitive 76): HAHomeSnapshot.receive has cognitive complexity 76 (threshold 15). Drivers by points: if/else 24 (47 pts), ternaries 4 (15 pts), boolean chains 11, loops 1 (3 pts) (nesting depth added 36). 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":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb4f2f25bfdb74d9d99e8fdf85551eccbe21cd9a4a3346579e22f508ff3ce21"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.topSuggestions (cognitive 75): UserHabitMemory.topSuggestions has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 21, loops 8 (10 pts), ternaries 3 (6 pts) (nesting depth added 19). Of this number, 74 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"8834979a55976c721225c4fa7178bc1f580bd3c852e6f78cf13968e798c0249b"}},{"ruleId":"D2","level":"warning","message":{"text":"connectionsAndDiagView.renderConnectionsAndDiagSection (cognitive 75): connectionsAndDiagView.renderConnectionsAndDiagSection has cognitive complexity 75 (threshold 15). Drivers by points: ternaries 40 (57 pts), boolean chains 15, if/else 2 (3 pts) (nesting depth added 18). Of this number, 51 points are the body\u0027s own statements and 24 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"b34e0a67cf903a8f3d4d2e749d13b5d1b1fa5396aedc380ab94cec75b4ace574"}},{"ruleId":"D2","level":"warning","message":{"text":"naturalCommand.handleNaturalCommand (cognitive 75): naturalCommand.handleNaturalCommand has cognitive complexity 75 (threshold 15). Drivers by points: if/else 30 (49 pts), boolean chains 16, ternaries 5 (9 pts), error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"0719e21cead6b7c54403550769023412eb28795a9dd03f8ccd9da03852874fcf"}},{"ruleId":"D2","level":"warning","message":{"text":"cameraLiveModalView.renderCameraLiveModalView (cognitive 74): cameraLiveModalView.renderCameraLiveModalView has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 29 (47 pts), if/else 16, boolean chains 11 (nesting depth added 18). Of this number, 62 points are the body\u0027s own statements and 12 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea24bed7ef610f54212151a8540c977e9a4241c4b06fb2f7e1edabe07b7ffe9"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.buildUpperCardFactories (cognitive 74): activityStackView.buildUpperCardFactories has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 17 (28 pts), if/else 18 (25 pts), boolean chains 20, loops 1 (nesting depth added 18). Of this number, 52 points are the body\u0027s own statements and 22 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1408}}}],"partialFingerprints":{"codehealthFindingId/v1":"887f78a78e685728c21f2d04b208648b9ca8d2627d23e1c7d6011a8e2654399d"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.cloudPanelStructureFingerprint (cognitive 72): cloudRefresh.cloudPanelStructureFingerprint has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 15 (70 pts), boolean chains 2 (nesting depth added 55). Most of this is not in the body itself: 3 of the 72 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 498, 553). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f48395da6f6a9db71ef4198bf15307d93a94734a820fb6c987e6a8b5f8eccb"}},{"ruleId":"D2","level":"warning","message":{"text":"MacContextAutomation.events (cognitive 71): MacContextAutomation.events has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 28, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MacContextAutomation.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7445f8ed4b83b877349bc51dc22798e086de4d0209b86d70c04f47b748a85d"}},{"ruleId":"D2","level":"warning","message":{"text":"automationEngine.executeAutomationRule (cognitive 71): automationEngine.executeAutomationRule has cognitive complexity 71 (threshold 15). Drivers by points: if/else 27 (56 pts), loops 4 (10 pts), boolean chains 4, ternaries 1 (nesting depth added 35). Of this number, 70 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"e51a227d35ff64f0d3bc4cfd7fcfef83b8cbf18bb4d145f035fd95f6dea2bc7c"}},{"ruleId":"D2","level":"warning","message":{"text":"UnsupportedDeviceScanner.scan (cognitive 70): UnsupportedDeviceScanner.scan has cognitive complexity 70 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 5 (14 pts), ternaries 5 (10 pts), boolean chains 8, error handling 2 (5 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":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c91e74a24226778f665f48aa95ea59e6c15ab98630607aa5adf17f6354e603e"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderClimateStrip (cognitive 70): deviceViews.renderClimateStrip has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 35 (60 pts), boolean chains 10 (nesting depth added 25). Of this number, 59 points are the body\u0027s own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd0d9b78a88fd18597cc4f72c0ca570e1b265cda5742c9a6239fa834198c278"}},{"ruleId":"D2","level":"warning","message":{"text":"reconciler.extractControlIdentityKey (cognitive 68): reconciler.extractControlIdentityKey has cognitive complexity 68 (threshold 15). Drivers by points: if/else 52 (59 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"17f7e0246f4c690e49d9eb965119d654a7206a5cafba8bff5e74ef85ae1bd67c"}},{"ruleId":"D2","level":"warning","message":{"text":"reconciler.syncElementAttributesAndProps (cognitive 68): reconciler.syncElementAttributesAndProps has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 20, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5e7c68ea88f458332cb0cba94d2a88be5129188e8791c0a2d7cb3cc196a5d2a"}},{"ruleId":"D2","level":"warning","message":{"text":"AppURLParser.parseEnvelope (cognitive 67): AppURLParser.parseEnvelope has cognitive complexity 67 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 23, ternaries 1 (2 pts), loops 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AppURLCommand.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"55679f78737d654ba038e2d6053a8a2143366fdd53f4c1e52ed72406d77fbe13"}},{"ruleId":"D2","level":"warning","message":{"text":"DemoHomeProvider.applying (cognitive 67): DemoHomeProvider.applying has cognitive complexity 67 (threshold 15). Drivers by points: match/switch 9 (27 pts), if/else 14 (24 pts), ternaries 2 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfcb6a1162081363d834e0321fbd359ddbd84e0ac65b8b75102a3853e9a6717f"}},{"ruleId":"D2","level":"warning","message":{"text":"MjpegStreamReader::spawn (cognitive 66): MjpegStreamReader::spawn has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (56 pts), loops 2 (5 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a6e3d297af8f18f6eb541fae242df32990dab732f6b4228140bbeb940961af"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.parseHomeAssistantHistoryResponse (cognitive 66): sensorHistory.parseHomeAssistantHistoryResponse has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (34 pts), ternaries 4 (14 pts), boolean chains 13, loops 3 (5 pts) (nesting depth added 33). Of this number, 61 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51afad8c91ca97dff2006f923d91d6c0b229bc903c85ea581ead211c5fb3a20"}},{"ruleId":"D2","level":"warning","message":{"text":"Context.coerce (cognitive 65): Context.coerce has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 14, ternaries 4 (8 pts), match/switch 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ee863e2ff4df93b73d036659a0b102469e2dc471ea2ba07497c3cc92f00ba2"}},{"ruleId":"D2","level":"warning","message":{"text":"command.coercePropValue (cognitive 64): command.coercePropValue has cognitive complexity 64 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 11, ternaries 7 (10 pts) (nesting depth added 31). 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":"windows/src/core/miCloud/command.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"85268c3e165b3399112f180b2f1f68db8c51e1dff0aa65f6c9f87490c671abcb"}},{"ruleId":"D2","level":"warning","message":{"text":"controlFailure.classifyRawError (cognitive 64): controlFailure.classifyRawError has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (44 pts), boolean chains 12, ternaries 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6321c45602e51aead78d46eaef663f79518b616d1a03b581a3257b0214cea3b"}},{"ruleId":"D2","level":"warning","message":{"text":"HAWebSocketProvider.mapCommandToService (cognitive 63): HAWebSocketProvider.mapCommandToService has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 11 (29 pts), match/switch 2 (4 pts) (nesting depth added 34). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4cfb7af49e0493ec63ff933cfe9da2d9ba4577a0a89acd17405df9121a9dcb0"}},{"ruleId":"D2","level":"warning","message":{"text":"DoorbellDetector.ingestHASnapshot (cognitive 62): DoorbellDetector.ingestHASnapshot has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 9 (20 pts), boolean chains 12, loops 3 (nesting depth added 26). Of this number, 60 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a5b09563913ab637bfa043e2c41cadde0f9be89bdfe5b80d8209f13bee51d02"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.executeIntentPlan (cognitive 61): HomeStore.executeIntentPlan has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (30 pts), ternaries 8 (16 pts), boolean chains 9, loops 4, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"10b0ef243f733d1c6eddf57cf7758d085799efa8e05c7bbf3c8b62d8f0075022"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.executeQuickAction (cognitive 61): HomeStore.executeQuickAction has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 15, loops 3 (6 pts), match/switch 2 (4 pts) (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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"356f57bbd06b7f988f206c0cb346418dedcf6192734a3546e71383fe7950c32f"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentCatalog.stateSummary (cognitive 59): IntentCatalog.stateSummary has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 13 (27 pts), if/else 13 (25 pts), boolean chains 6, match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed56f8f11a5e06b7c7f7590d5ef7c22aa038c190f32b765a5d278e4cec58a8a"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.runAssistantCommand (cognitive 59): HomeStore.runAssistantCommand has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (42 pts), ternaries 5 (11 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"5af9c41a4ee6eb5af05c7d4450431e418c5a60722c832b174f13b44544dc6c0f"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.patchCloudPresentation (cognitive 59): cloudRefresh.patchCloudPresentation has cognitive complexity 59 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 11, loops 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 14). Of this number, 57 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a97e15845d299fe3b534c58d0dffdd337358ddbcc5a7dff4fa94ae4663bd9a"}},{"ruleId":"D2","level":"warning","message":{"text":"XiaomiCameraBridge.spawnCS2UDPRelay (cognitive 58): XiaomiCameraBridge.spawnCS2UDPRelay has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (47 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1335}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6bd706d0d39bd9bf59a8b1ebe8371c014da22eae948888098dd0e01bf4c1cc7"}},{"ruleId":"D2","level":"warning","message":{"text":"commandDispatch.scheduleEchoReadBack.executeSingleDeviceReadBack (cognitive 56): commandDispatch.scheduleEchoReadBack.executeSingleDeviceReadBack has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 14 (30 pts), if/else 14 (22 pts), boolean chains 4 (nesting depth added 24). Of this number, 54 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3db6f9530a51e09a76b05b1e1ef30ec586ddf360d3e154712eb7b2aa07f066"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.refreshMultiAccountXiaomiDevices (cognitive 56): cloudRefresh.refreshMultiAccountXiaomiDevices has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (31 pts), ternaries 5 (13 pts), boolean chains 11, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42e34c3a744d04f47755ed4be3a0f2a687354ef7353eb0fdd34321eff17c561"}},{"ruleId":"D2","level":"warning","message":{"text":"URLCommandHandler.execute (cognitive 55): URLCommandHandler.execute has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 6 (16 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 26). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee1f63020d21e1173bffd671a4a327675ca22b219600047cb8b9106146d2c17"}},{"ruleId":"D2","level":"warning","message":{"text":"WeeklyHealthReport.markdown (cognitive 54): WeeklyHealthReport.markdown has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 6 (19 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/WeeklyHealthReport.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c8a31c866654fefe851418c2a68ec047f80697801e25766cbe9e0656e14a729"}},{"ruleId":"D2","level":"warning","message":{"text":"quickActions.planQuickAction (cognitive 54): quickActions.planQuickAction has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (33 pts), ternaries 3 (10 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 32). Of this number, 53 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/quickActions.ts"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"520a9d517b6ecca2e7f7f7e35f85ebd5910a5d124c9cdcbc937e882ec8cf33b1"}},{"ruleId":"D2","level":"warning","message":{"text":"raycastSnapshot.normalizeLightGroupOwners (cognitive 54): raycastSnapshot.normalizeLightGroupOwners has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 6 (17 pts), boolean chains 8 (nesting depth added 29). Of this number, 41 points are the body\u0027s own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21ea73ebc4f25b72ca8d15d7f91381aeafd755f7dbe2b640d9124bb42d2d324"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarPanelController.handleMouseDown (cognitive 53): MenuBarPanelController.handleMouseDown has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 23 (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":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"63efbd437047a483e48321530c12e824019dcea1ee4ab2cf9b001263cdfedb79"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.commitManualWrite (cognitive 53): HomeStore.commitManualWrite has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 9, error handling 3 (5 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e5a47ddfc4073bbc9d67277be675bab65694164dd3976e876a9d713d9a17ba"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelSearch.action (cognitive 53): PanelSearch.action has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 15, ternaries 3 (6 pts), match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/PanelSearch.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bb80fd417e1d6ccfeaca2dbcda9d0fdc5d487c3957a4d0b83ccef4027ec7df"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.planFromSystemOne (cognitive 53): ModelIntentResolver.planFromSystemOne has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 10 (19 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 20). Of this number, 52 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0b4dcf98602d87c63aa76828565a05d39552803a8ab1c731d6b43fe27b979d"}},{"ruleId":"D2","level":"warning","message":{"text":"optimisticLock.applyHAExtendedCommandEffect (cognitive 53): optimisticLock.applyHAExtendedCommandEffect has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (33 pts), ternaries 3 (10 pts), boolean chains 9, loops 1 (nesting depth added 26). Of this number, 52 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. 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":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf27183a4689c076dafa24d30625a2adf9b0026581be221315d5f69bac63914"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.bindDetailDrawerEvents (cognitive 53): detailDrawers.bindDetailDrawerEvents has cognitive complexity 53 (threshold 15). Drivers by points: if/else 29 (30 pts), boolean chains 15, ternaries 7 (8 pts) (nesting depth added 2). None of this is in the body itself: all 53 points belong to 19 function items inside it that branch (a function literal at line 654, a function literal at line 773, a function literal at line 688, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"06061e7fb8e59eafbd48536982fb1a7f8f5a2590880e48fbfdd4c108fb8dcab6"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentValidator.normalize (cognitive 52): IntentValidator.normalize has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 11 (22 pts), boolean chains 6, match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"033b83ba238cd46e2858350ffc0bfb8a260f5c0d34cace3c0ffb153b328501f4"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.assistantEffect (cognitive 52): HomeStore.assistantEffect has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (33 pts), ternaries 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbff53c060ca20a4e0067eee6ce4bac40de017738b5b68768d3201517093dec"}},{"ruleId":"D2","level":"warning","message":{"text":"safetyAndHealth.renderWeeklyHealthMarkdown (cognitive 52): safetyAndHealth.renderWeeklyHealthMarkdown has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 7 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"8618ac0575e8191c149062f033510a630241270fc955d5308e37709b02aafece"}},{"ruleId":"D2","level":"warning","message":{"text":"MjpegStreamReader::next_frame_jpeg (cognitive 51): MjpegStreamReader::next_frame_jpeg has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (49 pts), boolean chains 1, loops 1 (nesting depth added 34). 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bdad515a1d662231927fb9a58cb7751980acd0951accd96793788c35db6241"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountLogin.parseServiceTokenCookie (cognitive 51): MiAccountLogin.parseServiceTokenCookie has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 4 (7 pts), ternaries 2 (7 pts), boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"a19d044aea4437750f963bdc2198a066544d2a1cc784ebc6b848770a58ea9642"}},{"ruleId":"D2","level":"warning","message":{"text":"HAHomeSnapshot.receive (cognitive 50): HAHomeSnapshot.receive has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 9, loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 22). 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":"Sources/MijiaCore/HAHomeSnapshot.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3925a9a71320b1f25873251cf468a882682ec3fa4bcdf4e64c1b843683abcee"}},{"ruleId":"D2","level":"warning","message":{"text":"ManualControlPolicy.facetRequiresConfirmation (cognitive 49): ManualControlPolicy.facetRequiresConfirmation has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 24, if/else 18 (24 pts), match/switch 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ManualControlPolicy.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbdccd492859a034f50497285d2473f273987241fa23ebf23e7e0ade5a2e9eb"}},{"ruleId":"D2","level":"warning","message":{"text":"SafetyMonitor.evaluate (cognitive 49): SafetyMonitor.evaluate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 9, ternaries 2 (8 pts), loops 3 (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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"5366877915ee1c0adde86f4d8aff57e776ebec8b5bcfb699ae1adf6290af4454"}},{"ruleId":"D2","level":"warning","message":{"text":"automationEngine.readSensorMetricValue (cognitive 49): automationEngine.readSensorMetricValue has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 14 (47 pts), boolean chains 1, match/switch 1 (nesting depth added 33). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"b23815662ca1ce2598bd90d9795271e3a09124fddc27a42682be49bd7bf4c036"}},{"ruleId":"D2","level":"warning","message":{"text":"intentExecution.executeSingleCommand (cognitive 49): intentExecution.executeSingleCommand has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 9, ternaries 3 (4 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"f527448bc84f51514d4528b90f1b5b33980f79147c76ba4c67c8ba491261835d"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.bindUnifiedUpperStack (cognitive 49): activityStackView.bindUnifiedUpperStack has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 5 (11 pts), boolean chains 10, error handling 2 (4 pts), loops 2 (nesting depth added 20). Most of this is not in the body itself: 8 of the 49 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1627, finishPointer, a function literal at line 1616). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1603}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1bda535dfac7938be7a33e523198ceb43d3cfc483a330361a9a8b275ad6fb0"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelKeyRouter.afterSearch (cognitive 48): PanelKeyRouter.afterSearch has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 17, ternaries 2 (4 pts), match/switch 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":"Sources/MenuBarMijiaApp/PanelKeyRouter.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"880453de6e7e9ee9cdeb0afb68547bb17ac40c6cc5df3c907ba57425f93a4f7d"}},{"ruleId":"D2","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseTrak (cognitive 48): FragmentedMP4Demuxer.parseTrak has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (25 pts), ternaries 4 (11 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d55496e9679a1726a943a4c604e3defec26a91cb891e966a32e6c311ada370"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.fetchPropsHybrid (cognitive 48): MiCloudProvider.fetchPropsHybrid has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (28 pts), error handling 4 (9 pts), loops 5 (8 pts), boolean chains 3 (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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b8c6862d20a162078c3ffad16ffcc4b368b88bb6e7d8111b15b6758237adbc0"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.record (cognitive 48): UserHabitMemory.record has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 7, loops 3 (5 pts), ternaries 3 (nesting depth added 16). Of this number, 46 points are the body\u0027s own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d5f7c779975c76e6a9f0c30419e36c3c90aba26d7c2083e8e860c2e4fc57e7"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeAssistantSynthesizer.synthesize (cognitive 48): HomeAssistantSynthesizer.synthesize has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 10, loops 5 (7 pts), ternaries 4 (nesting depth added 14). Of this number, 32 points are the body\u0027s own statements and 16 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"090282230b2dc8c877c5377a6af6f61a697a62bccda2de2f2c56c263683806ed"}},{"ruleId":"D2","level":"warning","message":{"text":"connectionsAndDiagView.performSignOutSingleMiAccountOnHost (cognitive 48): connectionsAndDiagView.performSignOutSingleMiAccountOnHost has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 12, loops 3 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 13). Of this number, 47 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4422c24cac86455b6b2fe12d830a513ec1ec616bde840df8b120ecaaa91c2dc"}},{"ruleId":"D2","level":"warning","message":{"text":"onboardingGuide.mountOnboardingGuide (cognitive 48): onboardingGuide.mountOnboardingGuide has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (23 pts), ternaries 7 (14 pts), boolean chains 11 (nesting depth added 8). Most of this is not in the body itself: 6 of the 48 points are its own statements and the rest belongs to 12 function items inside it that branch (renderSourceBody, completeAndClose, a function literal at line 663, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2f825def3a43b081e8de6c6ab628d76b07fccf5f1a6ae5248a71fd2868bd6c"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicDeviceCardView.headerRow (cognitive 47): ClassicDeviceCardView.headerRow has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 13 (22 pts), if/else 15 (20 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"1861083be84202fcdd549810acecd87ef0c92c35c720e3de2b139ef03e626ac5"}},{"ruleId":"D2","level":"warning","message":{"text":"verify-flyout-layout.main (cognitive 47): verify-flyout-layout.main has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 4 (7 pts), error handling 2 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 20). Of this number, 45 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e2f76a3de24e26c7694b221227e6be6714e75be639f783fb738d020917628b"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildSingleHAFacet (cognitive 47): haDomains.buildSingleHAFacet has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 10 (16 pts), boolean chains 8, match/switch 1 (nesting depth added 13). Of this number, 46 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c580becf8f38a32f6f7c5dcab72277b676029c07b03764e65304e65d6595d91"}},{"ruleId":"D2","level":"warning","message":{"text":"habits.shareHabitSentence (cognitive 47): habits.shareHabitSentence has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 7, loops 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ddab0f578f21b5cb1bf7618827a46d21cb5e31a00ca0d5ab447b825e0b2ef97"}},{"ruleId":"D2","level":"warning","message":{"text":"dom.morphMatchingDom (cognitive 47): dom.morphMatchingDom has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 7, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/dom.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26d1016fce60bf151f6500ce9510d81f27e288d1b8a19699abf7fe149243ead"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.refreshDualSourceDevices (cognitive 47): cloudRefresh.refreshDualSourceDevices has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 11, ternaries 3 (5 pts), loops 2 (3 pts), error handling 1 (nesting depth added 10). Of this number, 40 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b578f20f76fa898af5ff75fe6e1b73f981d07b3eb3ab25e4103763bfc5a8634"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.undoTurnAllOff (cognitive 46): HomeStore.undoTurnAllOff has cognitive complexity 46 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 14 (16 pts), ternaries 4 (8 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"8101c498bfc271d1fcfa1fd1434eb6a364355612578cbc490c860e2ec7bad6b1"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.applyUndoCommands (cognitive 46): HomeStore.applyUndoCommands has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 14, ternaries 1 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3c9c0d1b5642e99f605303b9848bc6901bf35ce9f7bfffb85063370abb011c"}},{"ruleId":"D2","level":"warning","message":{"text":"OfflineHistory.load (cognitive 46): OfflineHistory.load has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (10 pts), ternaries 1 (5 pts), boolean chains 3, error handling 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"d261d4d1248b1af257baab958d46bd66949e905fe18c911319569fceddd2e8bc"}},{"ruleId":"D2","level":"warning","message":{"text":"commandDispatch.captureReversibleFacetBeforeWrite (cognitive 46): commandDispatch.captureReversibleFacetBeforeWrite has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 11, loops 1 (nesting depth added 18). Of this number, 45 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d9159883f09ef3be51e9c40d25b93443849f97b252ebde5d4e86a35c03fc50"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.record (cognitive 45): UserHabitMemory.record has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 14, loops 3 (5 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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"6896e83f2fb369b20f0dc4962bab77ef1439b2b715fd29d11899d3dc4e3f6633"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::camera::is_likely_concealed_gray_jpeg (cognitive 45): menubarmijia_windows::camera::is_likely_concealed_gray_jpeg has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 6, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1391}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f8c1908cfbe406c9097e2ba3d985617a27e7ad340505d3dee4c449c24b495b"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parseRooms::appendHomes (cognitive 45): MiCloudClient.parseRooms::appendHomes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 6 (16 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"be4c5c5a1b56356f1b2ede922d7d8d9b7da91812e2bde26cea6d41e83832ab87"}},{"ruleId":"D2","level":"warning","message":{"text":"EnergyHistory.record (cognitive 45): EnergyHistory.record has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4c6ed141b696a4f21255988127b351bb8115f8ba068d28079ca694cc70e509"}},{"ruleId":"D2","level":"warning","message":{"text":"panelView.renderPanel (cognitive 45): panelView.renderPanel has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 40 (41 pts), boolean chains 4 (nesting depth added 1). Of this number, 39 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b84b398c75702da1af706cf19f8250c94f6f41cfbf31bdca019765b6f19994"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.init (cognitive 44): HomeStore.init has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 15, ternaries 4 (6 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6da2d56754c5ba15cc264872913896d460d89677bc7e195a7e6b9aebc4360e1"}},{"ruleId":"D2","level":"warning","message":{"text":"percentScale.rawFromPercent (cognitive 44): percentScale.rawFromPercent has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 9 (22 pts), if/else 6 (16 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 25). 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":"windows/src/core/miCloud/percentScale.ts"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"cebfb6cf7346fff3c60d60b78ff2639aeb9b4b7d0b81325739f4c4f63ac2922b"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.executeAutomationCardUndo (cognitive 44): activityStackView.executeAutomationCardUndo has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 16). Of this number, 41 points are the body\u0027s own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4aed4ef578024f017e51359079a8f02dc09fa227eba59beee3b20ac5495614e"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.buildActivityFeed (cognitive 44): activityStackView.buildActivityFeed has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 5 (10 pts), boolean chains 7, loops 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b6646561341ec9f270761a88ad4179c34b066bfd6d4ef0d41d9004a857c86d"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLivePlayback.start (cognitive 43): CameraLivePlayback.start has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePlayback.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3015534c1357b8eecf4b9a8cb0ca643dcecb5d6a3231d166fdfdddedcc677a3"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.applianceOrGenericIcon (cognitive 42): deviceViews.applianceOrGenericIcon has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22, boolean chains 20. 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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c3e672e5a271110e9270d059ef86ecde522ed89872559159b50028769e579f"}},{"ruleId":"D2","level":"warning","message":{"text":"menuViews.renderContextMenu (cognitive 42): menuViews.renderContextMenu has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 16 (24 pts), if/else 8 (12 pts), boolean chains 6 (nesting depth added 12). Of this number, 40 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ccf87f75737b62a85eb4259591f1f20d58fc91a8bf2ef952572b9fb30b9846e"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.rebuildLiveProvider (cognitive 41): HomeStore.rebuildLiveProvider has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 15 (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":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"89142dfc168e3efe2e6967e3068e745ff6af6b48bb3152be123d1a3b05b2675c"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.isActionable (cognitive 41): UserHabitMemory.isActionable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 15, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"d241f5ba02b1aaf71ebb0b263677ef23451f3679d1a038479e9da1c72b22ea62"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.synthesize (cognitive 41): MiotSynthesizer.synthesize has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 5 (13 pts), loops 4 (6 pts), boolean chains 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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d6b297b46ec6de26c65cee677e3df8e29eae3f8a592e13b9a36c75d2e4f495"}},{"ruleId":"D2","level":"warning","message":{"text":"automationEngine.parseStoredRule (cognitive 41): automationEngine.parseStoredRule has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 20 (26 pts), boolean chains 10, if/else 5 (nesting depth added 6). Of this number, 40 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd26b06a9c101e8e8131d4dc771c5f63f912755d5e718d994242efa0d5c3a4db"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsEvents.commitSettingsSave (cognitive 41): settingsEvents.commitSettingsSave has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a40b4a7ce7a4ebb2d86db68dce2c78912476928c840bbe0baaf03394e9eea4e"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.confirmUndoTargets (cognitive 40): HomeStore.confirmUndoTargets has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 16, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":889}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9a3d3a3b897cbb64ca0d967042b1ad9fad6b2d3a6ef37aee9213360b7d6fd3"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildMediaPlayerKind (cognitive 40): haDomains.buildMediaPlayerKind has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 12, if/else 4 (7 pts), loops 2 (3 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":"windows/src/core/haDomains.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f863660437c4e2c36a2e6058baeff90edd22809c2073638664cdf263188dff9"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildSyntheticPrimaryHAFacets (cognitive 40): haDomains.buildSyntheticPrimaryHAFacets has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 11, ternaries 3 (11 pts) (nesting depth added 18). 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":"windows/src/core/haDomains.ts"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"da003755da504e3fd6bef69f4583bc48f8ce9883a19ce89cb08efea0163d7ea4"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.extractMiHistoryRawNumbers (cognitive 40): sensorHistory.extractMiHistoryRawNumbers has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1002}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea49b57060cef6d334d51897b920e677393a242c5bf83d15c429c638f0d6141c"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.headerRow (cognitive 39): DeviceCardView.headerRow has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 11 (16 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"d71e8fa75a3ada552a708512786055eda22083384a620193c6d670f960f9a02d"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.pageSections (cognitive 39): ClassicControlCenterPanel.pageSections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 3 (9 pts), boolean chains 4, loops 2 (4 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc720c5cfa25a4351f7deb00b78b9b2655a787a80e3ace67ceb3e749e49c1445"}},{"ruleId":"D2","level":"warning","message":{"text":"FragmentedMP4Demuxer.parseConfigRecord (cognitive 39): FragmentedMP4Demuxer.parseConfigRecord has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (9 pts), match/switch 1 (nesting depth added 24). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"77475505ccaa365d1f54d4bbfc4e8da14847c3607c357b0428715f2f0ef2b79a"}},{"ruleId":"D2","level":"warning","message":{"text":"safetyAndHealth.evaluateSafetyFacetValue (cognitive 39): safetyAndHealth.evaluateSafetyFacetValue has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 3 (8 pts), boolean chains 7 (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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"5801df6b99deb4670035e1b78b588bccef33b0bb86fcf9a8646840d41cccb134"}},{"ruleId":"D2","level":"warning","message":{"text":"intentExecution.executeIntents::runTargetBatch (cognitive 39): intentExecution.executeIntents::runTargetBatch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (intentExecution.executeIntents) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"3efa575f20f9d64dc75a6ba31c31d00e17c89d42758e03759ca42f7e7971f1c6"}},{"ruleId":"D2","level":"warning","message":{"text":"roomOrderEditor.bindRoomOrderEditorEvents (cognitive 39): roomOrderEditor.bindRoomOrderEditorEvents has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 8, ternaries 7 (8 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 519, 472, 597, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1fc4bf5b9019e6ed02acfc871e4452e1277a2340990d304d02141f6c2c3c865"}},{"ruleId":"D2","level":"warning","message":{"text":"GrokBallRenderer.drawRibbons (cognitive 38): GrokBallRenderer.drawRibbons has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 5 (11 pts), boolean chains 3, loops 2 (3 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":"Sources/MenuBarMijiaApp/GrokBallRenderer.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c64f42fa16c8fa0b612647452d821e5903f4ccc4d4c167be489223becf21c30"}},{"ruleId":"D2","level":"warning","message":{"text":"HAFacetEngine.control (cognitive 38): HAFacetEngine.control has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 8, match/switch 3 (5 pts), ternaries 3 (4 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":"Sources/MijiaCore/HAFacets.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"36522cc26d006727c609b4590b161c3df3bd4c178fb56b342e3d927f1c6df1e4"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.extractEnglishNumericOperations (cognitive 38): LocalIntentParser.extractEnglishNumericOperations has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 2 (8 pts), loops 4 (7 pts), boolean chains 4 (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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecda9c17a102f254a676ce23132712bd2c4366880c1fa28f7c2605c67a40296a"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.planFromSystemOne (cognitive 38): ModelIntentResolver.planFromSystemOne has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, loops 4 (9 pts), 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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e327d2afb0d3c3da1ec64d86b59bc469460df8563938fee3e5cf33653570e44"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartDevice.hasDetailDrawer (cognitive 38): SmartDevice.hasDetailDrawer has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 37, match/switch 1. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1476}}}],"partialFingerprints":{"codehealthFindingId/v1":"e12ba4ae6cfdc42335a02865f4c0c750aeefdac94a12b74bd09b513c5271ed66"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.buildSensor (cognitive 38): MiotSynthesizer.buildSensor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 3 (12 pts), boolean chains 3, match/switch 1 (2 pts) (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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"edbe8b45a1156c09369bdf1d0110677403ec4844daea534f4f295b1a02e3f47f"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::camera::spawn_cs2_udp_relay (cognitive 38): menubarmijia_windows::camera::spawn_cs2_udp_relay has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (25 pts), match/switch 3 (7 pts), loops 3 (5 pts), boolean chains 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1983}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7d6c66f34b71cbc058ad46f79c5ed0a230b5d3f2ea59853bb8bc3b55e650fb"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.mergeRoomPage (cognitive 38): MiCloudClient.mergeRoomPage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 7 (13 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 16). Of this number, 28 points are the body\u0027s own statements and 10 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"006d9570e8150551ce99baeaad5138da4e82f8ae2d6c032485e03892d279b4f3"}},{"ruleId":"D2","level":"warning","message":{"text":"cameraHubs.resolveCameraHub (cognitive 38): cameraHubs.resolveCameraHub has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 10). Of this number, 37 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"376539408989ab7663d8cd28f9b9a2406ace4c11665d563ac6aa1645bd62feae"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.bindActivityStackAfterRender (cognitive 38): activityStackView.bindActivityStackAfterRender has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 7 (nesting depth added 14). Of this number, 24 points are the body\u0027s own statements and 14 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"284c30ff0a60621c2790d063ed23d8a79bb02f31707e23a0538b05a656b774a0"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarPanelController.showPanel (cognitive 37): MenuBarPanelController.showPanel has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 2 (10 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 17). 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":"Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"91fb9f08c84c3097e86c659a3b3749092cfc0a626aa4c33243e14d8f279638de"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.runLoop (cognitive 37): MiCloudProvider.runLoop has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 3 (6 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1040ade577e94c239053159683420ff13cccb666d3620e282b115f2534e978"}},{"ruleId":"D2","level":"warning","message":{"text":"HabitShare.swift.shareHabitSentence (cognitive 37): HabitShare.swift.shareHabitSentence has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 11, 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":"Sources/MijiaCore/HabitShare.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e82eb51d4a18140913888f8ea8a29baf3b416a652322f561ac8f6700e6aa0f"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.auxiliaryEntitiesForCover (cognitive 37): haDomains.auxiliaryEntitiesForCover has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, loops 5 (6 pts), ternaries 1 (nesting depth added 11). Of this number, 22 points are the body\u0027s own statements and 15 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a520f3ce27c6716919f5d247c32d4448e65dbdeb1c3266819074fb56da297f"}},{"ruleId":"D2","level":"warning","message":{"text":"habits.mentionedHabitTargets (cognitive 37): habits.mentionedHabitTargets has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 11 (14 pts), boolean chains 2 (nesting depth added 13). Of this number, 29 points are the body\u0027s own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b403e2411813563456724b9e5e5a6958b14e7b0f37e56829b9171146276752"}},{"ruleId":"D2","level":"warning","message":{"text":"optimisticLock.runTrackedDevicePresetCommands (cognitive 37): optimisticLock.runTrackedDevicePresetCommands has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (43 pts), ternaries 5 (15 pts), boolean chains 8, loops 2 (6 pts) (nesting depth added 43). 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. This shape REPEATS in the file: one other method here (optimisticLock.runTrackedDevicePresetCommands::runSubsequent) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"4265cbb6bc1fa54d3cd63538621427ac0b45e96c8b08a10076d65f660ae9b2ec"}},{"ruleId":"D2","level":"warning","message":{"text":"optimisticLock.mergeHomeSnapshotRespectingLocks (cognitive 37): optimisticLock.mergeHomeSnapshotRespectingLocks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 9, loops 3 (nesting depth added 11). Of this number, 33 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"874892de916e117de7092a481f5b0c2b8202b0d1496621386573ed6f9398840a"}},{"ruleId":"D2","level":"warning","message":{"text":"automationEngine.commandsForPowerIntent (cognitive 37): automationEngine.commandsForPowerIntent has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (28 pts), if/else 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8a647d5d2be34e38d6840d8d026062b4a041d5101ced53af7436c8e2c1795d"}},{"ruleId":"D2","level":"warning","message":{"text":"CredentialVault.deleteMiSession (cognitive 37): CredentialVault.deleteMiSession has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (12 pts), ternaries 1 (4 pts), boolean chains 2, error handling 2 (nesting depth added 17). None of this is in the body itself: all 37 points belong to one function literal inside it that branches (line 471). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"901e4df534d188f9d8a06ee281e0fe539cf89f3b5f53f35de9d7b7e91b91901b"}},{"ruleId":"D2","level":"warning","message":{"text":"automationSettingsView.renderTriggerOptionsEditor (cognitive 37): automationSettingsView.renderTriggerOptionsEditor has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 14 (29 pts), if/else 6, boolean chains 2 (nesting depth added 15). Of this number, 17 points are the body\u0027s own statements and 20 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f104c2b399d0ad98a8142da862bb8c87bcc9428db01c5776e9912ab2bc0c62d"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.renderSensorHistorySection (cognitive 37): sensorHistoryView.renderSensorHistorySection has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 27 (31 pts), boolean chains 3, if/else 2, loops 1 (nesting depth added 4). Of this number, 28 points are the body\u0027s own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"9877482e1ed975c54cbf2120efaf23d9a207e73b58966d6c78827849f2df14fe"}},{"ruleId":"D2","level":"warning","message":{"text":"panelView.renderSliderDeck (cognitive 37): panelView.renderSliderDeck has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (27 pts), boolean chains 6, if/else 4 (nesting depth added 16). Of this number, 35 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc2bfb9df175d49abac3554d82f9af6f4a5856e50b2fcbc7b294c46a5329aa0"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderCollapsedInlineSlider (cognitive 37): deviceViews.renderCollapsedInlineSlider has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 8 (12 pts), boolean chains 11 (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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d184af67c52133e6f44c595f37a48dc48c856ef2cfc0b23b6e69de73503a9f4"}},{"ruleId":"D2","level":"warning","message":{"text":"appLifecycle.hydrateCredentials (cognitive 37): appLifecycle.hydrateCredentials has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 7, ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e155d0c37ef254b2ebc9f39be678fba6dc90eeff2cdaf1bd108b8eb2890d38"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorCardView.chartPlot (cognitive 36): SensorCardView.chartPlot has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (7 pts), loops 2 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d700d511b7753818ada0bdab6e8a190b2b3e8796044c5f5f844f0cf1bb280f4"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicSensorCardView.chartPlot (cognitive 36): ClassicSensorCardView.chartPlot has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (7 pts), loops 2 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19365f4766d092ee512b39d50413996b74e3b1c3af5d74706f71f967594168d"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistory.mergeCloudSamples (cognitive 36): SensorHistory.mergeCloudSamples has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"77f03f88ccbbf45a1260ee9a45b8dd864e8108de2312fe38fb16f2edc33801d0"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parsePropValues (cognitive 36): MiCloudClient.parsePropValues has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 9, ternaries 5 (9 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b50cffa87886101d8c9902c282269281ba36a94f923f5a64478ff8d1d14562"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.mapHAFacetCommand (cognitive 36): haDomains.mapHAFacetCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 5 (7 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 12). Of this number, 26 points are the body\u0027s own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"46db1b31537e06d041e3155beafd20b4e91cca8bb8d0f1ed1c16dbeac2f9e1cb"}},{"ruleId":"D2","level":"warning","message":{"text":"dualSourceProvider.reconcilePairedHALightGroups (cognitive 36): dualSourceProvider.reconcilePairedHALightGroups has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 15). Of this number, 35 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4739b0b5d8fe5062fef7b9be98f76b711bd67f639e65816d02da9bfc4b56cbf"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderSensorCard (cognitive 36): deviceViews.renderSensorCard has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 23 (31 pts), boolean chains 3, if/else 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"b728a5d8c67e325a5fd8ba23a77f8770770a35fc9012d48ec7c0ff9b87d9a0da"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuMijiaWindowsApp.renderDeviceGrid (cognitive 36): MenuMijiaWindowsApp.renderDeviceGrid has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (21 pts), boolean chains 8, if/else 6 (7 pts) (nesting depth added 11). Of this number, 23 points are the body\u0027s own statements and 13 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38b17a1d615c698292572537ce35f3a843674833a4cce184c3c6e636b3e12b4"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLivePanelController.present (cognitive 35): CameraLivePanelController.present has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 9, ternaries 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb3c0a524e58af4ae70821dc84a37a8c34ce07521f9efd185823e5307a7a9471"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.executeRaycastPower (cognitive 35): HomeStore.executeRaycastPower has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 10 (12 pts), boolean chains 10 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"de572292c5af40df395e91820566a29248314e92973cc8b44646d7c373426e38"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplianceActivity.init (cognitive 35): ApplianceActivity.init has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 11, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08c91e57d10bd0c23569718c0e4bab68331961c2fb626366fba77bc3f894dc3"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.pollDoorbellEvents (cognitive 35): MiCloudProvider.pollDoorbellEvents has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (27 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"89497e24d08faa59ff957cad0dafb6ab801f44b5959f5ba41fb26f91213feb4d"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.execute (cognitive 35): MiCloudProvider.execute has cognitive complexity 35 (threshold 15). Drivers by points: error handling 7 (14 pts), if/else 7 (11 pts), match/switch 2 (6 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"e243bafab1cf3af62a83765a6edc753af50a77bdd4c914ab1614f621c71441ae"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::companion::handle_ipc_client (cognitive 35): menubarmijia_windows::companion::handle_ipc_client has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e568610bf13a45cfbb72bb15bb6b549e02d40d59605350b121dd418b91aa716"}},{"ruleId":"D2","level":"warning","message":{"text":"modelIntentResolver.extractBalancedJSONObject (cognitive 35): modelIntentResolver.extractBalancedJSONObject has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (29 pts), error handling 1 (3 pts), loops 2 (3 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":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"7adc4a05f43997119fb1eb7407aa18f7fcfd42a97aa42b9f8bf55fcb47440b70"}},{"ruleId":"D2","level":"warning","message":{"text":"safetyAndHealth.extractSensorObservations (cognitive 35): safetyAndHealth.extractSensorObservations has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 13). Of this number, 34 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"2740e8a86f436a077589b6cd5fa7403fd27f01db44624d97ee3c33d7662365a3"}},{"ruleId":"D2","level":"warning","message":{"text":"dualSourceProvider.readTuplePairs (cognitive 35): dualSourceProvider.readTuplePairs has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (20 pts), if/else 5 (10 pts), boolean chains 4, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"177dc9271ea5897a3f40c0d9d855766a65b8b5e32b7ad942e0495108df79bce5"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicDeviceCardView.compactHeaderRow (cognitive 34): ClassicDeviceCardView.compactHeaderRow has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 7, boolean chains 5 (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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a282e8e4684ca13c676e97caa35fcb91f7fb68018b97b9b54a13081dec9063"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraPTZDragPlanner.direction (cognitive 34): CameraPTZDragPlanner.direction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 6 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CameraPTZ.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"964a9589df03d63d9b8ac74d31702349a51aceca77379dcfbdf034303ec62cd5"}},{"ruleId":"D2","level":"warning","message":{"text":"speakerActions.findDirectiveAction (cognitive 34): speakerActions.findDirectiveAction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d878584825c82e84e94ca017d162d4c148b252a88b37cf68f087a7d3e2c8ac"}},{"ruleId":"D2","level":"warning","message":{"text":"facetViews.row (cognitive 34): facetViews.row has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 14 (23 pts), boolean chains 7, if/else 4 (nesting depth added 9). Of this number, 25 points are the body\u0027s own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c721018d41cba6b84b6b0adc2242e2c19b13bc9c87b902aad48041bc22e6e77"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplianceDetailDrawer.body (cognitive 33): ApplianceDetailDrawer.body has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 11, ternaries 2 (4 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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba15d6c0ef07f4b745da5f472379f193c85c5619d3394980259bcd4ded33a98f"}},{"ruleId":"D2","level":"warning","message":{"text":"GrokBallAnimator.sample (cognitive 33): GrokBallAnimator.sample has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, match/switch 2 (4 pts), ternaries 4, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/GrokBallView.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b8e8f74859baf004076dc6032c5a9c9e846c06af03b82b5b957fbb8bd5864b"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentDeviceCategory.init (cognitive 33): IntentDeviceCategory.init has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, if/else 7 (10 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeefcfe0aa05ec67c8437a732c785567b62c0a1878705b5c2a3e8486336a2ea8"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentCatalog.init (cognitive 33): IntentCatalog.init has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 1 (4 pts), loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3cb6d9d94c5e35c728629c514f902d1810575fc7d2ad579911d922578595c73"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceSynthesizer.auxiliaryEntities (cognitive 33): DeviceSynthesizer.auxiliaryEntities has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 12, loops 1 (nesting depth added 8). Of this number, 18 points are the body\u0027s own statements and 15 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f5218a7405bd92994f761311c5f0961ce1ad3a1dd6473950e896f2c4b53366"}},{"ruleId":"D2","level":"warning","message":{"text":"EnergyHistory.record (cognitive 33): EnergyHistory.record has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 7, 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":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"38849640750359506cac919c1098b8cae324bd572aed976df7c552973fd16166"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.parseMDNSZoneOutput (cognitive 33): HADiscovery.parseMDNSZoneOutput has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e32ba1eea2903221924264b369d49de6dd49bdfd7419a3a73e3275ea15052d0"}},{"ruleId":"D2","level":"warning","message":{"text":"HAWebSocketProvider.runReceiveLoop (cognitive 33): HAWebSocketProvider.runReceiveLoop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe6d94a93adf7b195c27341584be0101636f2b13fee775f4ecbddbeedc29919"}},{"ruleId":"D2","level":"warning","message":{"text":"OfflineHistory.record (cognitive 33): OfflineHistory.record has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1780293c752b9b1b249b5bfb2fa66642ee68d925e35d93d3f54c28c07aa0bce"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountsStore.loadUnlocked (cognitive 33): MiAccountsStore.loadUnlocked has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7, loops 3, error handling 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":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8516c741ce73ac0575730e9acc485770e36ccfec1fb1fbadfe321eb13387a3d"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelRenderPipeline.patchPopover (cognitive 33): PanelRenderPipeline.patchPopover has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 7, loops 2 (4 pts), ternaries 2 (3 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":"windows/src/ui/reconciler.ts"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"932b22fb3e72a00a754f335cafac72ec38c6262418ff09db1d74b8c34ec36cf0"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.fanDrawer (cognitive 32): DeviceCardView.fanDrawer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 11 (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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b065461ad2d765b9eee08e8c6144db4d50b6d6e3f41fd0c6d7bac5feccec875"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusItemEventDecision.decide (cognitive 32): StatusItemEventDecision.decide has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 4, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/StatusItemEventDecision.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54f4c210d83ff6a7ab06f37b32b2713b1b3d285d92071302874e1742920cc51"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicDeviceCardView.fanDrawer (cognitive 32): ClassicDeviceCardView.fanDrawer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 11 (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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87b04c32674b86bf9add1554bb6bb95cd7e83d9aba9bf52ed0efdd7e51a2d03"}},{"ruleId":"D2","level":"warning","message":{"text":"CdpSession.constructor (cognitive 32): CdpSession.constructor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (3 pts), ternaries 2 (nesting depth added 10). None of this is in the body itself: all 32 points belong to 3 function items inside it that branch (a function literal at line 238, failAll, a function literal at line 237). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"b570748e4451e2fe315b19cef75810638871d27e799ddfd6648b51701b20b537"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.resolveHACameraMotionFallback (cognitive 32): haDomains.resolveHACameraMotionFallback has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 9, ternaries 3 (5 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e046f05296da0248cc1a90c1393f890510c77075b2e0ee309a881f85349bbc0"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.extractSensorLiveMetrics (cognitive 32): sensorHistory.extractSensorLiveMetrics has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 7, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da272a8876300cf01d279d84190badbe966cb835b7dff4e356d6afe50bb0932"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.resolveMiotSensorPropertyKeys (cognitive 32): sensorHistory.resolveMiotSensorPropertyKeys has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"68132d1a07243d2d533bded454f3c07a4e2ccc398dc618e2111553a83b800bf7"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.renderApplianceDrawer (cognitive 32): detailDrawers.renderApplianceDrawer has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 12 (13 pts), boolean chains 5 (nesting depth added 8). Of this number, 27 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc4da36cf672c2b0211229bf19090b6e5a16332fbf0d38f13555a2ed9085a11"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.updateLiveSliderReadout (cognitive 32): detailDrawers.updateLiveSliderReadout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 6 (12 pts), boolean chains 3 (nesting depth added 10). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bd394f7ac7e087264984e142e53279be23e80c428cc8ecbf0d54b647bab7bfb"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechInputController.start (cognitive 31): SpeechInputController.start has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 10, error handling 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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a92b4c9df552b7b2d473406292373ee82094fc68ec2ffcba4e92824f038201a"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.contextMenuItems (cognitive 31): DeviceCardView.contextMenuItems has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), ternaries 6 (8 pts), boolean chains 2 (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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"66dc9284ade5aa6deede24ecef61054d8d35d1d5319ddffd3fad416368943384"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceDeduplicator.reconcilePairedHALightGroups (cognitive 31): DeviceDeduplicator.reconcilePairedHALightGroups has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 10, loops 3 (4 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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"f467ae664cb94e1979e4eaacd0e4c2c35eda779e411fb56b819018af37f5313c"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountsProvider.updateAccounts (cognitive 31): MiAccountsProvider.updateAccounts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 8 (9 pts), boolean chains 8 (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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a21a0f2f632ecf5e40a90babcc5e491e71054735c2b2bb37ed79e501a91966"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.decodeChatOp (cognitive 31): ModelIntentResolver.decodeChatOp has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 13 (24 pts), if/else 5 (6 pts), match/switch 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":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07e4ab8d46501bd960207bff2790f3731bdd2431d9889377eeae7651beab448"}},{"ruleId":"D2","level":"warning","message":{"text":"safetyAndHealth.buildWeeklyHealthReport (cognitive 31): safetyAndHealth.buildWeeklyHealthReport has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (8 pts), boolean chains 7, loops 4 (nesting depth added 8). Of this number, 26 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"925b706edebd6568eccc32bd591614e4db3e69cf04bdc24a16cf9784172c28b7"}},{"ruleId":"D2","level":"warning","message":{"text":"appLifecycle.bindGlobalKeys::onKeyDown (cognitive 31): appLifecycle.bindGlobalKeys::onKeyDown has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc92ddeb9a3f8378bf1ee2894a89aa5e3f22edea1cc04b77feb6d4b708747ee9"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicDeviceCardView.contextMenuItems (cognitive 30): ClassicDeviceCardView.contextMenuItems has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 6 (8 pts), boolean chains 2 (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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb55d8ffc3cec2aab058e04b9dc70c3775be8ee89ea48abd0e74555243797a3"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.extractBalancedJSONObject (cognitive 30): ModelIntentResolver.extractBalancedJSONObject has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"981244587250d6dda605cc52d97c19dd8600eda33189427b74f7aa938b4eaa34"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.genericApplianceStatusText (cognitive 30): MiotSynthesizer.genericApplianceStatusText has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 20, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1531}}}],"partialFingerprints":{"codehealthFindingId/v1":"acdfbeeb780b845570a99f11d648074a759184954c9762325daf5aaf1a92122c"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.unrecord (cognitive 30): UserHabitMemory.unrecord has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 9). Of this number, 28 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3424b20582f094759820518d11061ffcfd96d77f642f512475d9d75cd314bde"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.parseMiCloudHistoryPoints (cognitive 30): sensorHistory.parseMiCloudHistoryPoints has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"559c479c2e095fd265644ce2959c41bdeb35930a3a10e688c7660bc14ebcd1c9"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.pruneOrphanedDeviceActivities (cognitive 30): activityStackView.pruneOrphanedDeviceActivities has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (nesting depth added 9). Of this number, 29 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86146658bb87fe3ab8b6fd63075c043cfd58b6920126436109840245612d802"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.tickSafetyHealthAndAutomation (cognitive 30): activityStackView.tickSafetyHealthAndAutomation has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 21 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce67aa652547ed23c0281079a85e55ef6688b9c484ef40b0bff3291d15b712d"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.dismissActivityById (cognitive 30): activityStackView.dismissActivityById has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb668fbd597ee9de105a6f37735199ab6c08b652fdc7245f347c39cd08b7738b"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantResponseArea.body (cognitive 29): AssistantResponseArea.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, ternaries 4 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f92aac850b8769bfae9eb0476f4b873d0a25218e12ef4714d029f468338fd9"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveVideoPlayer.enqueue (cognitive 29): CameraLiveVideoPlayer.enqueue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 8, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"63279baae54aa4ea5aa15393cbeb93dabf79fcdc1bd62933f43a97e0c8008033"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.emptyStateView (cognitive 29): ControlCenterPanel.emptyStateView has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 7 (9 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":"Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"79c1e1c15f25621d34b428ff6c9974aef7fe16016a36a76c9a136c31723616cc"}},{"ruleId":"D2","level":"warning","message":{"text":"ConnectionSettingsTab.body (cognitive 29): ConnectionSettingsTab.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4367bfe6e9e19d710a34cc1edd9c5c8b4c2d37706111375c10a0c498b1dbe6e"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.emptyStateView (cognitive 29): ClassicControlCenterPanel.emptyStateView has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 7 (9 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"caae6fdf4f042ba5f097bfaa55a55a523f77aa4da9bba05c190f6b148c42e583"}},{"ruleId":"D2","level":"warning","message":{"text":"UserHabitMemory.unrecord (cognitive 29): UserHabitMemory.unrecord has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, loops 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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"12610ae1f374c66e124c272e6f8567417274ea3c5fcf848a852f760c55db0afc"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.cachedExtendedKind (cognitive 29): haDomains.cachedExtendedKind has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 12 (24 pts), boolean chains 2, if/else 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a5d8a1d43ebe541d2ef746d9bcc07b14e0f746edce45d28a99155e83ae1344"}},{"ruleId":"D2","level":"warning","message":{"text":"cloudRefresh.refreshHADevices (cognitive 29): cloudRefresh.refreshHADevices has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 11, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ebbd342502f0ded934d505ea0ee20512bf3fc88e17dc9a4df864d64676bd2ef"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLivePanelView.viewportContent (cognitive 28): CameraLivePanelView.viewportContent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f176d7de0ac7a1136b02775ed84c3cc8a0ecbdf191ebdee7791bc751fc73474"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.syncManualSessionFieldLocks (cognitive 28): HomeStore.syncManualSessionFieldLocks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d7c2551ad9d7d87a7f3129a9bfd229317a2f83d27c17e045f428afa3b1d80cc"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.confirmToggleReadBack (cognitive 28): HomeStore.confirmToggleReadBack has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"2daffb6faec9fb68506374f1b4865818afe6457a5fc902a28a7c075eeada1ff6"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.startUpdateInstallation (cognitive 28): HomeStore.startUpdateInstallation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, error handling 2, 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":"Sources/MijiaCore/HomeStore\u002BUpdate.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"52c0281430b1454069401c9d21cad05c211549508dc883fc04afddae50ab0b07"}},{"ruleId":"D2","level":"warning","message":{"text":"DiagnosticsReportBuilder.markdown (cognitive 28): DiagnosticsReportBuilder.markdown has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 2 (6 pts), loops 2 (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":"Sources/MijiaCore/UnsupportedDeviceCollector.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b0d6e5e76d2d513a805fce917ee2213d44a29153f5ccaa094d8777f4534779"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountLogin.parseSetCookieExpiry (cognitive 28): MiAccountLogin.parseSetCookieExpiry has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (3 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":"Sources/MijiaCore/MiCloud/MiAccountLogin.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17c3b2d7b6c0e2cf0302ec0bd50d99935a94a630e047d991ffc489558daf3f0"}},{"ruleId":"D2","level":"warning","message":{"text":"verify-flyout-layout.runLaunchChromeStartupSelfTest (cognitive 28): verify-flyout-layout.runLaunchChromeStartupSelfTest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12, error handling 5 (6 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cf4f1801270535a012a2e8e75c52485d331875d159b314247a8764170d23fb9"}},{"ruleId":"D2","level":"warning","message":{"text":"habits.habitActionable (cognitive 28): habits.habitActionable has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 19, if/else 5 (8 pts), match/switch 1 (nesting depth added 3). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e46b76d59df8c9ea3deb80cd6542b3ce4c0eb2100c6575db9dcc332f165013"}},{"ruleId":"D2","level":"warning","message":{"text":"synthesis.applianceActivity (cognitive 28): synthesis.applianceActivity has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, boolean chains 6, ternaries 1 (2 pts), match/switch 1 (nesting depth added 1). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"70641e67825958e2e5165898c40a3bf98926f3e825521d66c46734409738afb2"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.resolveHomeAssistantSensorEntityIds (cognitive 28): sensorHistory.resolveHomeAssistantSensorEntityIds has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 2 (3 pts), ternaries 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1371}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca56819c84b666c2f824dab6972e7cab895b20a8a10ccbd193b447adaf310b8f"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiAccountMiCloudProvider.execute (cognitive 28): MultiAccountMiCloudProvider.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (4 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1351}}}],"partialFingerprints":{"codehealthFindingId/v1":"33888e14d8206203494cd03b8930339f55c1abf87baae81cc65d81efd3aa1030"}},{"ruleId":"D2","level":"warning","message":{"text":"miAccountsStore.refreshMiAccountsConcurrently::refreshOne (cognitive 28): miAccountsStore.refreshMiAccountsConcurrently::refreshOne has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, ternaries 5 (8 pts), error handling 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":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac6c442d5582d56cb4629439b31210863ff8abb83f85bcfe362aebc15a84650b"}},{"ruleId":"D2","level":"warning","message":{"text":"ResumeRecoveryController.flush (cognitive 28): ResumeRecoveryController.flush has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (14 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"0353168f41e2f8b7ffef702a3ed5c5b54f9c565b188d89a70742884a2bf5d62b"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuMijiaWindowsApp.bindOpenAnimation (cognitive 28): MenuMijiaWindowsApp.bindOpenAnimation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 6, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 1678, normalizeEdge, scrollActiveRoomIntoView, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1561}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ffb5de435ba917ee47a0b33f7eded308848ef295dfc834810e2c8b925476b7"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.partitionUndoStepsByHighRiskConfirmation (cognitive 28): activityStackView.partitionUndoStepsByHighRiskConfirmation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (8 pts), boolean chains 3, 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6d31424f4c0e8849aafd862aba105996ad43a15133449152ee9f7e76c089be"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLivePanelController.startMJPEGStream (cognitive 27): CameraLivePanelController.startMJPEGStream has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, loops 2 (3 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":991}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c2c7baaa5d1ca6c8ac856db6d410d3c86423d125dea2f3b3d4005a48c23f6c"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.compactHeaderRow (cognitive 27): DeviceCardView.compactHeaderRow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 7, boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"b57988f4b93655f12e79d2fa01a61ca52d2a648bd465279a980a0c114351c037"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemActivityMonitor.apply (cognitive 27): SystemActivityMonitor.apply has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, loops 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SystemActivityMonitor.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d293560e06c13433f2c4d503e26f3ba9a3521cfdf784923c50ebc88564ed01"}},{"ruleId":"D2","level":"warning","message":{"text":"FragmentedMP4Demuxer.append (cognitive 27): FragmentedMP4Demuxer.append has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa8f68bf45a87416bca1a2960a869b3f651fdfd6b03357d100485a617340158"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.executeCoverPosition (cognitive 27): HomeStore.executeCoverPosition has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6cbfa78c39b378c4837f0a827249d16d5e32b3009a91e2bcd455c9aa60c440a"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceKind.acceptsControlWrites (cognitive 27): DeviceKind.acceptsControlWrites has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 26, match/switch 1. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ffbe4f542f17862a5e0026167a0dc315a4fd81a9aebe969bb8e942d291aa25"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartDevice.environmentReading (cognitive 27): SmartDevice.environmentReading has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f3bf41c5676159657c1e440e582fe56ca92b579fe2ef59e9891cd2eaef6a08"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountsProvider.publishSnapshot (cognitive 27): MiAccountsProvider.publishSnapshot has cognitive complexity 27 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 3 (7 pts), boolean chains 5 (nesting depth added 11). 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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"709e0b7d725d675fdb0ee026f8b5ec6dcd12a84349cc9c5551d09475f4bf402d"}},{"ruleId":"D2","level":"warning","message":{"text":"miotFacetText.facetValue (cognitive 27): miotFacetText.facetValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, ternaries 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":"windows/src/core/miotFacetText.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea24323cd38df94fce9e69dc86122b7b144564b651d372a2af919530954d7fe"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.resolveTarget (cognitive 27): appUrlCommand.resolveTarget has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 12). Of this number, 24 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7117de5df526f25aef937ebc211a3168eef6be9b4572997383c11abb11df186"}},{"ruleId":"D2","level":"warning","message":{"text":"CredentialVault.loadInternal (cognitive 27): CredentialVault.loadInternal has cognitive complexity 27 (threshold 15). Drivers by points: error handling 3 (10 pts), if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"188aa2dde6a34040d70f6e8de5b1aa90851faa6450385bc7056c5f47a6c72c2c"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.triggerRemoteHistoryFetchIfNeeded (cognitive 27): sensorHistoryView.triggerRemoteHistoryFetchIfNeeded has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e5daf582297141438e4edcca2bd8db9d33e932e79fda85dbdadf730b05e5b84"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.commitCameraStreamUrl (cognitive 27): CameraLiveController.commitCameraStreamUrl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"937ae8a7e9e3530d643535d8ff62903be14363cf268cc40f3a70c6f55059eaf1"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.renderCoverDrawer (cognitive 27): detailDrawers.renderCoverDrawer has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 8, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cbc99797aa161d2d78d20aabc60401d322c3f11a3ed9e00c72f381a17e2344"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorCardView.body (cognitive 26): SensorCardView.body has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 8, if/else 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd84d96acfcd15a71301539e71d71d3a53066acbf305c33cb40f57d48ddd63e1"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentReply.describe (cognitive 26): IntentReply.describe has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 4 (6 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15b59b6613c465785cf18b4a323301005ee44b9f477a312c722eacaa8c8abd9"}},{"ruleId":"D2","level":"warning","message":{"text":"FragmentedMP4Demuxer.findVisualSampleEntry (cognitive 26): FragmentedMP4Demuxer.findVisualSampleEntry has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (8 pts), match/switch 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae45181d57e049cf309e33c16bba7a868519fae2f1ca01d54d7a465e95640d7b"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.isAllowedLANDiscoveryHost (cognitive 26): HADiscovery.isAllowedLANDiscoveryHost has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 19, if/else 6, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db7d24ae71a03da23df1f3edaf3c714bb53406cfa9b86cbfe2659a3f6c6d5e6"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.decodeResponse (cognitive 26): MiCloudClient.decodeResponse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 6 (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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d96261f01c0f3d4ef37e638cde2717905753b65cb7d49f12d7797554eb53585"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudDiscovery.homeFallback (cognitive 26): MiCloudDiscovery.homeFallback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), error handling 2 (4 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":"Sources/MijiaCore/MiCloud/MiCloudDiscovery.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8a7492d4555579cf27efc06865916bdecc77de6d13cfa32be4137a17228c72"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.facetProps (cognitive 26): MiotSynthesizer.facetProps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 3 (5 pts), ternaries 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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"56e7a66ebd6aaa0c1963cd89d5f7445afc2db4753d2f38adab2850886eff753f"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildCoverKind (cognitive 26): haDomains.buildCoverKind has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 17 (24 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"696c2905269a71a28519e350fc9034124ebbfa60807bec50118470470b870490"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildHAFacets (cognitive 26): haDomains.buildHAFacets has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"d48c01afcc733a4f367285619c6ec147ff3ebbe60f82f9b7cf449021d5263a4b"}},{"ruleId":"D2","level":"warning","message":{"text":"habits.decodeHabitOperation (cognitive 26): habits.decodeHabitOperation has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (24 pts), if/else 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3dfc7fd0e04cfc1d4dca3f06f846e3b8b9a15969fc450dee53c48ae4c081b2c"}},{"ruleId":"D2","level":"warning","message":{"text":"speakerActions.findTtsAction (cognitive 26): speakerActions.findTtsAction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a120cd06f4b8cffed03a12b3c90fc45b2ff065589e2eaa81b337c030fb5f0680"}},{"ruleId":"D2","level":"warning","message":{"text":"safetyAndHealth.evaluateSensorAlerts (cognitive 26): safetyAndHealth.evaluateSensorAlerts has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (8 pts), boolean chains 7, if/else 3 (7 pts), loops 3 (4 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d66018739f717698912713c7a046d0db651da5f123b708a79266fa09cc2abf"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsViews.renderGeneralPanel (cognitive 26): settingsViews.renderGeneralPanel has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 20 (23 pts), boolean chains 3 (nesting depth added 3). Of this number, 21 points are the body\u0027s own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"923413055587c3ba1a18d451be00d8b611665ec14c61c2005b38d45c74c6069b"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.computePlotGeometry (cognitive 26): sensorHistoryView.computePlotGeometry has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 5 (6 pts), boolean chains 5, loops 1 (nesting depth added 6). Of this number, 22 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ea5d53a04d40f5435aeedfabca48b7b3df2088bb567a64cb1932226e193575"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.bindSensorHistoryEvents (cognitive 26): sensorHistoryView.bindSensorHistoryEvents has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 6. None of this is in the body itself: all 26 points belong to 12 function literals inside it that branch (lines 956, 983, 1002, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"55015071cf741f2cf31d9c472d0f54ffdbb4dfa0ce5072fd30ef6202ad9a53fe"}},{"ruleId":"D2","level":"warning","message":{"text":"GrokBallSidecarController.handlePointer (cognitive 25): GrokBallSidecarController.handlePointer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 3 (5 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/GrokBallSidecarController.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"4296bbaec3b8f03025f0df3c0b76be98706e38904a92f898cae81c1c144ff84b"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarStatusSummary.text (cognitive 25): MenuBarStatusSummary.text has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (9 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":"Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7bce1d052d72fa9667e6d3c8dfafa88cf6d68520e4f250315130a6d2f181ed"}},{"ruleId":"D2","level":"warning","message":{"text":"URLCommandHandler.resolve (cognitive 25): URLCommandHandler.resolve has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"35098efe4787206a1ca018bb7251a6a12488dba376d2a06438df71a5c6c2bdbe"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.revert (cognitive 25): HomeStore.revert has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, 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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5a0fbb28c48dd9c1106965fa2216e7a3032c2f4cd9ec2dc36c249aa1163be8"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.executeRaycastDirectCommand (cognitive 25): HomeStore.executeRaycastDirectCommand has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14, boolean chains 11. 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"584f393f1c626ffce02656cef3e56f3bccf901e06e18913d73ffebf16ea17f7f"}},{"ruleId":"D2","level":"warning","message":{"text":"LGWebOSClient.handleIncomingMessage (cognitive 25): LGWebOSClient.handleIncomingMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 2 (4 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":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b7c11de3a3a386a340725fef2eb334c0d8b4dd7680046d091bf390c539e0127"}},{"ruleId":"D2","level":"warning","message":{"text":"SafetyMonitor.evaluate (cognitive 25): SafetyMonitor.evaluate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, match/switch 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SafetyMonitor.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7004e8eb9a4bcaeb14be9839d9c9d01dc987238c96ee599e56311879e71f368d"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.extractRawNumbers (cognitive 25): MiCloudClient.extractRawNumbers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 10, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f470d8f34da820b5dab286de760bc6bee1155cd41337742cca9bf25eb68b85"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.extractStreamURL (cognitive 25): MiCloudProvider.extractStreamURL has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1403}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6a202e6ef807013512590df0e8f737afedb0d8ee7ad1be79b5d758ea160f383"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::network::native_http (cognitive 25): menubarmijia_windows::network::native_http has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"584089ecb9aadf3b1fa18d25c41a19c3e16364204597d7eda4ee6f2932a3e400"}},{"ruleId":"D2","level":"warning","message":{"text":"models.hasDetailDrawer (cognitive 25): models.hasDetailDrawer has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 23, if/else 1, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3735dc46b9920dc72dbfad8fc27733d6095961414a411fbe3741fadad4d209f"}},{"ruleId":"D2","level":"warning","message":{"text":"facets.buildMiotFacets (cognitive 25): facets.buildMiotFacets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4afee0e92777f96d884f1aa64c7233cb45be64d0421f172398325861ef920ce"}},{"ruleId":"D2","level":"warning","message":{"text":"speakerActions.coerceSilentExecutionArg (cognitive 25): speakerActions.coerceSilentExecutionArg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 6). Of this number, 21 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"00686f8ccd36433b417ed7f11088cd18e919aff8220cbc81065ca7b2db41d69e"}},{"ruleId":"D2","level":"warning","message":{"text":"synthesis.primaryMiotService (cognitive 25): synthesis.primaryMiotService has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 8). Of this number, 22 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6d50f6687ec03efd9fd235039e5eb5a86d34a0c00ac0ac4823d84a245b6d4d"}},{"ruleId":"D2","level":"warning","message":{"text":"promptContext.buildIntentCatalog (cognitive 25): promptContext.buildIntentCatalog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, loops 2 (nesting depth added 8). Of this number, 24 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"4488f1a4a2bec6aa7153be1bff4c068572f6f431e19e752d0315c34d788067b5"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.runIntentOnDevice (cognitive 25): appUrlCommand.runIntentOnDevice has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 11). Of this number, 24 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc86c95fb04c6b82495e4e12fee9943b9bb29ff3e957b80952f00d76173eea6"}},{"ruleId":"D2","level":"warning","message":{"text":"homeAssistant.cachedKind (cognitive 25): homeAssistant.cachedKind has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45509a2d3367f3ebdb5c8c0a9228df8bdf84525dd5a5662519a681872fd17a4"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.beginOptimisticWrite (cognitive 24): HomeStore.beginOptimisticWrite has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"5398e4160110c9e93db88e3d52dd5a4427b486fa9b164ca0de9e8807fcd44d23"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.parse (cognitive 24): LocalIntentParser.parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9 (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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d87217cf3c0190efc36b3d3aef7649bd7b1b6572409b328f8419da5837a655e"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.extractNumericOperations (cognitive 24): LocalIntentParser.extractNumericOperations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (3 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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb82765fabda4ceeef978ce529329b66187ad68d010f7b716f6b1d8fd5d4e93d"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.interpretedLockStatus (cognitive 24): MiotSynthesizer.interpretedLockStatus has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 18, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"50083e85c7d6c321b001021989bf75a4029f278c0a68d58bc2046d88a02b5a17"}},{"ruleId":"D2","level":"warning","message":{"text":"intent.extractEnglishNumericOps (cognitive 24): intent.extractEnglishNumericOps has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), loops 4 (5 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":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd7b0678712ac15cd689c48629af4e6172372c2d412be81951f16c9ab2835117"}},{"ruleId":"D2","level":"warning","message":{"text":"habits.listReadableHabits (cognitive 24): habits.listReadableHabits has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 2 (4 pts), loops 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cdef09c752b7b67fae026b3a1a3375d4bff1bc267dfb1895e0b0182f06c8114"}},{"ruleId":"D2","level":"warning","message":{"text":"OfflineHistory.trim (cognitive 24): OfflineHistory.trim has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fa064aab08ba3b4ffc0ef90c00179e2f12fd86ca08505732f405bc4d256b0f"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.querySingleMiMetricSeries (cognitive 24): sensorHistory.querySingleMiMetricSeries has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (8 pts), loops 3 (4 pts), error handling 1 (nesting depth added 10). Of this number, 14 points are the body\u0027s own statements and 10 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e862d97fbb2291d33c5842addcdcd7b19eba2478a732057ad4e272e3d1e488d"}},{"ruleId":"D2","level":"warning","message":{"text":"AutomationEngine.evaluateSensorThresholdRules (cognitive 24): AutomationEngine.evaluateSensorThresholdRules has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3779625f7c9ba0e1c9e359446d6f5f88483a0cc33c11ec5e31c955e0fbcd6e"}},{"ruleId":"D2","level":"warning","message":{"text":"speechGuard.bindCompanionAndUpdaterEvents (cognitive 24): speechGuard.bindCompanionAndUpdaterEvents has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1268, 1305, 1260). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"21ca86082b5aec35341755938032670b24f3fdd5239c2370d26ef6e0d1f33e73"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsViews.renderUpdateSection (cognitive 24): settingsViews.renderUpdateSection has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 14 (23 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":"windows/src/ui/settingsViews.ts"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e8e26f623ff1064b833f6b44d67d1c56d7baca45d5a7a7206a3d65618d12dc"}},{"ruleId":"D2","level":"warning","message":{"text":"proactive.maybeRefreshProactiveInBackground (cognitive 24): proactive.maybeRefreshProactiveInBackground has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/proactive.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab38d3cac6e5bbf489d713c9a2e6bf3f8b7c38f25fa14be6b2824b0022523f8"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.renderPlugDrawer (cognitive 24): detailDrawers.renderPlugDrawer has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 6 (9 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ef34e7fec025e6d5468a50eb946c19795a49a09cb31ebd46f5bc275116eaaa2"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceViews.renderSmallDeviceTile (cognitive 24): deviceViews.renderSmallDeviceTile has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 14 (20 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5650002d70e80ac0e85b95bb74b3348dcc9a8bf2d54255c98621c40bf7c4930"}},{"ruleId":"D2","level":"warning","message":{"text":"HotkeyAndNotificationManager.setupLocalKeyboardMonitors (cognitive 23): HotkeyAndNotificationManager.setupLocalKeyboardMonitors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"f50c1f342688448ba616835da55f0b9dfbc01774758aab8e1751013bb93a2698"}},{"ruleId":"D2","level":"warning","message":{"text":"ReleaseNotesDigest.plainFallback (cognitive 23): ReleaseNotesDigest.plainFallback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/UpdateSection.swift"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"75623307d69974467570d93dedd5771f3b49e46fe8b6ee1392894ab6be8b045d"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicClimatePanelModule.strip (cognitive 23): ClassicClimatePanelModule.strip has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 7 (9 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f233c9bdc1b75187427425694f89a6e04eaaddbfd40be90ce4073dc052af1c"}},{"ruleId":"D2","level":"warning","message":{"text":"VideoNALUnits.annexBToLengthPrefixed (cognitive 23): VideoNALUnits.annexBToLengthPrefixed has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (6 pts), ternaries 2 (5 pts), 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28b4cc3e5a72e58efbf0f930636721cf65d3a22b10ea79c10e3fd10535e4306"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.menuBarText (cognitive 23): HomeStore.menuBarText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BMetrics.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"027720ebb4e33b23c0f76d58a05fb99bac69da2a6c0f3e0e8ec7f5d495b77841"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.bareCategoryOutcome (cognitive 23): LocalIntentParser.bareCategoryOutcome has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (8 pts), match/switch 2, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"023e72cd63d406aa0da8dec240c4927b65cbf893931643162473aa0e95824645"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistory.points (cognitive 23): SensorHistory.points has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3569e40afe270b5f89135523129b0017970db4a5315baa42975467e8cd2091"}},{"ruleId":"D2","level":"warning","message":{"text":"facets.propertyFacet (cognitive 23): facets.propertyFacet has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 7 (10 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":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4ffedfa4809088a8481b92784a48147d116e08bb5d9853355795dd792a7fd9c"}},{"ruleId":"D2","level":"warning","message":{"text":"deviceCategory.deviceCategory (cognitive 23): deviceCategory.deviceCategory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/deviceCategory.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4ed6881cdd848021a7368b7e01e53390fa4cba1974f5497e042a37f2578fa0c"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.executeDirectAskPreset::runDirectCover (cognitive 23): appUrlCommand.executeDirectAskPreset::runDirectCover has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 5 (7 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (appUrlCommand.executeDirectAskPreset) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a76db1b8888b7573570810c0c7c3375b8478a8f296d346a94ae2c9bfb8b0d5"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistoryStore.mergeCloudSamples (cognitive 23): SensorHistoryStore.mergeCloudSamples has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f7e2ebf0b99e1cf8553c12653979a6583bcd71c710274bc900ebdecc77c2054"}},{"ruleId":"D2","level":"warning","message":{"text":"EnergyHistory.deviceTotals (cognitive 23): EnergyHistory.deviceTotals has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 4 (5 pts), ternaries 2 (nesting depth added 6). Of this number, 20 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c423998a81ba22440bb1885592056bff8975307b9116924883005fa343bbc1"}},{"ruleId":"D2","level":"warning","message":{"text":"speechGuard.executeBuiltInQuickAction (cognitive 23): speechGuard.executeBuiltInQuickAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 7). Of this number, 17 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2e279bc54e261822d967ce66fa9d4021c44ae8c5005257a0be6a69900727d7"}},{"ruleId":"D2","level":"warning","message":{"text":"automationSettingsView.summarizeRuleDetails (cognitive 23): automationSettingsView.summarizeRuleDetails has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, ternaries 3 (7 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"254df2aa4087e484002bd9237d484920f5adfc10c9fc1309d84ba6b609daa619"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.syncSensorHistoryHost (cognitive 23): sensorHistoryView.syncSensorHistoryHost has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e00ed868ffea378db07bb70e9241fda02069dd7444d3df6050fff38f9a14f6"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.bindSpeakerCommandBars::submitSpeakerInput (cognitive 23): detailDrawers.bindSpeakerCommandBars::submitSpeakerInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, ternaries 3, error handling 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f44ebce82f176ff778b9217d891ef9ccddc93e67d13963575489e948951cc19"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLivePanelController.ptzDragMoved (cognitive 22): CameraLivePanelController.ptzDragMoved has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"899539a886a0059e3905f6c308f701e2d5f49fdd87e26d06ed9fed2bfad8b571"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.mainDashboard (cognitive 22): ClassicControlCenterPanel.mainDashboard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (2 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"647ccff87afc2476926bd93121956327ec70c882961516e6a36b4f6c3920c2dc"}},{"ruleId":"D2","level":"warning","message":{"text":"HAWebSocketProvider.runConnectionLoop (cognitive 22): HAWebSocketProvider.runConnectionLoop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e653fddd52b540d1de1af2d9ccae75b045536dfa32ccc9302c159de2135f83"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.turnAllOff (cognitive 22): HomeStore.turnAllOff has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"53cb02119aa44fa1a26498a6399f538267334547414b5156904b8b50503e630e"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.buildQuickActionItems (cognitive 22): HomeStore.buildQuickActionItems has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 4, match/switch 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64f7333de0ecb067389a02d0d1cdeb7a51fd14b550fe6e9980d57a5df1c46f6"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelActionPolicy.decide (cognitive 22): ModelActionPolicy.decide has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (6 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelActionPolicy.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"108ba14be9e48be1734a68e6d697d2575463c38ca98ddd99cc63d9bb2635eab8"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorBucketRecord.addSample (cognitive 22): SensorBucketRecord.addSample has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88c3c9257fb05e4327da1126b6b431da410897aa4fcbbc121cd76e11f123fb9"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistory.migrateUnscopedEntriesIfNeeded (cognitive 22): SensorHistory.migrateUnscopedEntriesIfNeeded has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (9 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":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc59ccd264d4a0ae2342286b5b53d7dbfe6ecb9835d02b7e3038aecc452a717"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateManifest.parse (cognitive 22): UpdateManifest.parse has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 17, if/else 3 (4 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateManifest.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b34f548eae0368dac81c332d524ada704de427bf82b90c02cb92147cabaeee2"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalMiIOClient.sendOnce (cognitive 22): LocalMiIOClient.sendOnce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, error handling 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":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"745c7d6908cfa83a0a049c4d72c7d87d26f5b0253d380c9e911297fa4795bffd"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.fetchMetricSeries (cognitive 22): MiCloudClient.fetchMetricSeries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 pts), ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad533c813acc4b70818de4afb112382af2fb708baa621c809c09c080e71042bd"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotFacetEngine.facets (cognitive 22): MiotFacetEngine.facets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"baeff671de27e991dc7ba373587d3d67d339e0a1bcdb58e3ca7c1ef479fd9037"}},{"ruleId":"D2","level":"warning","message":{"text":"models.deviceEnvironmentReading (cognitive 22): models.deviceEnvironmentReading has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 10, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6acb4746dab54d5efe789c094bb841882583b705f985ebfba3e88cce4b01fd8"}},{"ruleId":"D2","level":"warning","message":{"text":"speakerActions.mapSpeakerActionInputs (cognitive 22): speakerActions.mapSpeakerActionInputs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0fc9a9f3818580bb571333b103ee9489f20b8e62afd83b6c925998e859d0ee2"}},{"ruleId":"D2","level":"warning","message":{"text":"modelIntentResolver.proactiveSuggestionsFromSystemOne (cognitive 22): modelIntentResolver.proactiveSuggestionsFromSystemOne has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"75586c66f94268edc1dca4d22f3c982c107ffe1bce57fe5fa1def483a2a505f2"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.sanitizeStoredBucket (cognitive 22): sensorHistory.sanitizeStoredBucket has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 5 (7 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2ee61a3ffb0ad9271394e2b732f941102ee0a33494c599c631b41d933fecc4"}},{"ruleId":"D2","level":"warning","message":{"text":"scheduledCommands.parseOperation (cognitive 22): scheduledCommands.parseOperation has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5086b012b579d448d205daf72302ced6583920074031e93393cbead47094699"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.pumpAuthenticatedMjpeg (cognitive 22): CameraLiveController.pumpAuthenticatedMjpeg has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddccfbbf2db5cc869af46cb62fde6cac926f9b79c19abbfdee54715e456e432"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.dispatchDesktopNotification (cognitive 22): activityStackView.dispatchDesktopNotification has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 4 (9 pts), boolean chains 2, 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"f00ee07e6289c0c3921e2cbc259e3b873b472b5e0632ec0fcbc983e0b5fd251a"}},{"ruleId":"D2","level":"warning","message":{"text":"OnboardingGuideView.step1ConnectionCard (cognitive 21): OnboardingGuideView.step1ConnectionCard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4c0c1f28266a97cf21acd9fe0c2a5f3d929ce5c74cf25d7460cf6deae0e4dc"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicGlass.body (cognitive 21): ClassicGlass.body has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (10 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":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad34872268934adc1092ac6d1333edd6c9a03d4e3f877e84cee020c6edfabcb"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.tileDragGesture (cognitive 21): ClassicControlCenterPanel.tileDragGesture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"e889eb3a6ad530e3cb58c0b661a836a497dc6597291f966b6f03664c5a1d220f"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentCatalog.text (cognitive 21): IntentCatalog.text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a07a047eaaf92fee4054840770787241bcf90a89eb7d00d0417143b402cd17"}},{"ruleId":"D2","level":"warning","message":{"text":"DualSourceHomeProvider.handle (cognitive 21): DualSourceHomeProvider.handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"7da8d02aa8a0a0611998113b2925a654f2cdecc5efcb22a31ac8ec4f86b016d6"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.unescapeDNSSD (cognitive 21): HADiscovery.unescapeDNSSD has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"5182f218eb9d947adbd16de72f13a97a2714e5958ede3f06e486b0632ec86573"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.optimisticLockUntil (cognitive 21): HomeStore.optimisticLockUntil has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c5794242a37ae75a14a18d2a0bcafafdb7948ee4d81dc58649e666feffa4af"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.apply (cognitive 21): HomeStore.apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (3 pts), ternaries 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":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"258c6a01949a27e7b4e0eae02b8ddbcd61feec9580d47c60ddfa09bf56956494"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.reconcileManualWriteSessionWithSnapshot (cognitive 21): HomeStore.reconcileManualWriteSessionWithSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"b050cf1a82e5f10be6f641b95aa976a2cfb428674a2cc7a671d835edefaef557"}},{"ruleId":"D2","level":"warning","message":{"text":"UnsupportedDeviceCollector.homeAssistant (cognitive 21): UnsupportedDeviceCollector.homeAssistant has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, 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":"Sources/MijiaCore/UnsupportedDeviceCollector.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e340303e983795daa3e4d6cea0de6136f0639c0e30b823ac82ecd5b4aead11"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parseLatestEventTimestamp (cognitive 21): MiCloudClient.parseLatestEventTimestamp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1263}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca5cb06ed7bfd6ee1b2a6570804fc637567bd9caa2e38a0cebb761ca4d8cf97"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.primary (cognitive 21): MiotSynthesizer.primary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 3 (4 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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3a541f19291544ded74459cd3859f98b0d596fa782bfadea78c3f6e2b34edc"}},{"ruleId":"D2","level":"warning","message":{"text":"homeAssistant.homeAssistantIdentity (cognitive 21): homeAssistant.homeAssistantIdentity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1bda4a32f0226733d3e63f54dde67f3c98c3915ced9841f897be3b2dadbd4a3"}},{"ruleId":"D2","level":"warning","message":{"text":"miAccountsStore.readAccountIndex (cognitive 21): miAccountsStore.readAccountIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (6 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c87e6bc44b659c7eb49145a434d7072e28c335ce2695e7783af11935a5c931"}},{"ruleId":"D2","level":"warning","message":{"text":"energySettingsView.renderEnergySettingsSection (cognitive 21): energySettingsView.renderEnergySettingsSection has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 4, if/else 2 (nesting depth added 1). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c8db0028de38e0a3a1934027dd0f1f8a36731bd7539473ecfaca1ab09b0986"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.metricComfortBadge (cognitive 21): sensorHistoryView.metricComfortBadge has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 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":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8e79f1af4d8c9a53e01323b9ead8d73bacb0049f759fbef03d7fd7b641731d"}},{"ruleId":"D2","level":"warning","message":{"text":"roomOrderEditor.renderRoomOrderEditorModal (cognitive 21): roomOrderEditor.renderRoomOrderEditorModal has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 2, if/else 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 297, 346). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c9740352e4b195f9831c8035fe8204e813a5e1533f88792ed6ce36e8b864fb"}},{"ruleId":"D2","level":"warning","message":{"text":"detailDrawers.bindCollapsedInlineSliders (cognitive 21): detailDrawers.bindCollapsedInlineSliders has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10 (nesting depth added 1). None of this is in the body itself: all 21 points belong to 3 function literals inside it that branch (lines 925, 905, 927). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8a5336903dec7f987e0950e3f7f098a39288fe59c80bca37d0b0a83a08a007"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsEvents.probeAssistantConnection (cognitive 21): settingsEvents.probeAssistantConnection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"b634252ba30e8681356cc47ce78530c22e13f67e29a94feee53f3371b7911db1"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.doesUndoStepActivateHighRiskDevice (cognitive 21): activityStackView.doesUndoStepActivateHighRiskDevice has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 682). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77fcbdc3e07c0df15046e47b5cc304aac6d49e884db267ce0b8578c942dec74"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.deviceCollectionView (cognitive 20): ControlCenterPanel.deviceCollectionView has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8, boolean chains 6, if/else 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02e09a96d0fb32984d6aa1362a3c5164cd32dea6f84ccd674838687ecefb987"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.cardBody (cognitive 20): DeviceCardView.cardBody has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 5, if/else 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f41108ff03bf03e600233776cfdc95a5d2d16b67f3610fd9773cf53bef735b1"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.parseTXTRecordTokens (cognitive 20): HADiscovery.parseTXTRecordTokens has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1, loops 1 (nesting depth added 11). 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":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"c172a4e06ef8911813f6b376605955789f5cf3f1773293f6bd6e06f72b40fdc1"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelHealthResolver.resolve (cognitive 20): PanelHealthResolver.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 1 (2 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c90660665592b3fccb620522e458d93c17f056e44e33808827e5fd80fd76df5"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.runUndoCommands (cognitive 20): HomeStore.runUndoCommands has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e5b6f871b1a914b572429c3c1696f0b5317a331fcc34de05cf86d2c4ee740f"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.performUpdateCheck (cognitive 20): HomeStore.performUpdateCheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUpdate.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb943e4686b2138eb12fc8d0eac48e657668b03670399b62de2d46544122aa4"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.exportRaycastSnapshotIfNeeded (cognitive 20): HomeStore.exportRaycastSnapshotIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd986ee6cacad29bb484537a6f120f8fcbaace4d436d234aca510e8f58a6a47"}},{"ruleId":"D2","level":"warning","message":{"text":"LGWebOSProtocol.friendlySourceName (cognitive 20): LGWebOSProtocol.friendlySourceName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf9bd6ee17c99a69ae1f21b546d4c08f0f1f5fb187771179460fb291160f413"}},{"ruleId":"D2","level":"warning","message":{"text":"CoverSubtype.init (cognitive 20): CoverSubtype.init has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 7, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"576456abaeaf719eb5270ef1fd360fb2f8d16394b027b16d24d5515514f6948e"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistory.record (cognitive 20): SensorHistory.record has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ecd2c6369570f4ff03af1feea5fa6b7fba8f64bf2184e56c3118dc71eb43453"}},{"ruleId":"D2","level":"warning","message":{"text":"BoundedHTTPStreamDelegate.urlSession (cognitive 20): BoundedHTTPStreamDelegate.urlSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateChecker.swift"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e1ef62e108d2d27b0de1f837d1d99d61d7c7b442d49366fe7ec00db184924fe"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotFacetEngine.controls (cognitive 20): MiotFacetEngine.controls has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"398f73544f7a2cb3215cdc5732eebc8ff502a09536bffcda2088be4c2602400f"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.buildClimate (cognitive 20): MiotSynthesizer.buildClimate has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d256aeb7dea71f514e0b8debb77d11da4bcba7a5ab7b71e02072b0c232e98c2"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.decodeResponse (cognitive 20): MiCloudClient.decodeResponse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, error handling 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1da05a98b264dcd686e052e5ea69742dd9092bc9581474a0519790de6de46fd"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parseDeviceRecord (cognitive 20): MiCloudClient.parseDeviceRecord has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12, boolean chains 6, if/else 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f86922c12e50ec0b4bb7f0d74bb504abae8479406ca9d96a62eb30520e727c"}},{"ruleId":"D2","level":"warning","message":{"text":"chineseIntentTables.spokenChineseNumber (cognitive 20): chineseIntentTables.spokenChineseNumber has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"59792206b143b58542a0af0476ba3c6a4b851f5f39dc179c6d156600fd966922"}},{"ruleId":"D2","level":"warning","message":{"text":"cameraHubs.extractRecordParentDid (cognitive 20): cameraHubs.extractRecordParentDid has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, 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":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e8aec0ea61898da9ad4a1212344dd37deafabaa3a1ec6b76b9f4d4fb23b02f"}},{"ruleId":"D2","level":"warning","message":{"text":"scheduledCommands.parseQueues (cognitive 20): scheduledCommands.parseQueues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"5427700067a6da05f33ad0abd634229ec24635946a0bbf7c9441eb8ca6c64321"}},{"ruleId":"D2","level":"warning","message":{"text":"energySettingsView.recordHostSnapshotIfLive (cognitive 20): energySettingsView.recordHostSnapshotIfLive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1cde4f8d6cd595e7843f67a1f4702f11b5a8fdc2623bb8afeedf97a294f8bb"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistoryView.resolveMiSessionForDevice (cognitive 20): sensorHistoryView.resolveMiSessionForDevice has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a05c0a55ec52312ac7a5f428d97088bfb3dd0ff95e90a0083341096d2825dd3"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.bindEvents (cognitive 20): CameraLiveController.bindEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8 (nesting depth added 1). None of this is in the body itself: all 20 points belong to 7 function literals inside it that branch (lines 1290, 1312, 1324, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd4ac2ed2e10e34f29721d3090b55d848cfe4c7918d027fa00b184fc7c73033"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsSearch.searchSettings (cognitive 20): settingsSearch.searchSettings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 6). Of this number, 13 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsSearch.ts"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf28e512350c33ae076c1d67b4a4a7e8cf2fb66a8ad96a2a604677ccf4ab0a8f"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsEvents.hasUnsavedSettingsChanges (cognitive 20): settingsEvents.hasUnsavedSettingsChanges has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 18 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ee2322b895387f09224270aa10161b7e5eaf16cd6a93f3d37c2c92e50595d3"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.omnibar (cognitive 19): ControlCenterPanel.omnibar has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 7 (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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a046340aeb79ec9f87dbb064d3488b90a2677b0fd621f7539ea9ac5773d0470"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceCardView.speakerDrawer (cognitive 19): DeviceCardView.speakerDrawer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":1225}}}],"partialFingerprints":{"codehealthFindingId/v1":"5586e35e31efcdeaba3a4b0629cb0088bba41c08d0c2d34c93b9ef60f35a9b74"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceFacetSection.rowBody (cognitive 19): DeviceFacetSection.rowBody has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceFacetViews.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"a475b36b01557d77f9161a0957139d0e04db026ac25cdb27cffecd431678a423"}},{"ruleId":"D2","level":"warning","message":{"text":"RoomOrderRowView.body (cognitive 19): RoomOrderRowView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 7, boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/RoomOrderEditor.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"394a3156e458f829db5fa456cfce50f4534772d19489c2eefaf321e1b7e5ba2e"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorCardView.readoutBar (cognitive 19): SensorCardView.readoutBar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a4060266e96716792e21800260142aeaf19c858244962c2bfa4f25398672f6d"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.omnibar (cognitive 19): ClassicControlCenterPanel.omnibar has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 7 (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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d43c53514f10b61e9c617455f6c6a3bb5107d8db776b80df99036dfca3e70d2"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicDeviceCardView.speakerDrawer (cognitive 19): ClassicDeviceCardView.speakerDrawer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c6b1b37cfe56ba9101be3771c4722c2afd51a01fdeff960a82c63c673b6cd82"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicSensorCardView.readoutBar (cognitive 19): ClassicSensorCardView.readoutBar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"2968b660ea802f18f94b791db9a474b899566a85ef3b9d78376e8e06a31f02a3"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicChipSurface.body (cognitive 19): ClassicChipSurface.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccea87eea472cb2e04daec405ff0fd7b695cc5ce1aaa2f47f442a548d1cb2807"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.buildInstance (cognitive 19): HADiscovery.buildInstance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 6, ternaries 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":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"35afed2ebc2c9ebfb851a65ade3b8e723480a03525d51f10dd2fe37879f7c52b"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.proactiveSuggestionsFromSystemOne (cognitive 19): ModelIntentResolver.proactiveSuggestionsFromSystemOne has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"e75cc0f263042ef5e5607bf88299b06b7b89dd4bce13de589e4bb40eca84ebd7"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateSystemDriver.unpackDMG (cognitive 19): UpdateSystemDriver.unpackDMG has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1, error handling 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":"Sources/MijiaCore/UpdateChecker.swift"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"afef27a507a5b7ffc0cb5672c70eb06a082a4eacb7a47508564d667cf410d881"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotSynthesizer.buildKitchenAppliance (cognitive 19): MiotSynthesizer.buildKitchenAppliance has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 6, match/switch 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa3051439e563952996920e5c4323962345b7575e0f4415d467cd249cacbeb5"}},{"ruleId":"D2","level":"warning","message":{"text":"Go2RTCOwnerRecord.parse (cognitive 19): Go2RTCOwnerRecord.parse has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 3 (5 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d621f26b8d15aa22829895f5d9d691ed4a5026f72656f8ff04cc5ac557488b8"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::main (cognitive 19): menubarmijia_windows::main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (4 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":"windows/src-tauri/src/main.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"788057c00bfab795489c4d792d4df8974526cc555c1c79b725597a737d7e93e7"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::camera::ensure_go2rtc_running (cognitive 19): menubarmijia_windows::camera::ensure_go2rtc_running has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 1 (2 pts) (nesting depth added 13). 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1158}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f886a7dd91c0149e8c8a77ed6fb72d234f6bdd9d3839daf72132a7f5b1bf43"}},{"ruleId":"D2","level":"warning","message":{"text":"verify-flyout-layout.findChromeBinary (cognitive 19): verify-flyout-layout.findChromeBinary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdd4e84b5458ebcc87ef7132b8423f23aa46b44ccc9552dddd7d2159544fd83"}},{"ruleId":"D2","level":"warning","message":{"text":"miCloudCrypto.base64ToBytes (cognitive 19): miCloudCrypto.base64ToBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a90b9a623cddf56d7720598ca9d396c887436f647ddb5a61705d6c6c9ec349"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildValveKind (cognitive 19): haDomains.buildValveKind has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8, boolean chains 7, if/else 4. Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/core/haDomains.ts"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d8addcb4c4fbc5a008f84b91c1dc9e1ddc2df2c41307888fefb554d378a902"}},{"ruleId":"D2","level":"warning","message":{"text":"MiAccountLogin.waitForScan (cognitive 19): MiAccountLogin.waitForScan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts), 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":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c06955258dc88e94b457352c4e4e7b24f884fce7a2c203011d0ea5fad321a5"}},{"ruleId":"D2","level":"warning","message":{"text":"synthesis.normalizeMiotPropValue (cognitive 19): synthesis.normalizeMiotPropValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 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":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"641aaf09b3b09c488b3bb9fa4d3b74cc09c79e99c725fce0f76a48b54b60b649"}},{"ruleId":"D2","level":"warning","message":{"text":"synthesis.genericApplianceStatusDescription (cognitive 19): synthesis.genericApplianceStatusDescription 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":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ac6c7f0d9ee5e16df9d28942756b9acdae851c233419d0dc8b649d92c1105ed"}},{"ruleId":"D2","level":"warning","message":{"text":"optimisticLock.runTrackedDevicePresetCommands::runSubsequent (cognitive 19): optimisticLock.runTrackedDevicePresetCommands::runSubsequent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (optimisticLock.runTrackedDevicePresetCommands) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d9ab83a084f190daa695f312f8e45921d73f4328584c5df023a0e782328400"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.findUniqueAskDevice (cognitive 19): appUrlCommand.findUniqueAskDevice has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 12 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c28f4e3048ebf330ccf8cc8d6e4a33668eb4adb626460f6a242a70f54a4c7a4"}},{"ruleId":"D2","level":"warning","message":{"text":"sensorHistory.parseHAHistoryTimestampMs (cognitive 19): sensorHistory.parseHAHistoryTimestampMs has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (11 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1d288f170c8907a27c013a15af89319ebd1e0844aa488831f8b7642e156952"}},{"ruleId":"D2","level":"warning","message":{"text":"miAccountsStore.executeMultiAccountMiotCommand (cognitive 19): miAccountsStore.executeMultiAccountMiotCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 16 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7abebed1017e18b253cc5098feeaed0cb4eaba011aa955cbc0aaae3a8550b34"}},{"ruleId":"D2","level":"warning","message":{"text":"diagnosticsAndScanner.derivePollingBackoffDiagnostics (cognitive 19): diagnosticsAndScanner.derivePollingBackoffDiagnostics has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":959}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ed8b3265257aa53fec8568ee25f07ca0c854e80c52ea57719fbbb243648676"}},{"ruleId":"D2","level":"warning","message":{"text":"ScheduledCommandStore.takeDue (cognitive 19): ScheduledCommandStore.takeDue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 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":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9149274384c0b1ac0ee735e72a585f3c0f0d1d2938700f1af2db91e41aec20b"}},{"ruleId":"D2","level":"warning","message":{"text":"bindEvents.bindEvents::writeFacet (cognitive 19): bindEvents.bindEvents::writeFacet has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 6, if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ef7d330614f3786ef3063484299e8bc65e019aa32deff77c4e27ccca4bceb7a"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuMijiaWindowsApp.panelHealth (cognitive 19): MenuMijiaWindowsApp.panelHealth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cdbebeae6be75b1bb23e985258d917c793ba26d8e0ab0b5334b923982836cc8"}},{"ruleId":"D2","level":"warning","message":{"text":"HorizontalWheelScrollMonitor.handleScrollWheel (cognitive 18): HorizontalWheelScrollMonitor.handleScrollWheel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"2940cc6e08efdd84abc601579cce1c0f1eaf7df68f3bd16f6d2d20867050f2ef"}},{"ruleId":"D2","level":"warning","message":{"text":"UnsupportedDeviceScanner.readHomeAssistantRegistry (cognitive 18): UnsupportedDeviceScanner.readHomeAssistantRegistry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 3). Of this number, 15 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/UnsupportedDeviceScanner.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"0662e6c7c575d5f6ee7ef0114226cb88168d85a621dbf5ee40cf3072318c37d4"}},{"ruleId":"D2","level":"warning","message":{"text":"DelayPhrase.spokenNumber (cognitive 18): DelayPhrase.spokenNumber has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantSchedule.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bd6ccb8dcb5f2d28ff84d6bbf93b934794cea0a8a6462f638c3b018e9da1b3"}},{"ruleId":"D2","level":"warning","message":{"text":"DualSourceHomeProvider.resolveCameraStream (cognitive 18): DualSourceHomeProvider.resolveCameraStream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"9174e2aa04a12eea23c78c78e31eee844793003fb6a36df843cac5b099e71017"}},{"ruleId":"D2","level":"warning","message":{"text":"HADiscovery.isPrivateLANIPv4 (cognitive 18): HADiscovery.isPrivateLANIPv4 has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c5d7e712783d5e1c7da864464b12bd47f47aad0b423f66c3235c67a8bb6e58"}},{"ruleId":"D2","level":"warning","message":{"text":"HAWebSocketProvider.connectAndListen (cognitive 18): HAWebSocketProvider.connectAndListen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"077d4385912f883b7c70da5b314c0bccc6c939104bee71e66edadcccba9b86ab"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.showToast (cognitive 18): HomeStore.showToast has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0c6d838cb718665ad84d43af19dbfb7720adb31464dbdaf526427f54841829"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.setFacetValue (cognitive 18): HomeStore.setFacetValue has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"013ea2e8f411d518a26e03a8423d5367b3ebec77acde1c42be1f898c2a08d3bf"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.resolveCameraStream (cognitive 18): HomeStore.resolveCameraStream has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1489}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5829a2a1de8326231195add0ce3597610ad6ccae34b6d9b9cf42cbfe2c09d0"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalIntentParser.spokenNumber (cognitive 18): LocalIntentParser.spokenNumber has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ed2e145da460929e62ec44888ace134325a0cbe6a0bafe0a9b9035ca99a4ad"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.endpointURL (cognitive 18): ModelIntentResolver.endpointURL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad2c7c472e53db616e2c328b820c086dbec1ec54a1768cf8c22cb9763d46ac13"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.deviceSpecificCriteria (cognitive 18): ModelIntentResolver.deviceSpecificCriteria has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"561d3ef9b2f1237cfee88405565d2c65dcdc937c3407b273d5602e2d76f7c69d"}},{"ruleId":"D2","level":"warning","message":{"text":"SceneVisualCategory.init (cognitive 18): SceneVisualCategory.init has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1644}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e7c345cb8302437b25a1348a5872576975c8ed40cb1a1c07ee0dfefadb5d80"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::network::parse_ha_endpoint_parts (cognitive 18): menubarmijia_windows::network::parse_ha_endpoint_parts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"windows/src-tauri/src/network.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f0a44f679d4647340583e0fd89dc72111c3b300940c486c4b2546c033b5955"}},{"ruleId":"D2","level":"warning","message":{"text":"intent.bareCategoryOutcome (cognitive 18): intent.bareCategoryOutcome has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 3, match/switch 1 (nesting depth added 1). Of this number, 16 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. 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":"windows/src/core/assistant/intent.ts"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e551e024e21517abdcf2e82e05c61ea6175151cfe0278bf7ede373319741b4"}},{"ruleId":"D2","level":"warning","message":{"text":"discovery.withHomeDeviceLists (cognitive 18): discovery.withHomeDeviceLists has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/discovery.ts"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"9106b0ec3a0fbed02e843ea1da98947345295d549300f12fdbf1d35f33d4e8f1"}},{"ruleId":"D2","level":"warning","message":{"text":"DiagnosticsLog.loadFromStorage (cognitive 18): DiagnosticsLog.loadFromStorage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"e620b26f7bdfba1156ab9b1af2b965fb99b986c2d66fee51e3c464a065cd26df"}},{"ruleId":"D2","level":"warning","message":{"text":"EnergyHistory.prune (cognitive 18): EnergyHistory.prune has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 7 (8 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":"windows/src/core/energyHistory.ts"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"229f401135f895adc8dbd19fc36278a28898426d9c6a135476bf3a849fd54953"}},{"ruleId":"D2","level":"warning","message":{"text":"automationSettingsView.bindAutomationSettingsEvents::handleDraftInput (cognitive 18): automationSettingsView.bindAutomationSettingsEvents::handleDraftInput 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":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1298}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c4cbe0d4f4c56d0100112fd6706f70979210c2b239f80676de0ccb0e0decf50"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.groupPromptOverlay (cognitive 17): ControlCenterPanel.groupPromptOverlay has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc80d86457c000106b70a495347e32374e9babddc1dc61cf9d3817352cfd0e1c"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.deviceStacks (cognitive 17): ControlCenterPanel.deviceStacks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanelStacks.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aac5f55e160fc0213b0d86b3a8db0e198992640d5b3514b3a9bc03a00d35121"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelSearchKeyboard.handle (cognitive 17): PanelSearchKeyboard.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2, boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"a57ee46496bbf6c48eda0abc019b4f3e8623719ecf3bfbaba907ada24dad0c97"}},{"ruleId":"D2","level":"warning","message":{"text":"ReleaseNotesDigest.titleBeforeDescription (cognitive 17): ReleaseNotesDigest.titleBeforeDescription has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/UpdateSection.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"02bd20308acd7b6fe4d1650327892a08fcb2b9018e9c69533fafd676061624b5"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicControlCenterPanel.groupPromptOverlay (cognitive 17): ClassicControlCenterPanel.groupPromptOverlay has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"619480e34b83a6dadfc49e7660e833c404a403bd6c11d47251a4afe16725ec8d"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicLayoutEditable.body (cognitive 17): ClassicLayoutEditable.body has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"5915c42086a821867f3a7afd1adcb7fda6aaa94a7ee4b00c68a3844377ed4347"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.setCoverMotor (cognitive 17): HomeStore.setCoverMotor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"134b3a24587d5968676b1ba7eb46d4fa814d35f4e262b820b4a86f9a3d09db51"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.dispatchFacetWrite (cognitive 17): HomeStore.dispatchFacetWrite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1cfb09f9e37c11fcc3c8c0b55caeefa890a0ce89e169ff290392ee314f37ff"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.runBatchCommands (cognitive 17): HomeStore.runBatchCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"a765a765bf9bd587a6f0fa7c07360318a3556c167652d007903795f3591ca241"}},{"ruleId":"D2","level":"warning","message":{"text":"LGWebOSClient.discoverOnLAN (cognitive 17): LGWebOSClient.discoverOnLAN has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 3, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"24694d6f5cc37581252c519e2825490f8468e267e30b5e80b96847516f26ef74"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudProvider.loadMissingSpecs (cognitive 17): MiCloudProvider.loadMissingSpecs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4, error handling 1 (nesting depth added 5). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bc0f2511f480ecf2b42e4773bc31f2405f2b621694ba229784ea36c5d07925"}},{"ruleId":"D2","level":"warning","message":{"text":"HabitShare.swift.mentionedTargets (cognitive 17): HabitShare.swift.mentionedTargets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 7 (8 pts), boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HabitShare.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a2331a32748409a06b1bb9125a9b06ee79b2cba48e43ce6d9fb04632380cf3"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.homeDevices (cognitive 17): MiCloudClient.homeDevices has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 14 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e0876a4dbff4b0de6fbdea781c17d0e43e4659a48e52bca503ac9236aa302a"}},{"ruleId":"D2","level":"warning","message":{"text":"chineseIntentTables.extractChineseNumericOps (cognitive 17): chineseIntentTables.extractChineseNumericOps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"4199c0ab5e8aa53160c3384f7dbdb82841bc19fa227e969bb6a17aa56820b15e"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.haLightCapabilityFlags (cognitive 17): haDomains.haLightCapabilityFlags has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (7 pts), boolean chains 5, if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"2279e3f53fdf961bd6f39f0f0f743fee31eb5207f2cef3d8bf174c3408fa71d1"}},{"ruleId":"D2","level":"warning","message":{"text":"promptContext.deviceSpecificCriteria (cognitive 17): promptContext.deviceSpecificCriteria has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d5fa4756f0e985fb8b89da2b056301e84c8be0fa1c7306151b8b074c744a3d"}},{"ruleId":"D2","level":"warning","message":{"text":"appUrlCommand.describeResolvedTarget (cognitive 17): appUrlCommand.describeResolvedTarget has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa4aa4b6fbef06907079f1e6b0001609fe1a9d5c55a5c3916a2a434be7c0597"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorHistoryStore.record (cognitive 17): SensorHistoryStore.record has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb3000c02e6f8134ff4d6bd5b01472f58d6cffd7d41606227bced2cb57142eb"}},{"ruleId":"D2","level":"warning","message":{"text":"DoorbellDetector.resolveTargetCameraDeviceId (cognitive 17): DoorbellDetector.resolveTargetCameraDeviceId has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 3). Of this number, 12 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1469}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38604f5cc3d9f3b9304315eb4d95a2b3f6d484b0b9865bd7f2bc7b7d1404d1f"}},{"ruleId":"D2","level":"warning","message":{"text":"updateChecker.selectWindowsInstallerAsset (cognitive 17): updateChecker.selectWindowsInstallerAsset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfef5b97dd5e2c318b05915a6f27649c61ea0226d05b6f6c626b1c98bb2a46c"}},{"ruleId":"D2","level":"warning","message":{"text":"panelPrefs.migrateRoomScopedLayoutKeys (cognitive 17): panelPrefs.migrateRoomScopedLayoutKeys has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c78236b6a6d5494fdb444094a5ee4acce8cc06a87aad6b821f3ddeb3a797a30"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsViews.restoreSettingsDraft (cognitive 17): settingsViews.restoreSettingsDraft has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce63385fa9a59703635231727942e14bf73a5d6fe9d6969ba1f60e19f137c170"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.attachLiveMedia (cognitive 17): CameraLiveController.attachLiveMedia has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). Of this number, 10 points are the body\u0027s own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"0726ec4d42fac5216c9bd57920ef2be31ee46082df2108deb17e120c75e2d081"}},{"ruleId":"D2","level":"warning","message":{"text":"appLifecycle.checkForAppUpdate (cognitive 17): appLifecycle.checkForAppUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3f9d840976e571d8d206ef6bfe2da7bdb99791232fa0a7abb48a09d0f67b2b6"}},{"ruleId":"D2","level":"warning","message":{"text":"panelKeyboard.submitPanelInput (cognitive 17): panelKeyboard.submitPanelInput has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (nesting depth added 3). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58e4a56135c7f691bee833a0582bc828ace80dfbf8b5c775119ca03d2354ef5"}},{"ruleId":"D2","level":"warning","message":{"text":"panelKeyboard.activeModalContainer (cognitive 17): panelKeyboard.activeModalContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"417ad47d9bfda38ac1213a73092010c8ce6e5d9b2e9735380f9f13d79b84048d"}},{"ruleId":"D2","level":"warning","message":{"text":"PanelRenderPipeline.patchDimPreview (cognitive 17): PanelRenderPipeline.patchDimPreview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1160}}}],"partialFingerprints":{"codehealthFindingId/v1":"19bab80a59a1fce9786d363bfba9525fb1f60c8b8de9a71b2fc7888219f01b6e"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveVideoPlayer.makeSampleBuffer (cognitive 16): CameraLiveVideoPlayer.makeSampleBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"0915c2b53d031de5eabc590d06a320ba5b8007890a15bd68b5313f6e215a7f56"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlCenterPanel.mainDashboard (cognitive 16): ControlCenterPanel.mainDashboard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d395e595dff96de55016512f14cd9b1997268767a42bc47946dee4366d66da"}},{"ruleId":"D2","level":"warning","message":{"text":"CoverDetailDrawer.body (cognitive 16): CoverDetailDrawer.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CoverDetailDrawer.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"30fb4aabdb2772d17e2eb1fd1fe7c1816c6e021f17f620524f7f9cb547cf0e65"}},{"ruleId":"D2","level":"warning","message":{"text":"OnboardingGuideView.advancedAIModelCard (cognitive 16): OnboardingGuideView.advancedAIModelCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"051a4f63f7ab7a45266a30ab7910e1e4f9af19884ece90597805184f60a31bba"}},{"ruleId":"D2","level":"warning","message":{"text":"LiquidGlassSlider.classicBody (cognitive 16): LiquidGlassSlider.classicBody has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 14, if/else 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":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"76167f1300f701ffac9bff59e4c45f89e62c321197265d742b90c4879f8de879"}},{"ruleId":"D2","level":"warning","message":{"text":"ClassicLiquidGlassSlider.classicBody (cognitive 16): ClassicLiquidGlassSlider.classicBody has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 14, if/else 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ead4b830ab4755e68da9c2c20e91fcfbe11445bcd8a1de7c0d1f7f22e84d421"}},{"ruleId":"D2","level":"warning","message":{"text":"L10n.captures (cognitive 16): L10n.captures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AppLocalization.swift"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"a616e7935ec1124aeaed396d2ff8af1b5829c8d83411ec62a65e8dc277ed8b3e"}},{"ruleId":"D2","level":"warning","message":{"text":"DelayPhrase.extract (cognitive 16): DelayPhrase.extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantSchedule.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5bfa82ebf2f2475f3dc9904d7249f005dc819799b1c4d1b6027aa37e559457"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceDeduplicator.pairByFallbackGroups (cognitive 16): DeviceDeduplicator.pairByFallbackGroups has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba07becfeeaa3e47a307f301634cc1416645989651b0deadec0a072bd7d36e54"}},{"ruleId":"D2","level":"warning","message":{"text":"HAWebSocketProvider.resolveCameraStream (cognitive 16): HAWebSocketProvider.resolveCameraStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46a760b2bbac17327a600ba555a2e97b40f87dcd3e8b47c12ab4d3ac2b990b0"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeStore.adjustFocusedDevice (cognitive 16): HomeStore.adjustFocusedDevice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BViewState.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9ccf73f8f1a2ab3ceb7e5a91ba3c10ebdb6f30c8eb678484cde8ef9dc8deb7"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parseRooms::appendHomes (cognitive 16): MiCloudClient.parseRooms::appendHomes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"72be85d39d508574c1fc545d5b9a29641a21eb880174d2bda962c330510d649b"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.queryHistoryRoute (cognitive 16): MiCloudClient.queryHistoryRoute has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aaec3bab8cfa1ba8133183c97ccfd88881f7271ff36e2ddc84b5f17ef5cc6fa"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudDiscovery.devices (cognitive 16): MiCloudDiscovery.devices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (2 pts), ternaries 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":"Sources/MijiaCore/MiCloud/MiCloudDiscovery.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3f3062e7c763051dd46cdaf1c9f28642429a012a1474e4f4180bfef402bb0ac"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotPercentScale.raw (cognitive 16): MiotPercentScale.raw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MiotPercentScale.scaledPercent) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotPercentScale.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"5935edd29dbde2d9b98f1152b2ca95dbe4b30d21890a9701bb3d2ffd3c065865"}},{"ruleId":"D2","level":"warning","message":{"text":"MiotPercentScale.scaledPercent (cognitive 16): MiotPercentScale.scaledPercent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MiotPercentScale.raw) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotPercentScale.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"99373e6903d2c6e8eed0fc93030899dfef34767351427a1c0120c46ea260162b"}},{"ruleId":"D2","level":"warning","message":{"text":"menubarmijia_windows::update::install_update (cognitive 16): menubarmijia_windows::update::install_update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"windows/src-tauri/src/update.rs"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"4098e5db07ea86e5acb5dde020f50e8643542432345f1664574f5f7f02d1623a"}},{"ruleId":"D2","level":"warning","message":{"text":"models.deviceAcceptsControlWrites (cognitive 16): models.deviceAcceptsControlWrites has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, match/switch 1. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"b16920a38c7360b761219d832fdcc46ad690fe3c87e22e64520a9b2383533eb3"}},{"ruleId":"D2","level":"warning","message":{"text":"models.airQualityFromRaw (cognitive 16): models.airQualityFromRaw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"00af8dc155802bed9737d6098343d9bc84fcd140a18f6b43861b955a52d08cba"}},{"ruleId":"D2","level":"warning","message":{"text":"MiCloudClient.parseLightGroupMembers (cognitive 16): MiCloudClient.parseLightGroupMembers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"521a4e70d74d1f2f6646e54856d83aef68a33245c642063916766916a6c514ff"}},{"ruleId":"D2","level":"warning","message":{"text":"chineseIntentTables.buildDevicePhrases (cognitive 16): chineseIntentTables.buildDevicePhrases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"6281408223d4e1c616196f8b8d27f7d801de6c420f04f999aae65b244a924040"}},{"ruleId":"D2","level":"warning","message":{"text":"haDomains.buildHumidifierKind (cognitive 16): haDomains.buildHumidifierKind has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 6, if/else 2. Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e32165ce80df59194def81f5a19e58eaa9ae0154e7d488e20af6616e82ec14"}},{"ruleId":"D2","level":"warning","message":{"text":"cameraHubs.fetchCameraMetadataList (cognitive 16): cameraHubs.fetchCameraMetadataList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 9 points are the body\u0027s own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"442e44c5d38986a70d48e2fbf3f75f962156f289bafc66f96229ae24ac8d3519"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelIntentResolver.planFromChat (cognitive 16): ModelIntentResolver.planFromChat has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), loops 2 (4 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c806f63aad55421e4e09e48ec3f68ff668f20b302e55afb126667bfa8c7d049"}},{"ruleId":"D2","level":"warning","message":{"text":"OfflineHistory.deviceSummaries (cognitive 16): OfflineHistory.deviceSummaries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (3 pts), ternaries 1 (3 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c1383ebd580aa00b29d1e0b1e0dfede01a76091e47d8ac0b94dd5dbc824a60"}},{"ruleId":"D2","level":"warning","message":{"text":"controlFailure.extractErrorShape (cognitive 16): controlFailure.extractErrorShape has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 4, if/else 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"19bfa59b5916c8dd230c528be8c872859d8e2e45044030d34835b2cafaeed2c7"}},{"ruleId":"D2","level":"warning","message":{"text":"diagnosticsAndScanner.deriveCameraDiagnostics (cognitive 16): diagnosticsAndScanner.deriveCameraDiagnostics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98db3e6c0b681ffddbc2b4ec128209a7904ea5848351b82be885d7aaeb73555"}},{"ruleId":"D2","level":"warning","message":{"text":"updateChecker.parseUpdateState (cognitive 16): updateChecker.parseUpdateState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 3 (4 pts), boolean chains 2, error handling 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":"windows/src/core/updateChecker.ts"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88aa57a3b0ed0fbc311498945aadba8f2444bb56211d8ebb2ab5322c309f666"}},{"ruleId":"D2","level":"warning","message":{"text":"panelPrefs.pageSections (cognitive 16): panelPrefs.pageSections has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 5). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd588951d10618a8b4b8acdf71a5635c1a54858d1c587d4ea305da2237c0e71"}},{"ruleId":"D2","level":"warning","message":{"text":"connectionsAndDiagView.buildDesensitizedDiagnosticsMarkdown (cognitive 16): connectionsAndDiagView.buildDesensitizedDiagnosticsMarkdown has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 3, if/else 2 (nesting depth added 3). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"976a13453a17bbaec4ee55335b977b50d856d4ca7ae9be7d745a0bf61b0f2b7e"}},{"ruleId":"D2","level":"warning","message":{"text":"connectionsAndDiagView.renderTokenBadge (cognitive 16): connectionsAndDiagView.renderTokenBadge has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a28969fda2a9ea3fd7256871ad8b77060f3442f785936e35a59da21c0965ad9"}},{"ruleId":"D2","level":"warning","message":{"text":"demo.seedDemoSensorHistory (cognitive 16): demo.seedDemoSensorHistory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 1, ternaries 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":"windows/src/ui/demo.ts"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e5df4605c033e7b1fac1b2e9341343d480fc4cb185c2366177cd28c9d7f98e"}},{"ruleId":"D2","level":"warning","message":{"text":"CameraLiveController.bridgeHlsStreamToMjpeg (cognitive 16): CameraLiveController.bridgeHlsStreamToMjpeg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e4b4a89b3d5dfc58948598266f1a000471c3fcc6e8f6a6f3cd15a682d11d93"}},{"ruleId":"D2","level":"warning","message":{"text":"liquidGlassSlider.syncLiquidGlassSlider (cognitive 16): liquidGlassSlider.syncLiquidGlassSlider has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (6 pts), if/else 3 (nesting depth added 1). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"24eb9f8b0b7a05b7d68dc751a6032ee24e0ed513036b9ccc0d97783ea0ca0839"}},{"ruleId":"D2","level":"warning","message":{"text":"reconciler.syncSlidingTabIndicators (cognitive 16): reconciler.syncSlidingTabIndicators has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"301707aa5fa59ad6843367ae80d3367d2e57aba159d119d335aad7a3d817616d"}},{"ruleId":"D2","level":"warning","message":{"text":"bindEvents.toggleDeviceForHost (cognitive 16): bindEvents.toggleDeviceForHost has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2. Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f72f7aaa4653014b3d5461f6814da101609ac4792f47b7669fad242327a1dd"}},{"ruleId":"D2","level":"warning","message":{"text":"bindEvents.bindDeckEvents (cognitive 16): bindEvents.bindDeckEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 1. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 1517, 1478, 1494, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1452}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf7835a5932daf48716fd0f3477d57430bfce3d24f4e7c35014f44ef322a7b4"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuMijiaWindowsApp.swapIfNeeded (cognitive 16): MenuMijiaWindowsApp.swapIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 2). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: 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":"windows/src/ui/app.ts"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97957a696c06064f28868776ab2a7ff0032717d1cb621656ebd814744c5af93"}},{"ruleId":"D2","level":"warning","message":{"text":"activityStackView.renderSingleActivityRow (cognitive 16): activityStackView.renderSingleActivityRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa92f906dfa61916b69bd935ed5fc308b3a4b605a53aa7d1aa91980e8de6a69"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HomeStore: TooManyMethods \u2014 356 methods, declared across 22 files: MijiaCore/HomeStore\u002BControls.swift (66), MijiaCore/HomeStore\u002BBackend.swift (50), MijiaCore/HomeStore\u002BAssistant.swift (47), MijiaCore/HomeStore\u002BControlWrite.swift (44), \u002B18 more file(s). The bar is 30 methods; this is 326 over it, 11.87\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"01695cd9ae12de720600ed141354ae8a921f1e47a6ae2cbfa9d981358ec5105a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: bindEvents.bindEvents: FunctionTooLong \u2014 bindEvents runs 945 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 845 over it, 9.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2898f0a285632ab4d823fe5ea8ff82f7bdfe6f2356645cb3c13160a8e7e39b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GrokBallData: ClassTooLong \u2014 3033 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 2633 over it, 7.58\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":"Sources/MenuBarMijiaApp/GrokBallData.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8afc1fcf82c773d79cf89ea2d082b5ec6f5c20e691a14bbcef7d11a16598883b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceSynthesizer.buildSmartDevice: MethodTooLong \u2014 buildSmartDevice runs 633 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 533 over it, 6.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"70859cf8928b4dd99a43a6a2e11b06d16300735de2ea56dc1dd0fba17ae85c87"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/GrokBallData.swift: FileTooLong \u2014 3034 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: GrokBallData (25-3475). The bar is 500 significant lines; this is 2534 over it, 6.07\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":"Sources/MenuBarMijiaApp/GrokBallData.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f55daca4179a85fed6509f35e99c2122e5d4753aa290382c4a903c178029630"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: settingsEvents.bindSettingsEvents: FunctionTooLong \u2014 bindSettingsEvents runs 540 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 440 over it, 5.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"03212fc8fc507c2fb5eefd020020aa1606df47855b2b1ba31d8b926d8269f226"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: homeAssistant.buildKind: FunctionTooLong \u2014 buildKind runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70\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":"windows/src/core/homeAssistant.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9bb3dc88ec262c97a0d771ac717199c25db6f47ab5e4284affa285330b0c294"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: miCloud/synthesis.ts: FileTooLong \u2014 1613 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: MiotSynthesizer (813-2058). The bar is 500 significant lines; this is 1113 over it, 3.23\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":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bd546c96f5389f83b0592c5640d2ba5fae6c0d715d5088b243105e35e98170f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/CameraLivePanelController.swift: FileTooLong \u2014 1572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1072 over it, 3.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"332f85a27233a89d205fbc890b14854ec4e97fb83c951ac04eaccc10c5ee31a8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DeviceSynthesizer: ClassTooLong \u2014 1249 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 849 over it, 3.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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7eeb099fa4e370e92c72dfb284ff270a29d9eae3fee8ac8d5607c402954f3af"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MenuMijiaWindowsApp: TooManyMethods \u2014 93 methods. The bar is 30 methods; this is 63 over it, 3.10\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":"windows/src/ui/app.ts"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bcdffff1a3ae2dc74370560e185ecb0a7936008c7908b564702421c8c3c6714"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: appUrlCommand.onOpenURL: FunctionTooLong \u2014 onOpenURL runs 303 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 203 over it, 3.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"07875146c37a178fbacd0201d52b40a073d60314ba72ace509b726fc0962c75f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MenuMijiaWindowsApp: ClassTooLong \u2014 1177 significant lines (blank, comment-only and punctuation-only lines excluded), 93 methods. The bar is 400 significant lines; this is 777 over it, 2.94\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":"windows/src/ui/app.ts"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83a1e76294fd69fa0c3b0e5f74f81960421714d646edd32e798e262facc116b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/camera.rs: FileTooLong \u2014 1448 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 70 free functions. The bar is 500 significant lines; this is 948 over it, 2.90\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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32b78d863021c58d76702c071300414b3754adfc4394c82eaf6d08828e92329"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/DeviceSynthesizer.swift: FileTooLong \u2014 1436 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: DeviceSynthesizer (266-1902). The bar is 500 significant lines; this is 936 over it, 2.87\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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60efad0ed23a8c27c2f0ae86f1a6e440d482bb954f8909cdb363c4d1ca628fe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GeneralSettingsTab.body: MethodTooLong \u2014 body runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"dffd54a8678f3cf7f68291a9bf6d90a8173253f47a0721dd5d8cd8ae1b9d90c3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MenuBarPanelController: TooManyMethods \u2014 85 methods, declared across 2 files: MenuBarMijiaApp/MenuBarPanelController.swift (70), MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift (15). The bar is 30 methods; this is 55 over it, 2.83\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"66030cb0bae222304cc0fc0f3ca8a08e0223b1701b9fd20583f9745b4112bbad"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/activityStackView.ts: FileTooLong \u2014 1405 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 905 over it, 2.81\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5afa772d2d9144e688b5b134b08da8a382a73151a69ff1d5d2c6917cb5063d16"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MiotSynthesizer: ClassTooLong \u2014 1118 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 718 over it, 2.80\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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52d7b488deb85cfd92394208422600465c2e1050788209ffe8ee02176cb8a59"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/deviceViews.ts: FileTooLong \u2014 1385 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 885 over it, 2.77\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6044740ac6aec89754e620b9da9b2eb6577b1ea513233f1725a735b4c4805e51"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: automationSettingsView.renderAutomationAndSafetySettingsSections: FunctionTooLong \u2014 renderAutomationAndSafetySettingsSections runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9d32547d54a597f0f24548bbd3616285d2fbba201e4a0f4ddc51d2f3bc4e7a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/app.ts: FileTooLong \u2014 1347 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MenuMijiaWindowsApp (178-1823). The bar is 500 significant lines; this is 847 over it, 2.69\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":"windows/src/ui/app.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4a2f727b4b0f747d3370afc96e1f9bc99ce12fd64e699f4235732dd16414cd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceDeduplicator.merge: MethodTooLong \u2014 merge runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe91aab63ce2e3593209fa5aaa59ff594b1bd31cda7efb4ce5501f80fa3b76e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/Models.swift: FileTooLong \u2014 1332 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 832 over it, 2.66\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f8940dfd7e4764dd84ea567efd42ab62e483e21a185e43f2826b2dd64bbb25"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/reconciler.ts: FileTooLong \u2014 1325 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 825 over it, 2.65\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":"windows/src/ui/reconciler.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d716b4e1c3fff0153fc922e26b11bf8f619500d9e0941566a589a1765a5bf321"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CameraLivePanelController: TooManyMethods \u2014 79 methods, declared across 2 files: MenuBarMijiaApp/CameraLivePanelController.swift (54), MenuBarMijiaApp/CameraLivePanelPTZ.swift (25). The bar is 30 methods; this is 49 over it, 2.63\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d5b306366d298823096ccef96376b5d6bc492ca178c6ea8003d18883a8bbf64"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MenuBarPanelController: ClassTooLong \u2014 1034 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 634 over it, 2.59\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":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf6a1940ba127be8e8f679a9a7503cbc1478213d8e0aaaad4a8173689141ee4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/SettingsWindowView.swift: FileTooLong \u2014 1290 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 790 over it, 2.58\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c759f09cc2be31381f3e8f8ff0a7873d6697e6408ebb23e7abdfe78f3d64fa2e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CameraLiveController: ClassTooLong \u2014 1028 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 628 over it, 2.57\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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4b7a61017f29bb25a3bc47b7839f840ef882e659cf8cbd1ace181b6076bd7a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/automationSettingsView.ts: FileTooLong \u2014 1284 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 784 over it, 2.57\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8197e6b1aece20a402379081ab128917026d6e41e0eae8f755fb9d11ba2333c0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: XiaomiCameraBridge: TooManyMethods \u2014 77 methods. The bar is 30 methods; this is 47 over it, 2.57\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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f278945f5ef13ebad2c5597256fab17c41e30239efc48be68e744eaf543d63"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DeviceCardView: ClassTooLong \u2014 1026 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 626 over it, 2.57\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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1901ef014a8cc4dc7c32b31078af92e9103815422468a56b832187ac72418a5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/automationEngine.ts: FileTooLong \u2014 1279 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 779 over it, 2.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b91ad227d78ad2485a2071b6affcb648da173416922737dc52a7feeb362778"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClassicDeviceCardView: ClassTooLong \u2014 1004 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 604 over it, 2.51\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"01646ce05a47d2109077d2722e93c69e0e3f235055b4764f6835696330fe2fbc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: layoutGestures.bindLayoutGestures: FunctionTooLong \u2014 bindLayoutGestures runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.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":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e6753678fe16c320bde8148eb58768f3402667dc01f1e486afd7248523ca61"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: panelView.renderPanel: FunctionTooLong \u2014 renderPanel runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e97b566488838a3fe3c18c26caa313ce98c0b17af8bc91438a5862439248bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/models.ts: FileTooLong \u2014 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44\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":"windows/src/core/models.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e1089e07a058698af39a658bb02a22c1f1f4c2319a62abdd2c17ffab929571"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: assistant/intent.ts: FileTooLong \u2014 1214 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 714 over it, 2.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaec9f06fa431b00f91c0e04ec92ce3119df40f0ef9446859c0c10cd56968857"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/homeAssistant.ts: FileTooLong \u2014 1212 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 712 over it, 2.42\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":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d2a356105893775b44d72db4870312f317be169fd94bdb44b476cd915e0c70"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ControlCenterPanel: TooManyMethods \u2014 72 methods, declared across 4 files: MenuBarMijiaApp/ControlCenterPanelLayout.swift (33), MenuBarMijiaApp/ControlCenterPanel.swift (18), MenuBarMijiaApp/ControlCenterPanelStacks.swift (11), MenuBarMijiaApp/ControlCenterPanelChrome.swift (10). The bar is 30 methods; this is 42 over it, 2.40\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4248eaec8d4c64a2d1f937f42490d6ed81294d001a78ac1bb45e3b599b5c2757"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: bindEvents: ClassTooLong \u2014 945 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 545 over it, 2.36\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":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b48e31a6c889a1353d1f3f10bd015b2b9e0e0da7e1eaef73db7b36c89be5af87"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/MiotSynthesizer.swift: FileTooLong \u2014 1177 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MiotSynthesizer (31-1565). The bar is 500 significant lines; this is 677 over it, 2.35\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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"63adddda474132933b7c064c979e2f3ef4c9be7a57d62fb6893c17064459c537"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/connectionsAndDiagView.ts: FileTooLong \u2014 1177 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 677 over it, 2.35\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":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e1ae221292314d3c48fa9ff228c60ac9367f859a687eeb263d780300aae1f0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/UpdateChecker.swift: FileTooLong \u2014 1174 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 674 over it, 2.35\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":"Sources/MijiaCore/UpdateChecker.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49685bce444948c060526641b14f6de3031c08814ffb7635bf7adc91fa18911"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CameraLivePanelController: ClassTooLong \u2014 929 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 529 over it, 2.32\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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4626335fcde79c69cb07ba63d84cdec7657a65da74b67eafd7a2c8a202737503"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CameraLiveController.resolveCloudCameraStream: MethodTooLong \u2014 resolveCloudCameraStream runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05a5687274a088bbd27a2622e386f3f44bcbcb3a578759d5b6ac1990664c3a8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/haDomains.ts: FileTooLong \u2014 1153 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 653 over it, 2.31\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92fe8790fa1d51bb592bd684424ecfd360043fb8774282eac994a2fd11feb07"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/bindEvents.ts: FileTooLong \u2014 1149 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: bindEvents (144-1431). The bar is 500 significant lines; this is 649 over it, 2.30\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":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89996f94f24c30fcb6804ce716186614e60eb64823735b8d07095fafac9b108f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/XiaomiCameraBridge.swift: FileTooLong \u2014 1147 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 647 over it, 2.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de130133fcc137b21b48db1b8c0e3c538b1455141644ef77565155214167879"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/cameraLive.ts: FileTooLong \u2014 1141 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: CameraLiveController (90-1430). The bar is 500 significant lines; this is 641 over it, 2.28\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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a3b79b770acc4254582c86b84ddca104c68d0f8cd38a498157ce46ee9da3e4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/appUrlCommand.ts: FileTooLong \u2014 1138 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 638 over it, 2.28\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":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7edf4e0f4232a489cdf6175eaf5e648cfd9d6b065a873b33aa9801f05d78d297"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cloudRefresh.refreshDevices: FunctionTooLong \u2014 refreshDevices runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.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":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3575119795ee9c2cc990e6c0b2a350f8540311038957b7541e7447be8349068"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore\u002BControls.swift: FileTooLong \u2014 1125 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 625 over it, 2.25\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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08ad8a1610ac61e592191c737ea6f392f7ad04ff12edc8cb39bf7048f6464b6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/settingsEvents.ts: FileTooLong \u2014 1124 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 624 over it, 2.25\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":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"720c6b748cf9844e0af0e4d291731ed566e7a390b4d1396a1f5bc938074b46c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cameraLiveModalView.renderCameraLiveModalView: FunctionTooLong \u2014 renderCameraLiveModalView runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.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":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d65244fe1c3ce6aa6af7abe6c357a262b76256dcdde3d1f47857d97f9cffdd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: naturalCommand.handleNaturalCommand: FunctionTooLong \u2014 handleNaturalCommand runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d4292a554d4b19c614dec636550bcdcd488e0ff6d6170b0ff0b1a5b613d5c1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/sensorHistory.ts: FileTooLong \u2014 1109 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 609 over it, 2.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":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a4a1225ded7a56b9b43cfdf7c16854c86ce4e38f2497b2ecf7b9800b0b42e1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/safetyAndHealth.ts: FileTooLong \u2014 1108 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 608 over it, 2.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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a591e1be6db3333043a5c04b3fa37742c3a993702137d8cadd11a77fe018e7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ClassicControlCenterPanel: TooManyMethods \u2014 65 methods, declared across 3 files: Classic/ClassicControlCenterPanelLayout.swift (30), Classic/ClassicControlCenterPanel.swift (18), Classic/ClassicControlCenterPanelChrome.swift (17). The bar is 30 methods; this is 35 over it, 2.17\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30b19c44a82e9f8f043bb557af8980e556b3a1fd94a399ee68d576b9a839329"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/miAccountsStore.ts: FileTooLong \u2014 1081 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 581 over it, 2.16\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":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd4895b3b28353a932e59f1d0fb3aa9343d9c175b2a9bcbd9d8b689659715de"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: detailDrawers.bindDetailDrawerEvents: FunctionTooLong \u2014 bindDetailDrawerEvents runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"415bba259a5b01e7775e93adc6dd2b906f56680a0da29d7f27c8cddd1b72f764"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DemoHomeProvider.defaultHome: MethodTooLong \u2014 defaultHome runs 211 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 111 over it, 2.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e32364e7b300d09aa017397f381a0d98fe45d90abafed0e68b1988a0212528"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/MenuBarPanelController.swift: FileTooLong \u2014 1040 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MenuBarPanelController (38-1565). The bar is 500 significant lines; this is 540 over it, 2.08\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":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f66aaa7ca1cde31db0583b9d2c7feeb790ffa20b5040e741d0a6e80f33fef281"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: MiIOCryptoAndPacket.swift.cleanMalformedFirmwareJSON: FunctionTooLong \u2014 cleanMalformedFirmwareJSON runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.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":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d8115da715444bc737559099460b41c4c4bf708cadf4aff8f33b771590e81d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/DeviceCardView.swift: FileTooLong \u2014 1028 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: DeviceCardView (4-1489). The bar is 500 significant lines; this is 528 over it, 2.06\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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e4a972098f27bf52747faaa8588671b351ccd866b559b6453a3647ddfa18b70"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/MiCloudProvider.swift: FileTooLong \u2014 1025 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 525 over it, 2.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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d1cb330b8bf80ba90631418164203cfbb151bb4e577897a8d138f0ee74c9bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/detailDrawers.ts: FileTooLong \u2014 1020 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 520 over it, 2.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd9b83ad7a84acffd1e4e9982d0ae78ae9d5ca618b2c5980c10b6463441e752"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeAssistantSynthesizer.synthesize: MethodTooLong \u2014 synthesize runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41acc75e888bc00bfb4c5696c46463a7113879cb5aa43cae669fe7a57819445"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore\u002BBackend.swift: FileTooLong \u2014 1015 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 515 over it, 2.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"08825605e3b18a7426fbb33b5d776ef761fde77755ca97424d472fe948b16c01"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/cloudRefresh.ts: FileTooLong \u2014 1011 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 511 over it, 2.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a4e0557969d94a2646c13b281d58e0e9b31d181087f0a588639fa1a7466cf7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceSynthesizer.synthesize: MethodTooLong \u2014 synthesize runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbacb7d443c71488a2cc5daf34bdf4ac341e6ca2e94cda06d0877b35de02ab8f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classic/ClassicDeviceCardView.swift: FileTooLong \u2014 1006 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: ClassicDeviceCardView (4-1450). The bar is 500 significant lines; this is 506 over it, 2.01\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d22d355a889f976ec28e75a63627911685027ce20200fddf803959947b0578fd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.togglePrimary: MethodTooLong \u2014 togglePrimary runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98\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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"00fac23087de55d06d285ae380f92d8b8e54a38e8f09758b0f970721ee4d3071"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LocalIntentParser: ClassTooLong \u2014 779 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 379 over it, 1.95\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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"d414adf0c2e9c272fc3b67377b605ef04626099955471ddbdecac68d82341d7e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore\u002BAssistant.swift: FileTooLong \u2014 969 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 469 over it, 1.94\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3ee7d8450868f1740eaa4249d2cccc97e3c4b1745a0d11841dd0dd5bd60d26"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/diagnosticsAndScanner.ts: FileTooLong \u2014 955 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 455 over it, 1.91\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":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b38166ba4e9c1157162802e53b82e936dc4c43ef1a6c1cb74ef8253bf8aa4fa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/AssistantCommandBar.swift: FileTooLong \u2014 954 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 454 over it, 1.91\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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4eb56c8b92b28433bb7cd4901ab44fb487e6383428482f76b94336b55d510c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/MiCloudClient.swift: FileTooLong \u2014 947 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 447 over it, 1.89\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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8104a25a9faaa903d8fce44fa87bcbd6fb55de8a8646c3e3242dd8f43ef9c872"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/speechGuard.ts: FileTooLong \u2014 945 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 445 over it, 1.89\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":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc412f1e5c6e65c5984515f4a70c02bde4093fe58a624262c2513d998006157"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: connectionsAndDiagView.renderConnectionsAndDiagSection: FunctionTooLong \u2014 renderConnectionsAndDiagSection runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dbc265c982a6b089168b45461f372fd615f21d2d3706b5f3981d27c390c29fc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: panelKeyboard.handlePanelKey: FunctionTooLong \u2014 handlePanelKey runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87\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":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f1063653aa3b69f0f3379ed6353552dec745d442450090b597fdaf6520e2f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/commandDispatch.ts: FileTooLong \u2014 928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 428 over it, 1.86\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":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec142a6cc0397a830ff35c8f7e3f1399d9de7b45c5b5d62d6920ad4097c8b3f5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: appUrlCommand.executeDirectAskPreset: FunctionTooLong \u2014 executeDirectAskPreset runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"913d012ca681b4791ba179e9a481b21918c804f2c821633c78fdc12d1e2bb7fe"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HomeStore: ClassTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded), 356 methods. The bar is 400 significant lines; this is 334 over it, 1.84\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":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"13268a4a00e1b4cb765e69fd6c7095f120eff40ea06403fddfbdc2be667c0c20"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SmartDevice.statusSubtitle: MethodTooLong \u2014 statusSubtitle runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82\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":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d06c006e061d071b7d91fba6ef63f04d4f97b12437ca36f583056b8ba34b5a1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/dualSourceProvider.ts: FileTooLong \u2014 907 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 407 over it, 1.81\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ac75b45b712c031eb0939427f06171adbe3c85255f694be280fecdbe73ee2f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/settingsViews.ts: FileTooLong \u2014 906 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 406 over it, 1.81\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e1282d654f21644b75ef3f6d8faf28080565b5e7749f3bf4e72b2472f2b906"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: UserHabitMemory: ClassTooLong \u2014 722 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 322 over it, 1.81\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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"e813053284ff2777d736955ad8730a4b540156f8412e7867fd6b476d7524bf39"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore\u002BUndo.swift: FileTooLong \u2014 894 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 394 over it, 1.79\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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2146efbebe7bbe03a26850a1a5d9b28cc0ac11ec245d801ad2bb446c23573402"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classic/ClassicControlCenterPanelChrome.swift: FileTooLong \u2014 892 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 392 over it, 1.78\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9a03ea19d08ac0708dc56280620ffe64a0f85515ddb790be2a001fe77936c94"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: assistant/habits.ts: FileTooLong \u2014 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7baec91e0c9385d4db5d3e1348964b7a717833ad27bdc38ae98847314cce8beb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MiCloudProvider: TooManyMethods \u2014 53 methods. The bar is 30 methods; this is 23 over it, 1.77\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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db99081aa241b41070b9abec69d49cd1dabc4bf2c8588f44c6d10985d08c7a5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: controlFailure.classifyRawError: FunctionTooLong \u2014 classifyRawError runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.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":"windows/src/core/controlFailure.ts"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f68f2ebb5867898c2d052529c29da49f62bc181ec431f49b45ba46e46270c0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MiSessionWriteBlocked: ClassTooLong \u2014 696 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 296 over it, 1.74\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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"28511210226f5880c704125ad8f4148412c214089e11e44c1ede6d5a06195f2c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/ModelIntentResolver.swift: FileTooLong \u2014 854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 354 over it, 1.71\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebfed229a1c0da6f067a34a9c1efdcefb4481b4c28c404d48b606f3edf607790"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LocalIntentParser.parseEnglishCommand: MethodTooLong \u2014 parseEnglishCommand runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a8e2e9d68a376fca106a306cac7d68849b955a46f9b3fd35188b1c902cb195"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: commandDispatch.scheduleEchoReadBack: FunctionTooLong \u2014 scheduleEchoReadBack runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.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":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"821e32c33cb65ed6cb80957f72faf06b5af93a9aa888d0573b3fafb00cdd17a1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OnboardingGuideView: ClassTooLong \u2014 673 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 273 over it, 1.68\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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"947f41eeb61239c53fc80efa62081b576dca7bf8640054113dc657d75cb8e0a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/appLifecycle.ts: FileTooLong \u2014 835 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 335 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eae3db4351becdd3071d637f10aba7111d31f330dbfc65977c7e5869248b420"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/sensorHistoryView.ts: FileTooLong \u2014 832 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 332 over it, 1.66\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2424588d9973dbc9ed4ba1fb7ec71eb1ef73fd8cf9e2e1a2f4db0f3a4d0cc8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: roomOrderEditor.bindRoomOrderEditorEvents: FunctionTooLong \u2014 bindRoomOrderEditorEvents runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e570ebdbbbb170a861e1593636d8469840b9c4cd4e3b481da5b33c2b8992759"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DeviceDeduplicator: ClassTooLong \u2014 662 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 262 over it, 1.66\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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1b0fa71c129c6fdf54de1e2ff810b7791e7de84952ab727b4b6355fb6c5f98"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: commandEffects.inverseCommands: FunctionTooLong \u2014 inverseCommands runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99d843e56a156b4cf41c0355fdfad7c8991fc4b3fce102517c705dc6dfa2da6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.assistantEffect: MethodTooLong \u2014 assistantEffect runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"da21934c6d4cc139eeaac5c9b62b015e4991c94f5e4685a3ca87dd7c0a10ac57"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CameraLiveController: TooManyMethods \u2014 48 methods. The bar is 30 methods; this is 18 over it, 1.60\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"2321611b74e30303eb81f9c363eb5e6ffcf8922c9f71c03a341db2d2ec946676"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: speechGuard.createUrlCommandHostAdapter: FunctionTooLong \u2014 createUrlCommandHostAdapter runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":965}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56e8e4775b5dc05f8b1edfa97f692af4be4382f87b12b57de2fb90960f8d86e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore.swift: FileTooLong \u2014 793 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: HomeStore (85-1287). The bar is 500 significant lines; this is 293 over it, 1.59\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":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee364d77504073296fd633114987441a156fe8e0e345f07bca664c4a626eae9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.handleProviderEvent: MethodTooLong \u2014 handleProviderEvent runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f2e7b01486f5a3bf03d39f5a244666f7ced80a8650972e3076830286ed6997"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: models.deviceStatusSummary: FunctionTooLong \u2014 deviceStatusSummary runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fcaadf7bc2a54b4552fcc0b40ad84c0fb92c363c37aa9c6875585ad48d27997"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/ThemeAndMotion.swift: FileTooLong \u2014 782 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 282 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d93e6c5546272a2b4294fa408ae7536cddf99641e5e9a427d2ee34a113f1d11"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/LocalIntentParser.swift: FileTooLong \u2014 780 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: LocalIntentParser (6-1097). The bar is 500 significant lines; this is 280 over it, 1.56\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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8682eea0828b826ea5ed14b9393e489ad212f672294b4d4053ab5abd143652e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: commandDispatch.applyCommand: FunctionTooLong \u2014 applyCommand runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"549856831959228b9f33386d3abc95b68814821913e3983ee2d0ab032ec9c587"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/CommandIntent.swift: FileTooLong \u2014 768 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 268 over it, 1.54\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b777911c0e46b48943f8b87f131fd0c53d0a319e42055226ac92ae39b338ea0f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MiCloudClient: TooManyMethods \u2014 46 methods. The bar is 30 methods; this is 16 over it, 1.53\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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7b89d10da7c03f82d0b6bfab1a8f9c3f0f41980e2c0df0971ac8e42aa4bcf3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: URLCommandHandler.execute: MethodTooLong \u2014 execute runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\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":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7433c1619bd7cf4254be5ff79b43b246586f58223a708ce28350af67c7316e76"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeProvider.swift: FileTooLong \u2014 751 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 251 over it, 1.50\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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbaf215d50b09dc0c3cdbd5bbc884d53f0cf81fe257366b337ba40c02dbe71b5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/UserHabitMemory.swift: FileTooLong \u2014 750 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: UserHabitMemory (42-1047). The bar is 500 significant lines; this is 250 over it, 1.50\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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"21060958c206ad612c231a2b32d81607368e3ea20cc0cb7ea02d98256eb4e4e1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OnboardingGuideView.step1ConnectionCard: MethodTooLong \u2014 step1ConnectionCard 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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76f28c856653a5c8c2995c84e16129e36f0f738215811fd2b17075acb450a70"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: detailDrawers.bindSpeakerCommandBars: FunctionTooLong \u2014 bindSpeakerCommandBars 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1131}}}],"partialFingerprints":{"codehealthFindingId/v1":"d762b3487c294920ee01dbbd7c5fba9a3107ca80e158fbbd9e7c1075d2a84d49"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsSearch.entries: MethodTooLong \u2014 entries runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsSearch.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"40fbc9afbd1278fe3ab95000ecfd62e287ac9bf468b3298dcb52eaf14468f5e6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MiotCommandMapper.map: MethodTooLong \u2014 map runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f84d985cee38a36b5c1d421f7a2a05b3e8adc4b3bd0506f26163df70d365111"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/optimisticLock.ts: FileTooLong \u2014 738 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 238 over it, 1.48\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":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91da39c488ba70b9f57e69acb36c97f87f6a4c8e850500e51ac34c128271d62"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.executeQuickAction: MethodTooLong \u2014 executeQuickAction runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5bc6f2e8ee2746b823be7c85818a73d4d714159617017ac4855662e427151e9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/HomeStore\u002BControlWrite.swift: FileTooLong \u2014 733 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MiSessionWriteBlocked (70-1038). The bar is 500 significant lines; this is 233 over it, 1.47\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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bdfd17d7671a09600caaaf3ad6433be3d256f098d91a76d7de846383095e039"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/intentExecution.ts: FileTooLong \u2014 733 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 233 over it, 1.47\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"789d86d9c5de08c727ce2da163172f0365443f5905f3e6fadd45ba744927f00b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cloudRefresh.refreshDualSourceDevices: FunctionTooLong \u2014 refreshDualSourceDevices 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":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"f59a80c9903a9039093ada470d3d6d19a5992bf69c9aa809a90378f653028960"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: menuViews.renderContextMenu: FunctionTooLong \u2014 renderContextMenu runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e24d89d95cf9ad241d2829c033849b75829e696bce903b9ac073b34cc1dbf7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/onboardingGuide.ts: FileTooLong \u2014 723 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 223 over it, 1.45\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":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9934e48a7ee62472a307f634d9a4a641e7a6ef8f5e93801ac68499f87f09b9ad"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SensorCardView: ClassTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 178 over it, 1.45\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":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d0ec8d7b74535bf62ae1e1f83c5c1c34b9e011efa57905ca59507bd93d3bcc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.init: MethodTooLong \u2014 init runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f4efdcfefa4a22cf6d28b83b2f689c0b9e8da1fcd61e168da5d0d98fc9afd2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/RaycastSnapshot.swift: FileTooLong \u2014 717 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 217 over it, 1.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c37f4610a22247943b141f7261fda850144621ccdb1669c3bcdc40eec809261"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MiCloudProvider.resolveCameraStream: MethodTooLong \u2014 resolveCameraStream runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"de01282953f755a5add2d7bda3278c9f02f50da61c34a8f3ea45940bd591ba33"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: XiaomiCameraBridge.spawnCS2UDPRelay: MethodTooLong \u2014 spawnCS2UDPRelay runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1335}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a053910a3f1df6e08f69deb7e0dd14f1d513a09fc7f0adebc914abb6a098c9b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/LGWebOSClient.swift: FileTooLong \u2014 701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 201 over it, 1.40\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98418a283aea26d7bd15725b404f4927be01148cc0535dcc7f0027caf4bbede8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HAWebSocketProvider: TooManyMethods \u2014 42 methods. The bar is 30 methods; this is 12 over it, 1.40\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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7cb0563b5151c305d82948dd16e4822825a528f885138d4a02e36f3c933a66"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DemoHomeProvider.applying: MethodTooLong \u2014 applying runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b1f22365dfc777a9d66f2053eee52ec1ae5927f19a9d4938abec13e350a296"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: UserHabitMemory.record: MethodTooLong \u2014 record runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9cd73ff55699414a453fc0ff584ebd62dcd76a35a948d9f66601672bf494a05"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClassicSensorCardView: ClassTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 156 over it, 1.39\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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd2c31ab8b5f34a214e3323dfe66edc9dd24769fed96ed72d5089720ad6bf65"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: sensorHistoryView.renderSensorHistorySection: FunctionTooLong \u2014 renderSensorHistorySection runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0fdae71711915b187516f23ec4757629b7340a7f261d8fc6734b871e989a0b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: settings.loadSettings: FunctionTooLong \u2014 loadSettings runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3e0a97445943632c2608c4ca0d0f2dfdcf5ad7a4353a26c113f0a01766a069"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/DeviceDeduplicator.swift: FileTooLong \u2014 688 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DeviceDeduplicator (42-931). The bar is 500 significant lines; this is 188 over it, 1.38\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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43802bf2b37c2072cf5e559e950a4c4318e8d7b90b9c97d30b8715555efd031"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/settingsSearch.ts: FileTooLong \u2014 686 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 186 over it, 1.37\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":"windows/src/ui/settingsSearch.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc325b2b511cd6e3d4843ab3bf889302e7c2449a4b3564fd47c8b570d90ea66"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: activityStackView.buildActivityFeed: FunctionTooLong \u2014 buildActivityFeed runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"144ce1e2b2b936aa8f9c618f54eaccecb2136c9f9809f86c9217c459d40a5c3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cameraHubs.resolveLiveCameraTarget: FunctionTooLong \u2014 resolveLiveCameraTarget runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f0d36fb540438e0dfcc085a6c860e9f8c6b6c33167803bb5a69001bdb4bd14"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/OnboardingGuideView.swift: FileTooLong \u2014 676 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: OnboardingGuideView (8-961). The bar is 500 significant lines; this is 176 over it, 1.35\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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af50dade4e8805c16607f8eeaec8ec6f1de8664805f86f1743e6d2debec6d17d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HAWebSocketProvider.mapCommandToService: MethodTooLong \u2014 mapCommandToService runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"51618a1609a684ea89c5537cb3edd40f51fd360939dfe449fbd1c20832c85191"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SafetyMonitor.evaluate: MethodTooLong \u2014 evaluate runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b8df44aa7e1abdbabcbb01d7b62ef36def0d810c959763a4c38aba72235f60"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: panelView.renderNotificationStack: FunctionTooLong \u2014 renderNotificationStack runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"194dee351dc229d9c256f7be5313666ecb3d919dcf37fc1369d434469a1962fd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: UserHabitMemory.record: MethodTooLong \u2014 record 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":"windows/src/core/assistant/habits.ts"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"3efcd382343e25bbaa7518226b74a62322a3622c06bd6f0acfff8ac398d12cca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/CameraLiveVideoPlayer.swift: FileTooLong \u2014 643 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 143 over it, 1.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7ba742ffcf24daf143914d6d412a0780e713e6aa8f64bc65594300be83aede4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HotkeyAndNotificationManager: ClassTooLong \u2014 506 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 106 over it, 1.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b2954cb62d102006c4d89c9f63162ad30f6f633bf1f7d18f251909df4f7c4d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.commitManualWrite: MethodTooLong \u2014 commitManualWrite runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"5496ee170efd2da9de346177c16946acd88b9f45c928f61e0b5c83d37341bc17"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/ControlCenterPanel.swift: FileTooLong \u2014 624 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: ControlCenterPanel (6-692). The bar is 500 significant lines; this is 124 over it, 1.25\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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7987609f61762b2908b55d6fea4ff35400c13bfa43e976c2d72c0cbf9cf7fc01"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: assistant/modelIntentResolver.ts: FileTooLong \u2014 620 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: ModelIntentResolver (30-571). The bar is 500 significant lines; this is 120 over it, 1.24\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":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2673b39e983cde3438a26b3b10d900407c1a0face34fdeb77fee77eac0fd3a21"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: UserHabitMemory.topSuggestions: MethodTooLong \u2014 topSuggestions 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":"windows/src/core/assistant/habits.ts"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"1909414d9ff72414b2b64ee201cecde8e79fdab4d50d07839a87037e132b0e90"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HotkeyAndNotificationManager: TooManyMethods \u2014 37 methods. The bar is 30 methods; this is 7 over it, 1.23\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":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49abb72ef1aba2993a342a74ff0162f9a14b3a1e4ad8f3862ca48ad4a3df503"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ModelIntentResolver: TooManyMethods \u2014 37 methods. The bar is 30 methods; this is 7 over it, 1.23\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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8828ddfe43b1c04ed9ce0b6bd6b764a980474c95199de3de8021c9163d5113a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: menubarmijia_windows::main: FunctionTooLong \u2014 menubarmijia_windows::main runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/main.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccce0e69af570b8989472dbad9124d0d838ef81da9607890e7aca37f551009e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: roomOrderEditor.renderRoomOrderEditorModal: FunctionTooLong \u2014 renderRoomOrderEditorModal runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"3914c37d1bf1dc56650d66a7bb107173d4218e5c398a81e2116d499658730542"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PrivacySettingsTab.body: MethodTooLong \u2014 body runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1484}}}],"partialFingerprints":{"codehealthFindingId/v1":"486e6b7886c47ac5990c9f6184f8caaf67659e2e70e9ae33b43d2897e92fadcf"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: demo.demoDevices: FunctionTooLong \u2014 demoDevices runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07c178110dba81e4410340a0af5dfad601bbe7a97f00e79016dcac719d816c2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClassicControlCenterPanel: ClassTooLong \u2014 487 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 87 over it, 1.22\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb4151291f5cf6567306161e11a240b61562ac9751119a8fa001d1140be187c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AutomationSettingsSection: ClassTooLong \u2014 486 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 86 over it, 1.22\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":"Sources/MenuBarMijiaApp/AutomationSettingsSection.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"e40799fbf07d39b518a6101ffee45ced102b8487409143e58fbd6f081a51e4ac"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuMijiaWindowsApp.performUndo: MethodTooLong \u2014 performUndo runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d2670f9908943eb91fb247c0070c8344c879e11ce0c23c346600843a6139fe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceCardView.contextMenuItems: MethodTooLong \u2014 contextMenuItems runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0447155143b069adcf8a2300928893f14f7a3d461f191d845e74b9f7ae56379"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.runAssistantCommand: MethodTooLong \u2014 runAssistantCommand runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb95b32d3bd87f90faaa300afb035e7872ef43630ab73f591fd6b8dda934c85"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cloudRefresh.refreshMultiAccountXiaomiDevices: FunctionTooLong \u2014 refreshMultiAccountXiaomiDevices runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc140d0fe3e310a9d37611060d8080c58a05dc616eee41afef2019fa40f3d3b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: miAccountsStore.mergeMiAccountSnapshots: FunctionTooLong \u2014 mergeMiAccountSnapshots runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f354c7ad27bdbfe77edf30d2e115ae33e83b9b1e65d4cc76cc05fcb087b5e7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/MiIOCryptoAndPacket.swift: FileTooLong \u2014 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.18\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8d5fe128cba5e03f389a53eb81ae0aff3a66c4ebf237e7be24dcf5e1ff0969"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuMijiaWindowsApp.bindOpenAnimation: MethodTooLong \u2014 bindOpenAnimation 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":"windows/src/ui/app.ts"},"region":{"startLine":1561}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28861ce746e438bdfe47d1527d296eb7eb7179f867f36b952a154f3d8e7d4b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/CameraLivePanelPTZ.swift: FileTooLong \u2014 583 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 83 over it, 1.17\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"172230c5fafaa4bda60a258fd1d1e4e0a7fc1529413fecc397ab80faaf67d743"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/energySettingsView.ts: FileTooLong \u2014 583 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 83 over it, 1.17\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"87cb98b7c5769aeb4f9f056d7b3f2408c20759c8cb32cef1ba9ebc15de1d14eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/SensorCardView.swift: FileTooLong \u2014 580 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SensorCardView (7-828). The bar is 500 significant lines; this is 80 over it, 1.16\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":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f846d01d4db14d36371da42742fea690bd957e543fc3b6211719e05d5b03d5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classic/ClassicControlCenterPanelLayout.swift: FileTooLong \u2014 578 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 78 over it, 1.16\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"27247536dc9b48c26c1a0f6d05ad5add9e1a335a391c2140c9b233ab63a10eb2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ControlCenterPanel: ClassTooLong \u2014 461 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 61 over it, 1.15\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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"af4f2bcc1e95c2cbba5b704940fb32d9d7309701bd958e31b5bca52a4ace9e5f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClassicDeviceCardView.contextMenuItems: MethodTooLong \u2014 contextMenuItems runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e1727b27513d6c14b34cd49faaeae4444a98377415392ed84e60a55dcf32ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: menubarmijia_windows::update::install_update: FunctionTooLong \u2014 menubarmijia_windows::update::install_update runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"11683c11354492a851061d20852274e1e1b291462d06e957a2c7b8e51629884e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: intent.parseChineseDeviceCommand: FunctionTooLong \u2014 parseChineseDeviceCommand runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28c69fd7bb565ff90d9495eacc72e02d9602036820243b0999fcc03dae4b060"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: haDomains.buildSingleHAFacet: FunctionTooLong \u2014 buildSingleHAFacet runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"11bfd7b9548caeacb31849d47b7d69749fff5c763002c21be27b97b50a832278"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: homeAssistant.haServiceCall: FunctionTooLong \u2014 haServiceCall runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"7760920ef2d644a3940534a39f88f680cf847d7ebdf904e519be6ccbb14aba2f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/raycastSnapshot.ts: FileTooLong \u2014 564 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 64 over it, 1.13\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":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fa084c12ffeeeed2b179ff233d9aff088d17c12d8e692fbf98a876e7680695"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.executeIntentPlan: MethodTooLong \u2014 executeIntentPlan runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a971f6ddb1a341ea99e58a5aba26653207fe55cbe82183bcf918817b7bf131b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LocalIntentParser.parseDeviceCommand: MethodTooLong \u2014 parseDeviceCommand runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf53fbd27e6c66c37ba4601739c879d1510ed14c5b2db9e2c7441245103b843"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/ControlCenterPanelChrome.swift: FileTooLong \u2014 559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 59 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":"Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4cd86e84ccaffc0c51698ecb8bb88310ee8cc89e8facbe5148cae2dbad250e0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classic/ClassicSensorCardView.swift: FileTooLong \u2014 558 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: ClassicSensorCardView (7-798). The bar is 500 significant lines; this is 58 over it, 1.12\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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ee7239a5cc571a74cd2d4765ed4d0c4e0f137b28e18fa34b8b0f10d47ef9a1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/companion.rs: FileTooLong \u2014 554 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 39 free functions. The bar is 500 significant lines; this is 54 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5afe58cbe94e61c503d2d27b48f6fabc970f0a06028ffd1ebb71a776922f891"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceDeduplicator.capabilityScore: MethodTooLong \u2014 capabilityScore runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"6467c71286f47ae4d39d7747377a36a198fdc83a8e8c9fa1360f36477eff40f7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: connectionsAndDiagView.performSignOutSingleMiAccountOnHost: FunctionTooLong \u2014 performSignOutSingleMiAccountOnHost runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ec2705386f41165c979c7c6bada76ad13ed70159538bb08ee714ac81aaedab"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CameraLivePanelView: ClassTooLong \u2014 437 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 37 over it, 1.09\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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"573cf3c6b8c077ceefbec84604f43bac7ec2b2712bd97a67833c00f9e8228d63"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ConnectionSettingsTab.body: MethodTooLong \u2014 body runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3838141d2ad28bbc7bc444f4b52fd6466699a8ddac743a2c5a5aed79127f384"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.undoTurnAllOff: MethodTooLong \u2014 undoTurnAllOff runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab77c2c9e96386f0f07c5616ab35f0d6c3200fc5a340b37a27a4999a05ac0600"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.applyUndoCommands: MethodTooLong \u2014 applyUndoCommands runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9c3b5c34cb9be1a4ae53f6929e5768feded32a7e452377de4e5d11ada372f03"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: commandDispatch.scheduleEchoReadBack.executeSingleDeviceReadBack: FunctionTooLong \u2014 scheduleEchoReadBack.executeSingleDeviceReadBack runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"b269668e1e81d6cc0c25b4ec7ca9a1e184d6191d4fd66a75f665695a98581f7f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AssistantSettingsSection.body: MethodTooLong \u2014 body runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3dfec51a81b8defacb1cbf8b2ad0ebfc1f3f5b32acc2a607000df8c55969d44"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: search-devices.DeviceItem: FunctionTooLong \u2014 DeviceItem runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-devices.tsx"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb08bf9014e07124cf9bdfb53ff90d2f1948a733dc9a49764abcae45e38767f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: raycastSnapshot.buildRaycastSnapshot: FunctionTooLong \u2014 buildRaycastSnapshot runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a63a6cfabbb841237233ca7638bed99530935854499a9a5ac8226631f825921"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/panelPrefs.ts: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ef0f128c33821686a07144a94b7b4f6c67bce7cebe0001665cf4612fa164a12"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/window.rs: FileTooLong \u2014 536 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 45 free functions. The bar is 500 significant lines; this is 36 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":"windows/src-tauri/src/window.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1053d6a883bd1f9d3f8728cfd5cbeb95783c5b26ab2d46d54f37f5c19fab6f5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/panelView.ts: FileTooLong \u2014 535 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 35 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":"windows/src/ui/panelView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa46bfb2218d8ed80ae93e665900917b751ad2a3f7cf2445d988251079c7b013"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/roomOrderEditor.ts: FileTooLong \u2014 535 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 35 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":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4875dc450818a433bd28c45e14ed81f087ab3f175a1e0e626f9b744f1bea3575"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CameraLivePanelView.viewportContent: MethodTooLong \u2014 viewportContent 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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f29f4ec757142900ef68d2686b498875b35a9c147847a5e9c1a3d5a9e7b15e4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClassicDeviceCardView.headerRow: MethodTooLong \u2014 headerRow 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a0b56efcbb4833a3b7afcd3670f5f30e1954b00bf6b0dea46ecb5efe869eda"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MjpegStreamReader.spawn: MethodTooLong \u2014 spawn runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d127189e1f71a669ce38e69436e099568e9cfccd120179cbfa42412d68de476"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MiCloudClient: ClassTooLong \u2014 426 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 26 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc6919e7882c2db3efefea8d3a14ad145c8039474707429c1aff1f1344ef1e1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: miCloud/client.ts: FileTooLong \u2014 532 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: MiCloudClient (150-730). The bar is 500 significant lines; this is 32 over it, 1.06\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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de56eb104dfc590c4a39e25201eae4378435008509bd60749bc166e228edf7d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: scripts/verify-flyout-layout.mjs: FileTooLong \u2014 530 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 30 over it, 1.06\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":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f596e4265d074cd995cbdee660fe3e660c6720135a99f3358b4a6d549821c17"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AssistantSettingsSection.privacySection: MethodTooLong \u2014 privacySection runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d126a3a2e3a76646a970294dfa76a0ed09ffb0ac440107444b12eb4ab2c7ffc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HAFacetEngine.control: MethodTooLong \u2014 control runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HAFacets.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e9a998e27650f8b1b627d1406640ac3b0c7eac4fdb24a7510d4ce41b13fb40d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/SensorHistory.swift: FileTooLong \u2014 529 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: SensorHistory (259-737). The bar is 500 significant lines; this is 29 over it, 1.06\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":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2932c369e9290cbf846f4a97507796e09b7ce73e5b14e271de5fc9ecec3a37"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/DeviceFacetViews.swift: FileTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 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":"Sources/MenuBarMijiaApp/DeviceFacetViews.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1c6bba2e8aa1779b984f3a932d9e591d67c5720a67c59d12dfa1a992fdc1c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MiCloud/MiotFacets.swift: FileTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: MiotFacetEngine (281-768). The bar is 500 significant lines; this is 26 over it, 1.05\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":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f142d3353f102574fe0443498706e01f4f437e8796a8e9a8f04c3d6ed8cad3f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: core/energyHistory.ts: FileTooLong \u2014 522 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1cb2dede589bd61816ac8920670747ac8e86028a19dac71631231f669dbb371"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OnboardingGuideView.advancedAIModelCard: MethodTooLong \u2014 advancedAIModelCard 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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c52f382f6670ec8f235676695bf7fe4dd306c25fbfe69ff857998d11043faca"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: facetViews.row: FunctionTooLong \u2014 row 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":"windows/src/ui/facetViews.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"74b5f6f37fb8a08fce7be7b0fb3638e46fc0246f9ba4d5ab2daf15f29f5d5553"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/DemoHomeProvider.swift: FileTooLong \u2014 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"722dc7d62ec921e943a834785a628fa4ec12777b8b3640463454bca628c23ab4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HADiscovery: ClassTooLong \u2014 413 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 13 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":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"567684638a4d8021cc44ba9d3856d3bfc03dec03bc4b0733903a050b4833ae4f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ModelIntentResolver: ClassTooLong \u2014 413 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 13 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":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"da036bb4218b89166e4ea61a93e87c0faab309225e29f25f45d0ff076336284d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: IntentCatalog.init: MethodTooLong \u2014 init runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a6f28b6eb38b670dcec1568935040ebce78011095b3fdbb61316694c25cbe3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeStore.buildRaycastSnapshot: MethodTooLong \u2014 buildRaycastSnapshot runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"186183982db6d49d8eee0fb2cb23bf92fc211601e132040c7fff5dfc92c935e0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/HotkeyAndNotificationManager.swift: FileTooLong \u2014 513 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: HotkeyAndNotificationManager (9-788). The bar is 500 significant lines; this is 13 over it, 1.03\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":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efb58e7251e34b1b9f10ae89e2c858638fa1bb3c435445a7e8b4c7758c9740e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MijiaCore/AutomationRule.swift: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AutomationRule.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d744c596241a752d0cb67e0c99f9f434ccd6560877644e7c2e98a33ec1e0a14"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DeviceCardView.headerRow: MethodTooLong \u2014 headerRow 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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"e844d5e628a812da29ab3144dde3279d1869d244b1cc2d07ae33df1802058e4c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ModelIntentResolver.planFromSystemOne: MethodTooLong \u2014 planFromSystemOne 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":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"eddfdbfda30221800bd2580558e6ece6b4f8074003258e54909a83dbdcea304a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBarMijiaApp/ControlCenterPanelLayout.swift: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd35af88f86da02aab7a05595bb3854cfc929b1f82d37aca710dfedd14387816"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Classic/ClassicControlCenterPanel.swift: FileTooLong \u2014 505 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ClassicControlCenterPanel (6-734). The bar is 500 significant lines; this is 5 over it, 1.01\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6245b0a77a905340b699339c7eb3b4e9858952a3374aa0e0252c07804718a6bb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SmartDevice.mergingOptimisticFields: MethodTooLong \u2014 mergingOptimisticFields 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":"Sources/MijiaCore/OptimisticField.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"768c68b385371dcfd496b708394120201ea8207f12c1cc9c31eca18957b4a67d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 16 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:360-456 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:479-619 | Sources/MenuBarMijiaApp/DeviceCardView.swift:538-669 \u2014 These 3 members are variants of one another: a block of 16 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de9844c4b3047968ee6e61654c26cd0cb91b0f3501a240c14558d93fd0f52e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (163 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:190-356 | Sources/MenuBarMijiaApp/DeviceCardView.swift:246-420 \u2014 These two members are variants of one another: 163 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"cad5716a84e7e33ff1c85cebd5c8964b253b853f5ea857df2777543f3980b5df"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (92 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:810-935 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:442-569 \u2014 These two members are variants of one another: 92 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95b923d81e1a8f8d3590b2c99ad45ea10595b9fa8698232bc94da3ee703a97a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (67 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1258-1354 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1225-1321 \u2014 These two members are variants of one another: 67 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd6fe85fad6ea725e5f5a88a35b3056dc1da7582f34f7d07ab50d686c2aa18a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (63 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:377-452 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:257-332 \u2014 These two members are variants of one another: 63 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc881b935bd55eedc1d5b7f5634719799b22505cb051d0c532991d66fd9e036"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (62 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:784-860 | Sources/MenuBarMijiaApp/DeviceCardView.swift:751-827 \u2014 These two members are variants of one another: 62 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ed38d052c73c47c043b5db6a98fc4eab921bcaff489c670cef0e3c9d272468f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (57 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1364-1449 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1331-1416 \u2014 These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0824fa9b0aa94e7f9f26b4da3bfc7fbf438dd90cb344370294bdaf66a1851a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (56 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:864-934 | Sources/MenuBarMijiaApp/DeviceCardView.swift:831-901 \u2014 These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"922b555a74352dedb1bc1388e4311d98ae17010bbaca1bbeb2714a25079ba0a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (50 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:7-75 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1420-1488 \u2014 These two members are variants of one another: 50 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cd767e3f803545ecb07f513c2cc3a3118da51fb260212216f2b4f8d29976d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (47 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:768-847 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:675-779 \u2014 These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":768}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f5af0fe27cc3f00ac241375e10f4f453340c4bc1b47dddeb2f6d09ec591028c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (39 shared lines): Sources/MijiaCore/HomeStore\u002BUndo.swift:115-309 | Sources/MijiaCore/HomeStore\u002BUndo.swift:423-525 \u2014 These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"cafb94c7a1be60f99dca1b383a1ae84678da276a0a317225f2f35636c396d46c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (32 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:315-408 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:686-762 \u2014 These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aaf9ae5fe41249eedc2e2313c04901040ea64346c98d8f4f10c8f7a1a3d1634"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (24 shared lines): Sources/MenuBarMijiaApp/MiAccountSection.swift:212-282 | Sources/MenuBarMijiaApp/MiAccountSection.swift:286-355 \u2014 These two members are variants of one another: 24 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MiAccountSection.swift"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"364f65d0cb7cc08417277696eb93baff8683259ff6ed1cc2e3766739c80b1f9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (18 shared lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1228-1254 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1195-1221 \u2014 These two members are variants of one another: 18 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eed3af4e490251cdde4e926b53435693787b165a41076c7b52969d8fb0c65d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:106-130 | Sources/MenuBarMijiaApp/DeviceCardView.swift:130-154 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"177d1a0eb636d4557ecf1bba23e398216a892758f023a424ed835e21aef104d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Sources/MijiaCore/AssistantSchedule.swift:138-156 | Sources/MijiaCore/LocalIntentParser.swift:654-672 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantSchedule.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8dcc26290995115b63e054e7d151030f402b7d0e68cc0130461e5b1477e281f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:87-151 | Sources/MenuBarMijiaApp/DeviceLayout.swift:332-362 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e211d06c698cbe398723b5d48eb7950b609e8938495a2e6582d4b5dc109b3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:282-294 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:292-304 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10ebc06d2166e7c77c7b54161990039a3fd10297a9600aa26fb929097b1cfff"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Sources/MijiaCore/CommandIntent.swift:544-560 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:336-352 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:354-364 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:366-377 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:426-435 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae8a6b7592edf42a17685b68579d72057da00d0877ea6b5dda6f8ffafcbfe19"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:263-289 | Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:300-321 | Sources/MenuBarMijiaApp/SensorCardView.swift:296-322 | Sources/MenuBarMijiaApp/SensorCardView.swift:333-354 \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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed912747b8fd1e82504ac5d95bc7beb46bd80aa25a9c4d9062c64beccef764a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Sources/MijiaCore/ModelIntentResolver.swift:242-267 | Sources/MijiaCore/ModelIntentResolver.swift:269-365 | Sources/MijiaCore/ModelIntentResolver.swift:367-403 | Sources/MijiaCore/ModelIntentResolver.swift:405-436 \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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b683ce26b9852b8f28095e00b461cb462d2be890b9d656540b39f04230b158d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (102 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:938-1039 | Sources/MenuBarMijiaApp/DeviceCardView.swift:905-1006 \u2014 These two members are one piece of code written twice and then edited apart: 102 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"97840d5c8cf4046f55fb82f4f47fe1ab25ebe070eb51c28fbc991db5e4df29e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (105 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:542-646 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:497-602 \u2014 These two members are one piece of code written twice and then edited apart: 105 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"db3dec14a399c549d3f6f628c37f0b251614dcad0b7ee25ebe14fd3a524f5325"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (72 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:129-200 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:123-195 \u2014 These two members are one piece of code written twice and then edited apart: 72 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"268612726710036f6b06493ded5890590ad670522ed0b5b54e67d14ef2fd2ca8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (65 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:89-163 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:90-154 \u2014 These two members are one piece of code written twice and then edited apart: 65 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"441a2ada5628df9dba66d9adf9742ad0af4ded9d54220528c83beb2b62811da2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:972-1023 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:606-657 \u2014 These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ac5f4b16aec54151b0f8d3030a3cc9802b2e6132bda7daf6749b4eedb11537"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (56 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:724-779 | Sources/MenuBarMijiaApp/CoverDetailDrawer.swift:208-263 \u2014 These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"913cd0d8090a3da3861c437dc0f83d27c9574542c8506d8f26dc13e3f991e1e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:55-98 | Sources/MenuBarMijiaApp/PanelDesign.swift:280-324 \u2014 These two members are one piece of code written twice and then edited apart: 44 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":"Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ce784323fca4201c34139ab32ca11768b96a3f173ccf00893fafcb15f3673d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:688-732 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:644-690 \u2014 These two members are one piece of code written twice and then edited apart: 45 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"037e06b7ee98df698602bb6a5a1c149f2c0299b5689fb99f6b07eca167bd7fae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): windows/src-tauri/src/window.rs:500-525 | windows/src-tauri/src/window.rs:528-553 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/window.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6815dfdd795b5f99d15924477deb508c83570b3c3557ef7c3f01e1e750bfee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:85-124 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:79-118 \u2014 These two members are one piece of code written twice and then edited apart: 40 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"63228b6adb5837a2bc08eac74a89ede7213e52c61559cbfd8b1d7eba32491cbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:42-77 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:42-77 \u2014 These two members are one piece of code written twice and then edited apart: 36 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df81324c4a09b128ce384b6d9ea21324f9c080f99b3067fbb07668d33092d86"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift:452-477 | Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift:479-504 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"617036fee7d5d2a06b1e8e5d207bee9933cc2e7d3b68a93407b00ae68159225b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (43 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:335-377 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:391-433 \u2014 These two members are one piece of code written twice and then edited apart: 43 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"de64fc1787cd73bef082e4403b75e47c56e135ceb14d291129a802b54f7b7469"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:8-40 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:8-40 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bb861cbca2328d8b9428cd528ba57298f8ff88f17deb3f831addec594d30ccf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:159-206 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:228-273 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"7275a94a4eea5a4056a8d663d6d5873edc2bf8e2d4e2d5937092c55e5e8a7773"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:141-178 | Sources/MenuBarMijiaApp/SensorCardView.swift:171-211 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"349979bc9ce1062906069859769631e66ed887c1ee801826525c6c1ac1259b7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1126-1165 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1093-1132 \u2014 These two members are one piece of code written twice and then edited apart: 40 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"30b3cead9f477b252bc7beee014e4062f472f3ed37f971a5382678018c348a9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift:20-57 | Sources/MenuBarMijiaApp/DeviceLayout.swift:665-694 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"e240acba0f1ad0c960039f6de9aa3ac779481140e061d096f079b0de0439fe96"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Sources/MijiaCore/RaycastControls.swift:489-513 | Sources/MijiaCore/RaycastControls.swift:517-542 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2cb5941ecef2ef6aff817b7184bc16306d7fdfdc419627ec2aab0967343de56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:940-969 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:574-603 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b36e5a6f08e0741c22709f5d58c841989f8d9d5fdfb342c16c628e1409d4ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:50-85 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:50-86 \u2014 These two members are one piece of code written twice and then edited apart: 36 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c97d97cda88d20574c3019639206cfe7a4004273fd42fdd23f86207ace28a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:672-722 | Sources/MenuBarMijiaApp/DeviceCardView.swift:691-747 \u2014 These two members are one piece of code written twice and then edited apart: 51 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5596cc4ecf7d48a254e41285c2dc5484053fd5e3004433197139f7107a4c5d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Sources/MenuBarMijiaApp/AssistantCommandBar.swift:498-527 | Sources/MenuBarMijiaApp/AssistantCommandBar.swift:530-558 \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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f41fda1822e7ca158222f0816dc376c662bf7c869b3cf76360ee226ec4f713"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Sources/MijiaCore/MiCloud/MiCloudClient.swift:491-513 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:518-540 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d02bc03da79074b33ec757a17d5d7b01e07ce84685484d51c339af10088c6c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:472-494 | Sources/MijiaCore/HomeStore\u002BControls.swift:754-775 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"d43b3fe231d3022e6b0e3e892eeae70c7970c9b0f509f52f49101fb06298b5f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Sources/MenuBarMijiaApp/ClimatePanelModule.swift:158-177 | Sources/MenuBarMijiaApp/SmallDeviceTile.swift:20-39 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ClimatePanelModule.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"b11bd76c25e29e22ce2bcc25973faa3cb693ed92d8a47c1ec99e14fdb8c07adc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:309-336 | Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:338-364 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"c209d0978ef76d8eb6bfe17b44e6aa3a54eb16d87ca49a2b0cd015e049aa087b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Sources/MijiaCore/ModelIntentResolver.swift:116-152 | Sources/MijiaCore/ModelIntentResolver.swift:157-175 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6059581ef7c6eaa28f7c89e5f4cee484abb8fa1f5b70e357c92cd314d1691b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:261-280 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:271-290 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b851c7825b2f03a42578a818bb60abcf89d5a9ade2f4c24c54808ec60a44e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:657-671 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:535-549 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"a873f58223ab1c14d709555ba5fc5d3b0d9ad03853b29cbd1c3fb0953ae0ee6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:189-207 | Sources/MenuBarMijiaApp/DeviceLayout.swift:442-460 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2868f8b11841c695473f13d7f973f9f6f72fcfbee356700313d49561a80510a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:205-222 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:215-232 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"373d6b6146b2470a46eb4efa8ed2583af52be9758b4813786226960b4e3d46b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Sources/MenuBarMijiaApp/OnboardingGuideView.swift:911-928 | Sources/MenuBarMijiaApp/OnboardingGuideView.swift:930-960 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd39a1673ebed1fb72912612ae5e81575b86e6a6d9e55b2f1e15262d1c4c6b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:216-228 | Sources/MenuBarMijiaApp/DeviceLayout.swift:469-481 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdf9336c04d46eb9c1d54193b3b7893ab4b3fb0490e9425ad1bbef7366d2783"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 18\u002B corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:422-445 | Sources/MijiaCore/HomeStore\u002BControls.swift:447-470 | Sources/MijiaCore/HomeStore\u002BControls.swift:496-516 | Sources/MijiaCore/HomeStore\u002BControls.swift:684-701 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"21332db806b8361c182f53cb7a5d5d5909491f0ee108713072a45f13e98896a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:518-539 | Sources/MijiaCore/HomeStore\u002BControls.swift:703-719 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e6b0e77bf5b957c3d9bcda4c7513d70dda5742eb2cc999fbb22ac0ca4d237b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:134-153 | Sources/MenuBarMijiaApp/DeviceCardView.swift:156-184 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc6a8bd0b1a5e16f70d05cc2f1eda116aa7ed08ad465d740288e5f33d4b3471"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/MenuBarMijiaApp/ThemeAndMotion.swift:550-564 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:568-582 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"57cd1fd57aabf0959f7f44af0e2104f256e1a121d2662f671fbff8f047fbca24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Sources/MijiaCore/AssistantConfig.swift:570-593 | Sources/MijiaCore/KeychainAndPrefs.swift:54-82 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc20bdc26f25ccbd84892a7690f0a618330a67d31680638aba6a13ac018d7bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:1309-1331 | Sources/MijiaCore/HomeStore\u002BControls.swift:1333-1352 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"d058c978f7ef4314b72837a16d61cfce460161c31797fad81469f654bd1b03a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:179-206 | Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:211-242 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"73d405dc978792b09635a5160010756d7328af075f3f6c4eb556b7de0273f00d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:86-110 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:99-116 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c764bb019bafdf3f8cf1d2ce1b3288e17763b645a9e7af86c23a676fe712a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:684-697 | Sources/MenuBarMijiaApp/SensorCardView.swift:717-732 \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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a6e3f7700c789476ddeb776cfcd8914a380a14d406c23dcb14263a23c18f1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift:34-48 | Sources/MenuBarMijiaApp/StackedCardGeometry.swift:48-64 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab64fd68795dfbe47e28181f81725a5067fa9bcf0824da2243878be4df4e3561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:393-405 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:805-816 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1567db05e40a7ea42bf57773769510380761d994f5a15d38159f9409dff1a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:543-564 | Sources/MijiaCore/HomeStore\u002BControls.swift:646-662 | Sources/MijiaCore/HomeStore\u002BControls.swift:1143-1159 | Sources/MijiaCore/HomeStore\u002BControls.swift:1425-1441 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3a09ba506691bf2cab584a28a60272e425e9e54eb987e209063923eb46ba32"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Sources/MijiaCore/RaycastControls.swift:631-641 | Sources/MijiaCore/RaycastControls.swift:643-654 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4b508be006e78ad8bea654242b66a95eec5277314ac129b5c4c80a67da58ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): Sources/MijiaCore/HomeStore\u002BControls.swift:595-613 | Sources/MijiaCore/HomeStore\u002BControls.swift:1125-1141 | Sources/MijiaCore/HomeStore\u002BControls.swift:1271-1288 | Sources/MijiaCore/HomeStore\u002BControls.swift:1407-1423 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"982f96df445a8475726d5a949b91de18c0091372df9baadce5e65b7cee9f115e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MijiaCore/LocalIntentParser.swift:209-226 | Sources/MijiaCore/LocalIntentParser.swift:228-240 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"5120726615c5bfff06217c36c52af18d6306e3db832af78458fcffaeecb5f8d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Sources/MijiaCore/Models.swift:152-182 | Sources/MijiaCore/Models.swift:990-1016 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef3cbbcf32daba33913e613f8bc9a32b690b1c8aed3c4329769b790b754919c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): windows/src-tauri/src/camera.rs:928-952 | windows/src-tauri/src/camera.rs:954-974 \u2014 These two members are one piece of code written twice and then edited apart: 21 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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e01956c12b5325cf7c33e6a9166893fd7ecc77c3292830479446652bc84776"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:8-21 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:8-21 \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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a8f31aa69d2bc806a4f2e22c0a530daa2e5167d1ac70b7724ded9989bb32967"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1233-1246 | Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1248-1262 \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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"a90e37eb0f7fae21351b89e7ee2ceebbf1ac9114a742de5449aa71c55058ba09"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MijiaCore/AutomationRule.swift:266-280 | Sources/MijiaCore/AutomationRule.swift:519-531 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AutomationRule.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"6789b09753ead27e54fb0c1e792aba6e16cda4a8322e661818998ef8647e437b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): Sources/MijiaCore/DeviceSynthesizer.swift:69-93 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:21-35 | Sources/MijiaCore/Models.swift:305-333 | Sources/MijiaCore/Models.swift:718-744 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3bb4651e362f32fedd07187a4293a5c7dcf945c93cd84cb1f80ce06af5945bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MijiaCore/MiCloud/CameraLensCatalog.swift:47-60 | Sources/MijiaCore/MiCloud/MiotFacets.swift:718-729 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/CameraLensCatalog.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f437f4ced6b002bb66230680e13ccd6f9ca8aa76a549bfbba0b60d22261e877"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Sources/MenuBarMijiaApp/DeviceLayout.swift:159-167 | Sources/MenuBarMijiaApp/DeviceLayout.swift:562-570 | Sources/MijiaCore/BareCategoryCommand.swift:59-69 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e7050afba142b1df5ca01eb8f4dace7fcb5e22930acda49384d61a11e12562b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Sources/MijiaCore/AppLocalization.swift:684-699 | Sources/MijiaCore/AppLocalization.swift:701-718 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AppLocalization.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c25dbf82dc3de9d1a5c70f3e44c9b84bf772c72cc84a7f4e0a8f04d34fd920"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelActivities.swift:5-22 | Sources/MenuBarMijiaApp/ControlCenterPanelActivities.swift:72-88 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelActivities.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"857bcd5e1130d2ff91ea06a007d2e9cc39f3d205cf810986537d0b51645c2915"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): windows/src-tauri/src/desktop_shell.rs:245-260 | windows/src-tauri/src/update.rs:520-534 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/desktop_shell.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"d606e6e5c420c05014353301bfb46e83e6494991715557610f69a7c264c6c2e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:621-632 | Sources/MenuBarMijiaApp/SmallDeviceTile.swift:47-58 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e222107e6acacefe9fc6145c3e87b58f7f08f887dd9b31183639c4c5a84833"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/MijiaCore/AssistantConfig.swift:481-494 | Sources/MijiaCore/AssistantConfig.swift:497-513 \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":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"558c094dfdfcf35387c9e421d5a5e4b55e7a3195f1f3e23dcc30337bb97e5797"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Sources/MijiaCore/SensorHistory.swift:37-53 | Sources/MijiaCore/SensorHistory.swift:72-88 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e35e898a6815131c6e2fb06cb58763bb1c2ee0b57ba2c88f9f9575514fd6aea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:741-749 | Sources/MenuBarMijiaApp/SensorCardView.swift:763-773 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0063564149e954c27709fb96219684d3d53095b6f035ddaf71d62678fc425c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MenuBarMijiaApp/MenuBarPanelController.swift:1212-1228 | Sources/MenuBarMijiaApp/MenuBarPanelController.swift:1230-1241 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b662a600e5395904c41ec8cbef93189dca9eb216196b25c1080f27149a7946"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): windows/src-tauri/src/network.rs:438-446 | windows/src-tauri/src/window.rs:435-441 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"b310802a5c10129c32ea2d25dd6adcda1429404fead8c6a83d58efcdb6433ea5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Sources/MijiaCore/AutomationRule.swift:707-716 | Sources/MijiaCore/CameraPTZClient.swift:246-254 | Sources/MijiaCore/UserHabitMemory.swift:142-150 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AutomationRule.swift"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3dd18040aec0b2fad9fcf4979dacb19548aa421533db48187c5b9630ca8cb54"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Sources/MenuBarMijiaApp/AppIntents.swift:54-66 | Sources/MenuBarMijiaApp/AppIntents.swift:104-113 | Sources/MenuBarMijiaApp/AppIntents.swift:149-160 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AppIntents.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fd701ebe0685b4dd679360aa3cff8db782a2f205098b29e9b3ae0f4aaa5982"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/MijiaCore/HomeStore\u002BControlWrite.swift:270-283 | Sources/MijiaCore/HomeStore\u002BControlWrite.swift:286-300 \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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ac7efdcba17d3cc861dc840408d556e8813424eabec7f9d82916a22023e3aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift:258-265 | Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift:267-276 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"3690b7e4c34e572f41a933ea88bd2b1acc0fb021500fb8332090e6dccb23aa66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:686-695 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:562-571 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf3bfb52e563b6ef43875c4d2a5bcd9daf3d6e12dbc970c837ec1f23cb30d7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): windows/src-tauri/src/companion.rs:719-727 | windows/src-tauri/src/desktop_shell.rs:45-53 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d65ac73bb45b37e53503d1a22cc1e0a6f929a3e3c57d805818c8762be7bef8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:731-740 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:588-596 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:619-628 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ecc3352b7c492ce0ffb9cfe6b63105d8584f8b1664da31ea77f4efe0fe21fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift:664-675 | Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift:682-694 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0a792f1a15c59b7b2b68ca0f244082b940dfb191d1b160d92fa846c23209c5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Sources/MijiaCore/AssistantConfig.swift:337-346 | Sources/MijiaCore/AssistantConfig.swift:348-363 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3384a93c4fa281725e26be93400b240cfdf4950e456788f471cb6be80e8a382"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Sources/MijiaCore/UpdateManifest.swift:90-96 | scripts/sign_update.swift:92-98 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateManifest.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e6addba705d8b9830616ec2c0f61d71f6cb57709e8740312a326f50b804b315"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MenuBarMijiaApp/CameraLivePanelController.swift:1323-1334 | Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift:211-223 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ff7bf9cff201518ce0083021c36a368a3c067f196c3bc164e835f5c5733811"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/MijiaCore/AppLocalization.swift:378-386 | Sources/MijiaCore/AppLocalization.swift:388-396 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AppLocalization.swift"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"b355a00663c0579ed5d9f87c217102b6f1baef30661ac48c5b1f41fd5a7f2b69"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MijiaCore/LGWebOSClient.swift:452-463 | Sources/MijiaCore/LGWebOSClient.swift:465-477 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"8265dab3beebedb7c8bfe4591d6b91ffa58f09c54d352ea58b3d201eb7710eec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MenuBarMijiaApp/ThemeAndMotion.swift:307-318 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:323-334 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"478eafb43b00573163ac7d0a67dbee7a21b4f41700d44861e100332e917bd9ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/MijiaCore/CommandIntent.swift:963-974 | Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1056-1072 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e017110dd28fd5062e4bddd0c26c331e8f554837d6a9ac530843ddc85afb06a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MijiaCore/HomeStore\u002BControlWrite.swift:723-730 | Sources/MijiaCore/HomeStore\u002BControlWrite.swift:732-740 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3c4a9b628977bd9a2314439774eac7bb98782021c32d206676e6dd37dbf666"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:649-652 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:527-530 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"73998dae0de1aa663642ad9c4cf97b125b51a5715b8eb0c9367056969f481f03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Sources/MenuBarMijiaApp/MacContextObserver.swift:165-175 | Sources/MenuBarMijiaApp/MacContextObserver.swift:233-243 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MacContextObserver.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5c032080fdf77dbfd0123c03f0331b6d72ccc9262056683086574cde1841dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MijiaCore/RaycastSnapshot.swift:708-715 | Sources/MijiaCore/RaycastSnapshot.swift:717-724 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/RaycastSnapshot.swift"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62527cf584c28c0adb0d57866cca318ee049b309eec70cd7b323b26ad084bd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/MijiaCore/DualSourceHomeProvider.swift:327-335 | Sources/MijiaCore/DualSourceHomeProvider.swift:337-346 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"3627ae89847c1c5e6f930e3142aa43ffcf5b4b0d262d0e95626becff236e210b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Sources/MijiaCore/AutomationRule.swift:357-363 | Sources/MijiaCore/AutomationRule.swift:586-593 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AutomationRule.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7381f173a641d7ead1e23dbc9e3d3c9f01cc3a9c9e017d0436797ad564e735"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/MijiaCore/HomeStore\u002BControlWrite.swift:614-622 | Sources/MijiaCore/HomeStore\u002BControlWrite.swift:624-633 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"334f5d600edc7818b86af611e525c1198ba9a04a87c94acc6d40e803638bcbca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): Sources/MenuBarMijiaApp/AutomationEngine.swift:312-326 | Sources/MenuBarMijiaApp/AutomationEngine.swift:330-344 | Sources/MenuBarMijiaApp/SystemActivityMonitor.swift:112-119 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AutomationEngine.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f539182f77664c0ee58050cb7e0c3950c4c8b8e8e5502c8bd4cf42c3769649"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:604-609 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:482-487 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c6bc20226168da4f7c664c5b75016e4bfd27a219fc77c5ae5a433b80003625"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Sources/MijiaCore/AssistantConfig.swift:425-429 | Sources/MijiaCore/AssistantConfig.swift:432-439 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0f285f575919b199ccd1f41248253d52cbf6fb0aa5477309688eba64be9b06"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:756-764 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:643-650 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a351513e61ff737025f17fbcceaabce70273c15cfa6b2d48ceb877baee7d31d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/MijiaCore/Models.swift:25-39 | Sources/MijiaCore/RaycastSnapshot.swift:245-263 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/Models.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6afae50dcbdc5281d86653cdfff3d53bc77ba4760f26e2bfb637e83ad57e149"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MijiaCore/PanelSearch.swift:21-37 | Sources/MijiaCore/UserHabitMemory.swift:13-25 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/PanelSearch.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c299cba6aa777cc3fe692c85fb5b151c211e419b9c00e335a63a65ee8e583ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Sources/MijiaCore/HomeProvider.swift:307-324 | Sources/MijiaCore/HomeProvider.swift:373-390 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b0f167e752eb62c1e713e1dbdcefa8d912bd86bfd2e21855a4d4e243d2fd54"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:673-684 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:551-560 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"a596b0f796020b297ec781c9f83b8f7c9272a1d6b6b318ff6fc107966063ebca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:200-207 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:510-517 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"60284a96ef1e22e896d5f564878695f03598af9fc6ece5890d60e4d0be6a1135"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Sources/MenuBarMijiaApp/AppIntents.swift:37-45 | Sources/MenuBarMijiaApp/AppIntents.swift:87-95 | Sources/MenuBarMijiaApp/AppIntents.swift:134-140 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AppIntents.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df8f4906e30093de8108fdeed7d49fb6016c6dd473f934b724c96715fa194c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift:376-382 | Sources/MijiaCore/FragmentedMP4Demuxer.swift:544-552 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"7239a56780eb419297d81f020411587200a438d196e9865bc64a4a4cefa1ae79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MijiaCore/HAHomeSnapshot.swift:103-110 | Sources/MenuBarMijiaApp/UnsupportedDeviceScanner.swift:323-326 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HAHomeSnapshot.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ace1f07705fe718078c3dd074e2469c5596e53929553d299d464817006c673"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:663-666 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:619-622 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"604ac754946d799813bf3106883e31980291bc252c05b520f83ce1a9de26a24a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/MijiaCore/MiCloud/MiAccountLogin.swift:28-42 | Sources/MijiaCore/ManualControlPolicy.swift:12-24 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiAccountLogin.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b87a0076c4af2143535f42aeaab6c9d43669192e1d9b6d5e49fe20c11b068de"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:138-141 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:148-151 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aff690d15ca21f4602961bbd85642f66d46b5ca55a33d423c11b942ecdda9b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:253-265 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:314-323 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fde0506e4d71fb1a13ad0887bf941abd3ad9813a3cbca8b66aae5474d957b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:744-751 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:631-638 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"533578b291645c90b7c46229772e13fb56c00270bfbe562cb81aa60fddf4e6fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:184-187 | Sources/MenuBarMijiaApp/DeviceLayout.swift:437-440 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"90f1b5f7ddc5a5c0beaad45a6bc4649eb41be023ff46c30b6928c327f8917b1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MijiaCore/HomeStore\u002BSecurity.swift:28-31 | Sources/MijiaCore/ManualControlPolicy.swift:34-37 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BSecurity.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53b75b2e4ae71fd83949a043f35e0975193dc258010eba87fa4994d5a54aec0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift:23-26 | Sources/MenuBarMijiaApp/StackedCardGeometry.swift:32-35 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83169b08fccffa2e9fbfb41398542ae1f0c852836897c4defb9890050c3da77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:61-63 | Sources/MenuBarMijiaApp/DeviceCardView.swift:59-61 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"573179eb4644b3755544206edc3865fd4067b34803131853787c697d18994122"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Sources/MijiaCore/HomeProvider.swift:250-257 | Sources/MijiaCore/LGWebOSClient.swift:479-485 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4f255bb82e08533cef43fbd3159d0bcb148b4d6fb40bdd6098e89175199a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:683-686 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:639-642 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"c47eae89398bca8e6418238b63c8b454938c10cb757072c373e71df82c8128e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/RoomOrderDraft.swift:128-131 | Sources/MijiaCore/MiCloud/MiAccountLogin.swift:512-515 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/RoomOrderDraft.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5050d2b3f0b3baf63aca40feb304b25017a094d867f78786f0d5a97b31ecc120"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MijiaCore/EnergyHistory.swift:317-320 | Sources/MijiaCore/SensorHistory.swift:702-705 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"afeb3c6cbeba1b2e395d539ecaafac540505d2f9a9bcc7c9cca6b8ca7b6b3591"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:753-756 | Sources/MenuBarMijiaApp/SensorCardView.swift:777-780 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"71dd9efd6f922b3c0fb58229ce7cdb8f252731a6b54553a3e8cd0d64ad6ebc2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/MijiaCore/LGCertificateTrust.swift:125-127 | Sources/MijiaCore/UpdateChecker.swift:61-64 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"Sources/MijiaCore/LGCertificateTrust.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0aae82eee25cf92e8a28c332282f95b56ceee4b14e7807f2b55563a96e04f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:39-41 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:49-51 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea3efcbdd7e43f6c386751184e4e7e65c0423a70f985873ec9037a95dabc174"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:57-59 | Sources/MenuBarMijiaApp/DeviceCardView.swift:55-57 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ee85628f474bf30f7c82b4bdef41748524523273745fb6b39d3a9756fc64d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:223-226 | Sources/MenuBarMijiaApp/SensorCardView.swift:256-259 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef78b8b15915048c65823a124c760b74a7278ba3d7544dc483dcf6cebc50a62"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:66-68 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:245-247 \u2014 These two members are one piece of code written twice and then edited apart: 3 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad9980005c9d06824c9661967515273499af54239b36660ee44f2a8886dd1be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Sources/MijiaCore/DualSourceHomeProvider.swift:380-385 | Sources/MijiaCore/MiCloud/MiAccountsProvider.swift:560-562 | Sources/MijiaCore/MiCloud/MiCloudProvider.swift:1128-1130 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9be8716efe3e9db25e86250b3d61a387e653b77fe24e6dd655a8480df66bbad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:218-221 | Sources/MenuBarMijiaApp/SensorCardView.swift:251-254 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"94a0f981ade77653c9b8c6ed36671c1655761c43b4e1b3595ab3550e4c2d5cf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:43-46 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:43-46 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"058cc019fb06681f705f2404b90bae8ca5da170af848045f22e3cff8ff38976f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:226-231 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:221-224 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"a65d0bfc156e0cc08b5e52dc5dd3aae38d84d439ff264ae147797ffebc34b8e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:648-651 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:604-607 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"579101e91d6d19d565dd009e07d852a05ca47d7ed3f8fd5d7b7c621ae1d7f70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Sources/MijiaCore/EnergyHistory.swift:30-34 | Sources/MijiaCore/WeeklyHealthReport.swift:98-103 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"2436c678af4f0601a776e5e2d0770eae067c385f5c69a69b8d9c7c6710d068e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/MenuBarMijiaApp/AutomationSettingsSection.swift:434-439 | Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift:599-602 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AutomationSettingsSection.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5805a8de9ffb5693e71ef9f9119d6d5df14768e9e1d6994c4492b256a8f3cad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 1\u002B corresponding lines): Sources/MenuBarMijiaApp/DeviceLayout.swift:132-132 | Sources/MijiaCore/HomeStore\u002BControlWrite.swift:85-87 | Sources/MijiaCore/HomeStore\u002BControls.swift:1034-1036 | Sources/MijiaCore/MiCloud/MiAccountsProvider.swift:591-593 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc230cc2498ca25b918d4187ad309e772aa8fb5c69052fcfce939abf36252cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (79 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:278-356 | Sources/MenuBarMijiaApp/DeviceCardView.swift:342-420 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:278\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e4b9f42da4eb738339f370c75a35e35f3bc52f517056dccfe9f4ab9b83252d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (66 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:544-609 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:499-564 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"602680a84e1b82bc5efe730dccd44e9b079fb8c1ea754fbeeea80319bfac789f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (145 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:402-546 | Sources/MenuBarMijiaApp/SensorCardView.swift:435-579 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e693dba0b49cfa83a2a4392fc60f618ea8e87553deced0cfe4997013911564"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (56 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1167-1222 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1134-1189 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1167\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"09566f654ab0815a8672a85e2a9bd3ec53af1d53817eab87048d4ace0b930f22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:229-276 | Sources/MenuBarMijiaApp/DeviceCardView.swift:285-332 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:229\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"421cecc3fe4a091f40892fae5eadc747c24beb33e1641bedd8773fb1370129d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:360-405 | Sources/MenuBarMijiaApp/DeviceCardView.swift:424-469 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:360\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca95e6cd9fbcb849b23b4ebdec0edc6e373f28b378308403092f07f52149ffd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:135-173 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:130-168 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift:128\u0060 calls \u0060frame\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:133\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"857a66e7c54933e714707618a43015f91b381a0d596ff2a8657002f8c7fafc3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:972-1009 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:606-643 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:972\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2158dc63ef7333c0a57ea17189ddd4b799b6a275a24dc078473e5318427868c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1187-1222 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:714-749 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e349ca369e4e9296b9f2af63f4b035e0face071f50761ac5e62b8daa0a5092"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:190-225 | Sources/MenuBarMijiaApp/DeviceCardView.swift:246-281 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:190\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dba437231a726acec47258264592b8fb54afd6dcd8a4deb98742680237cd67f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:938-994 | Sources/MenuBarMijiaApp/DeviceCardView.swift:905-961 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:938\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"3326b0c406ab05734087dc31d3dabd57735dd4f7b35ebaf2a1f652bf2deea03b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:129-163 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:120-154 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"29af7d3adba1efaa5502b39a8c7d2ced04d54be21fe7fb5fbd08fa3a2d408d82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:817-849 | Sources/MenuBarMijiaApp/DeviceCardView.swift:784-816 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:817\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a1e577b9f63b7daa440e70ceb58ba352f7aee943bb1659341f73b0e0d91af7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:615-646 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:493-524 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"381b0f30ea6bc70e72b8967bf43485012556ca23e7b752957e0c02009c50d1b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (64 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:323-386 | Sources/MenuBarMijiaApp/SensorCardView.swift:356-419 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f5b93ecf0e4f41059c49459d36755c5e4c9cabbb507505bdf0ea1750365273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:42-72 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:42-72 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:42\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2e92aee8d4c38ad8c7aa8b5b9ead8691b5aaaae4adfc138fe5e1e6f2b6a38b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:810-840 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:442-472 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:810\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5288a32ee4b57864627981dc10b7efd200d2301bbabf6af683411015f70e5a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:999-1028 | Sources/MenuBarMijiaApp/DeviceCardView.swift:966-995 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:999\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b52cface678551ee4a26c558d772008be3b8290efd4da1049a85711d42076ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:508-536 | Sources/MenuBarMijiaApp/DeviceCardView.swift:589-617 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:508\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"f204215761c1e9b0508f8ae4c172b9e38f0d555c1c0fb4d8a05fe75f43cad989"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1126-1154 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1093-1121 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"3231e9459520b02db7cf02aeeed6dfbca1588b5d967521b0ce6be09bbd0ce124"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:396-423 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:276-303 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:396\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"9859673be2de7a65613250c8ba5c09c2b43f06062fcef57000948ad5c8750eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:151-178 | Sources/MenuBarMijiaApp/SensorCardView.swift:184-211 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:151\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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d59b50d8101dafb06086e23a84cf4c60ff271cd6bd4ef3e745a319881f339fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:159-185 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:228-254 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"79944f96e9a4664ef3570ca55f47e613e8ea81d49d7d319977ec6bf73d51aa40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:90-116 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:100-126 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9d4938ff71d184dbae80b5488770ccfa9b7138306e7f6ada19421753be000f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:805-830 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:715-741 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:805\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac49ace98865349665a8f652fd6c589b3216ee63403622e50d04e777ddc8dd19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:454-479 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:334-359 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2820a460d233ecee57900ac11c970829166e5173ea83504dff2fc82d27507708"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201338 lines \u00D7 2): Sources/MijiaCore/LocalIntentParser.swift:342-379 | Sources/MijiaCore/LocalIntentParser.swift:968-1002 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/LocalIntentParser.swift:342\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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, \u0060Sources/MijiaCore/LocalIntentParser.swift:1004\u0060 calls \u0060Dictionary\u0060 and \u0060Sources/MijiaCore/LocalIntentParser.swift:381\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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"9574b7843ef89a2f5fbdc38e43869e4f3ddba3e59664e30d2e8a896b89bf0edc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:904-928 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:536-560 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:904\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ace2414d8a325773cd0a2bb7d550f464b947644907b5617dd5ab1a3eb0b7d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (55 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1068-1122 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1035-1089 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"024463be87afdf8de80728c11b0d451b9da5f1fbb16a96f6e06c1e8a6b6452be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:270-292 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:326-348 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"88410eee01508e470a0fb3e466a346c7daa0ff5b2a86921a14ac05d178ee48bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:294-316 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:350-372 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"55aa145ab6bc58c8dcd21bcb06b487f495a8d5da39b76c4e34173dfb1fe054c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:580-602 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:458-480 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"9234ba52f071bcbf0aecfa778d05e12ce844d87494ec85edad17d21dd2fa5f95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:672-694 | Sources/MenuBarMijiaApp/DeviceCardView.swift:691-713 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:672\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3b4c87d0661ede496a1d09e828b285cb6b6b13d4ecc2d6c3947b01dfcf28ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:792-814 | Sources/MenuBarMijiaApp/DeviceCardView.swift:759-781 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:792\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f7ee2cc76f994e4d712d65af6ad8b37f33f5d1e54018e928e6bf27579efffe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1285-1307 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1252-1274 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1285\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d895497bc1e07760d713c2b19d996cf1947059fe87b918d3a06c5ca7970aae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:263-285 | Sources/MenuBarMijiaApp/SensorCardView.swift:296-318 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:263\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98a5989e76409f46ff9a9009976237c8b815c2f950b3fea14d55c0bdcc354e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:104-128 | Sources/MenuBarMijiaApp/DeviceLayout.swift:337-361 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:129\u0060 calls \u0060transition\u0060, \u0060scale\u0060, \u0060combined\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift:362\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":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9761ec5cc854576c00925da379584f210058f3f21718e6fd8728f70a0d5c20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:77-98 | Sources/MenuBarMijiaApp/PanelDesign.swift:303-324 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift\u0060 and \u0060Sources/MenuBarMijiaApp/PanelDesign.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb45596698c2e511aa9b9e09ef3c0482504d23df35620c50490d0491c90e20b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/OnboardingGuideView.swift:412-433 | Sources/MenuBarMijiaApp/SettingsWindowView.swift:584-605 \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 \u0060Sources/MenuBarMijiaApp/OnboardingGuideView.swift:412\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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade399b2252181a8c0009ddb3b6e83fe9c48fc736d5563ebd73198a4d839c359"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:616-636 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:571-591 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:616\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7db08f228cd7464b1cf0ff8ccba9429da10e7be2dc8dfc2bdf6139f4997caea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:712-732 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:670-690 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:712\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"0effa152acdb85e62876b9adb03a52b29b84824814ac9cc9d00fb3e0329c2646"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1403-1425 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1370-1392 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1403\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1403}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bad199ac6833057f35ae0b0e067c7fddcaccc51a8a212a1e652d713c2d6608c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201321 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BUndo.swift:245-265 | Sources/MijiaCore/HomeStore\u002BUndo.swift:467-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 \u0060Sources/MijiaCore/HomeStore\u002BUndo.swift:245\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1865e2fce09728b0a652f1cbac997b586b36893c7ae9ea616423b3277b840f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1279-1297 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1397-1415 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1246-1264 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1364-1382 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1279\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1279}}}],"partialFingerprints":{"codehealthFindingId/v1":"75668456b2bec585534be6dbe6562cf0067b37acb8c6cf60a9cf2880327d327d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:354-372 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:410-428 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:354\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1cc5fac69add6259662c0acb73e0d3158fe443e99dbafa0cfbaa00a77d9a550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:850-868 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:482-500 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:850\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c366151c70b9507e899370c082aa27ca596695d39f8e594c3455707748c797e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:940-959 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:574-593 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:940\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"168a731f831278bd6ecbd55b4377882687394df251f66bd80f6b20deddb203f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:231-249 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:602-620 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"f642d8bc3a987d6f4e075d26672aabc6a498dd862273047f5ecf2a1d36da0a0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:262-283 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:633-654 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40c16830edc695fad761f24a70a44c295fa5245dbdd938acf057ab2cecaeedc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201319 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:381-399 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:746-760 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:381\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"1036be3df20bc32feeca15766234960f8389ab4c64690be3e2317492f17d7b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:50-67 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:50-67 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:50\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa072e25d16abe6f93f334d1478700e0753c7216f6c2481d1e4b451a7b72c8d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:335-352 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:391-408 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:335\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d43a2a60e27427ebf09cae9137f375a6e334c6d7eab4c2a5f844dc3c59e3ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:300-317 | Sources/MenuBarMijiaApp/SensorCardView.swift:333-350 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:300\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffdfd0651a9f21c014f1c0de58bc1df05e9a87c05ea0524595ad2848e8519acb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:565-582 | Sources/MenuBarMijiaApp/SensorCardView.swift:598-615 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc572c9e607bc15688391864a336afca9d36e1d0f4b6b5a0c4b50bbdb8566be9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:712-739 | Sources/MenuBarMijiaApp/SensorCardView.swift:734-761 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"34460136b13a86aeeddb8366e4311654cad2d5e39ff4dd8caa45652c1ffddd31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MijiaCore/LocalIntentParser.swift:381-398 | Sources/MijiaCore/LocalIntentParser.swift:1005-1022 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/LocalIntentParser.swift:381\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MijiaCore/LocalIntentParser.swift:1004\u0060 calls \u0060Dictionary\u0060 and \u0060Sources/MijiaCore/LocalIntentParser.swift:379\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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3505cbd09f0ede0404e7d89a6d00cf08ba3737bf84fbc592b2cac04b16691a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:191-206 | Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:226-242 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:191\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060notify\u0060 to \u0060Bool = false\u0060 in one and \u0060Bool = true\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":"Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b9d97c5dc3ca8ef14f7d011d7bfb9e9fa6cdb87a069e1c9d5fbe96f38f1c8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:878-894 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:510-526 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:878\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceedd0899d7ae689cdec6851e6987716df3b9a5de7b18f5b27053ee4933938f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:145-161 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:155-171 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ae60fe669230e11521664265cc61c4ea88fbaa341a8b9df6df36b81cd732ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:164-181 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:174-191 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33db07960abcb698df6df6bda686c642e4cb039f6a2a61087601ddf5df633f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:479-495 | Sources/MenuBarMijiaApp/DeviceCardView.swift:538-554 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:479\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"45515314aa4928b5a137294604a2df7a7450eca7c00389b2aba02157161e0fdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:907-923 | Sources/MenuBarMijiaApp/DeviceCardView.swift:874-890 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:907\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3412661c8a45498c1b72664e7be1cb27520593c98a4dde6cc7eb35b6cd5e8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:236-252 | Sources/MenuBarMijiaApp/SensorCardView.swift:269-285 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"a239e903e28c13b380491519dbce0c81c22888216735e7394f496f68b2ae7a29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:188-203 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:198-213 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeeb376d025943494681ed908fcb75e3b93be353ccfc198a48d8427e9a5e19ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:228-256 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:238-266 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:228\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24c0b2dd84926cab53ad51bab662c9600eea68c6b0c1424ad2b764ad0afb965"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:177-200 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:172-195 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:177\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a48bbbe56875c4c85397024b635d323308135785a1384187766b82c568cf1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:120-135 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:130-145 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee65191001fb8e2fef9f78cae0615178d562a8bd4ba05ebacd1c9f9012d0a0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:201-216 | Sources/MenuBarMijiaApp/SensorCardView.swift:234-249 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae57dc1e1b1ffb9b402e530b5c02a3a69b6ef16a7ddfc63ea81dc72c4300a1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/CameraLivePanelController.swift:1954-1968 | Sources/MenuBarMijiaApp/CameraLivePanelController.swift:1970-1984 \u2014 both copies are in the same file, so extract the block 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, \u0060Sources/MenuBarMijiaApp/CameraLivePanelController.swift:1952\u0060 calls \u0060frame\u0060 and \u0060Sources/MenuBarMijiaApp/CameraLivePanelController.swift:1968\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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":1954}}}],"partialFingerprints":{"codehealthFindingId/v1":"54191ac186f57551acc0bce0d9434d5cee6e6a0033fc61fa96376b665b842120"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:108-126 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:100-118 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.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. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c527f99819d6b077173649bc4d4d6c139842ff871352b2d34eaa001ef55f9ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1152-1166 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:679-693 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f38dfec73bc2bd6aa538bb82c73ef5510557db57e58919faedc97cfe8d29568"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:184-199 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:194-209 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f2fad4468215633df35655e1811c599287199f33b19bd08938a4ea2b284eaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:552-566 | Sources/MenuBarMijiaApp/DeviceCardView.swift:630-644 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d45ea75df8ca0255f06ca0645a41b10fb278c0cef642519481456add02b7b41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:876-904 | Sources/MenuBarMijiaApp/DeviceCardView.swift:843-871 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:876\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de76afac0342e2f59f3d31250f2a20543f5aff13947dac2f5b5d4b4b6d7498b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1364-1378 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1331-1345 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1364\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d88f1d0ccc53753bbb503ead5bb95447ac28b90dd6884087b4b928e1800877"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:51-65 | Sources/MenuBarMijiaApp/SensorCardView.swift:51-65 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ddb6602df73d80e089d604e88fe18b001ea8c9d64a9d76044971eda8fe1bd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): Sources/MenuBarMijiaApp/DeviceCardView.swift:463-477 | Sources/MenuBarMijiaApp/DeviceCardView.swift:569-581 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift:463\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"fefeb81f69709de9376b1c97e02ce0def3b95dc9e14f30a688bca5a789d711bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): Sources/MijiaCore/DeviceSynthesizer.swift:386-400 | Sources/MijiaCore/DeviceSynthesizer.swift:402-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/DeviceSynthesizer.swift:386\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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d5921c349522368c619c27ffb45a230a7646f57052be916dd58e60db90b6ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MijiaCore/HomeProvider.swift:281-295 | Sources/MijiaCore/LGWebOSClient.swift:500-514 \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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8f3e7d71fc16f2fa36fd9f3c63fad050571bea36eaee049067b0d92baef927"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiCloudClient.swift:933-947 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:954-968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiCloudClient.swift:933\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5491aa675b2e294eb2a6a846fad886344a76289d1e83c4d47cd5baefb2ccf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:8-35 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:8-35 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:8\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7bc13536148299f874f562d7af3726d8e4aa6d915fbbad4349988593d30e096"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:443-456 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:577-590 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:443\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:441\u0060 calls \u0060init\u0060, \u0060opacity\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:575\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be9f6648fc6f8745d381a15580448112012a7de521773249fe7e133cfebd0de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:565-578 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:443-456 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb85e6951decfb8bb3fd88a6d15507cb9f3445e73e9d6dde938cc49ee3d301c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MijiaCore/AssistantSchedule.swift:143-156 | Sources/MijiaCore/LocalIntentParser.swift:659-672 \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 \u0060Sources/MijiaCore/AssistantSchedule.swift:143\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":"Sources/MijiaCore/AssistantSchedule.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"96dd76ad61ed2611d02e3a8fea63b78ca86a1178affdc02da4205886c97c7b97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:412-424 | Sources/MenuBarMijiaApp/DeviceCardView.swift:470-482 | Sources/MenuBarMijiaApp/DeviceCardView.swift:574-586 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:412\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"782530fe3a782acbd57419ae9361ab4d253637744d93c657345fac4081b8e5af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:669-681 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:625-637 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"b241e7a462a2f585a8170261a2c3455784252c6b308efd8cdff6271aa0873f70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:321-333 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:377-389 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6709033af9e55f1a07219875eac637f56700d40d45e3c789754870372ba9eb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:7-19 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1421-1432 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:7\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ace1fd71a2f67af6fef91cb7edacfc0280b3d10f1b92626f9dd141211fa31b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:34-46 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1447-1459 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ddca011693eea3495a27e1be8ccd22cff90d54bc1f55414b763e1ca10847c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:52-64 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1465-1477 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:52\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07a2954b1384b444c8119d66f27b26a904f90df4ae3757495441615ad99ee70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:195-207 | Sources/MenuBarMijiaApp/DeviceLayout.swift:448-460 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:195\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":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0ce94d1f4aa827084b22b3bc8b6d0916510c01027987466a6430af7f7d6f41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/ThemeAndMotion.swift:206-218 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:223-235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift:206\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":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df72e48a11ca27aee330de1c8c06b2c3e098303ebc16ddfcfda9368ac09a2a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BControlWrite.swift:124-137 | Sources/MijiaCore/HomeStore.swift:800-813 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1a6064c30e746c002a776c0db8999e1e957fe7a3f9cc4d4725cffc9c42c55c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:278-289 | Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:310-321 | Sources/MenuBarMijiaApp/SensorCardView.swift:311-322 | Sources/MenuBarMijiaApp/SensorCardView.swift:343-354 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:278\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2123e470dca6fa325077f273e46fddeacdafa6257419bf833e56fcce960cb4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:744-755 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:939-950 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"350e4fff85ecb422ebc6ac7cdd502eba2fa2e32426218920c2133ba83ffb5715"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:191-202 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:259-270 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:191\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"33784735362cf295b30edabac24826a169a4c717d3ece94a89e1223cd5d11189"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1012-1023 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:646-657 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1012\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c01dc927f185993631fcc84ff9ef5d3249907640d1ae613db839e8781cfe53b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1233-1254 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:760-781 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aef4b11a8a9d0921c8d838e25cde1e6c024cc0e53b2b07912ed25e64a1e4416"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:427-439 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:307-319 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:427\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cecd377fd38ca994178504e73259831c91be407cf30b7771ab3af725abae50c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:21-32 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1434-1445 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift:21\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView\u002BCamera.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e75f03432093aff0a384a5a584a27bae247135242c67808df4aeacc9d6191e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:734-745 | Sources/MenuBarMijiaApp/CoverDetailDrawer.swift:218-229 \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 \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:734\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"331042767f42ab15a050d543daae2fdd7bf4028c7b62904c2e0cbacd53636e6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1041-1054 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1008-1021 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d31b36071631e1e0d09301a51b80cb937a38ff1121870f1ed953a8babdcd5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:55-66 | Sources/MenuBarMijiaApp/PanelDesign.swift:280-291 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift\u0060 and \u0060Sources/MenuBarMijiaApp/PanelDesign.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcaed09bb17b255f59423e542824611dab27e88a251b0e7fe45d67846ee9a31b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:24-37 | Sources/MenuBarMijiaApp/SensorCardView.swift:24-37 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8c355da2abce498599ac4aa784fe0ccd47b992a0901658992c202582d704d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Sources/MenuBarMijiaApp/OnboardingGuideView.swift:912-922 | Sources/MenuBarMijiaApp/OnboardingGuideView.swift:936-947 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/OnboardingGuideView.swift:912\u0060 it does not close everything it opens, so those exact 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 \u0060alignment\u0060 to \u0060.top\u0060 in one and \u0060.leading\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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e17a4e850582a4dfb75edf86a681d15006522f428f3a0bd600d3857cf106a7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MijiaCore/AssistantEndpoint.swift:21-32 | Sources/MijiaCore/HAPlaintextConsent.swift:42-53 \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 matched lines also transfer control out of the body holding them, 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":"Sources/MijiaCore/AssistantEndpoint.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee6a9f30325a6f9bbf9284786f3605742a0d1a99442f85505973f09e8ef255c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BUndo.swift:785-796 | Sources/MijiaCore/HomeStore\u002BUndo.swift:829-840 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/HomeStore\u002BUndo.swift:785\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":785}}}],"partialFingerprints":{"codehealthFindingId/v1":"a093a1225166a71f057eee544aa7a04737d30e340d44ad4ca49197e3fc585468"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1464-1475 | Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1489-1500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1464\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"34aeffb624f4775dd2a4f3816bcd8f340766ef0242beb47af43b541c2f16bca4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:188-200 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:887-899 | Sources/MenuBarMijiaApp/DeviceCardView.swift:854-866 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:188\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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"b670db487e75bb81292e569420ccac1d427e9fb4b1fb7a76d8b31843e3e33e97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:363-373 | Sources/MenuBarMijiaApp/DeviceCardView.swift:427-437 | Sources/MenuBarMijiaApp/SmallDeviceTile.swift:145-155 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b2b22ab6814f6cb74b0bb4b5208c2a9621608e1d8507ed9a0722c9ed454e9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:426-436 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:523-533 | Sources/MenuBarMijiaApp/DeviceCardView.swift:604-614 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:426\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"a206c413eb92f1e144b5fe1f4437547bc0369ed0e46c0b417127920934d9ae6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:205-215 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:215-225 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:205\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6bc81d4835727254f9b2d06427a99920d9b06d462e04e1263a6508edefc4c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:261-272 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:271-282 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd11c5ce82afa48fda87090b13e299c8ab4d972300b065d0ac0c569c9058d36b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:688-709 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:644-665 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:688\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dc9dbfae0350e4a1707ce1425c94bec5de495841822064f838751a29d8aeb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:226-236 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:293-303 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:226\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3138598bd3d067ef7c1f4deab5e68e3aef8464bca3af2dace0df20d8c525a129"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:780-790 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:687-696 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:780\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd7ec29e9d935d590266e24c59aaa0a9fb4cfae5ce369f2baaf388069573512"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:462-475 | Sources/MenuBarMijiaApp/DeviceCardView.swift:521-534 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c809d51bbbc2a8bd1be27879421abe743a672017cde0740c6705304b3278ecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:388-398 | Sources/MenuBarMijiaApp/SensorCardView.swift:421-431 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a8ff1ecb506f9b73216d1c97f1dc621aea2b4f68f7b21f48b6d6d970b30740"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:594-615 | Sources/MenuBarMijiaApp/SensorCardView.swift:627-648 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"04dac44503a925fba79bf7020d6cfae1088dc201ddfdff2d7b6b2a0e9a7f7578"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:617-627 | Sources/MenuBarMijiaApp/SensorCardView.swift:650-660 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea07257bc3eb67fdc4992cd214453ef57d6b475fea78fbf6c8e4a44d64b0a5e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:629-639 | Sources/MenuBarMijiaApp/SensorCardView.swift:662-672 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c463139ca41b85dc5555d2c57338a1154bdba83e34b732d760c7b310604b4b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/OnboardingGuideView.swift:194-204 | Sources/MenuBarMijiaApp/OnboardingGuideView.swift:391-401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/OnboardingGuideView.swift:194\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14662fa66be253a3f5421f653ff39baecc8d3f0a2cb7e9e227a4ffe7c399274"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/ThemeAndMotion.swift:368-378 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:455-465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"44af2560ddfbddcc6f9e93580aaab110627be5e6de85937253c59b4e9cc42f23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BUndo.swift:286-297 | Sources/MijiaCore/HomeStore\u002BUndo.swift:503-513 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/HomeStore\u002BUndo.swift:286\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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"6098cf34f12f56f3fb0931b5e811ecfa44f1bc7ed6f9d2af4e228450e9a66754"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BUndo.swift:299-309 | Sources/MijiaCore/HomeStore\u002BUndo.swift:515-525 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/HomeStore\u002BUndo.swift:299\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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4c97ad052768f52be50af9709152e8dd08d348bd2ec2ba5cc6bc421e32e503"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:631-640 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:843-853 \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":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2c9e374877205ba1ab6f6d25489b253e468e56622b6d8678f034aa47ae9738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1354-1364 | Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1385-1395 \u2014 both copies are in the same file, so extract the block 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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8009da9a35f8573fb0d5650410c79b0a354ecd0365dc1419694140c304fe4eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:123-132 | Sources/MenuBarMijiaApp/DeviceFacetViews.swift:144-153 \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 \u0060Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift: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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a37dfea41d99a41036e7967f7b934545f4ca165fcb35d225295d6d47fd43e41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:296-305 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:306-315 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"df5a22f5f3a6b6d1be578934d51ae84d4f184a2350ab8e40120ba03b870110f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:473-482 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:437-446 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:473\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"106e284aaaf8315a0640acd4a6bbb834ab58518cba1cec36334114e491bd9164"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:488-497 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:453-462 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:488\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift:451\u0060 calls \u0060scrollDisabled\u0060, \u0060softTopScrollEdge\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:487\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"46decf67fd88af170f0abe6f9e7fd62cb014d674dc83df3408e0ea7b4cf1252f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:208-217 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:275-284 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:204\u0060 calls \u0060tracking\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:271\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43809e899f058589f64fbe867060a301eed0f28a3c0d3a881cd0a8193ca0ace"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:524-533 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:732-741 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:524\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:731\u0060 calls \u0060lineLimit\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:523\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a49b48bfb78bcde1622c4a7d458f8b2b8df95cc1c442a082a52eebe824e4397"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:841-850 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:869-878 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:841\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"2415b6f69bd79159edf2188b3d1c79d0fa796660e2c7160eddedae9fcb13b368"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:296-307 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:227-238 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"e34630ec3159cc3f3f1a7dd7c8e548b4acdd2108b4dcdb27525bbbf2e410420f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:381-392 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:261-272 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:381\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0ce36385aabad6a5efaae8e84ec3729a517f913e20e5949e5ccf079dbaa6c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:443-452 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:323-332 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:443\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ced172a74faf9ece520c4d8cc442a1ff9b2b513eadaf531afc89f91bfe1eca8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1258-1268 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1225-1235 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1258\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1258}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d70b8beaf6ceaf6ddb7ce0f1185ee6d1e5d17d21300b2ab0b42ad450161309"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:182-191 | Sources/MenuBarMijiaApp/SensorCardView.swift:215-224 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c7d3153e22338765765ce1bc01ed71b258e694ae19f91cff6d0a2962538a84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:641-655 | Sources/MenuBarMijiaApp/SensorCardView.swift:674-688 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"40238dec875ffb86a3cbc41c863a0bcec7d90d4de415045a35198924d1f4e459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:473-482 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:501-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:473\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e443709df35af6c1b68af36eaac15296c1e797ee0ade157c73f22534d3a595e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MijiaCore/AssistantConfig.swift:482-491 | Sources/MijiaCore/AssistantConfig.swift:498-507 \u2014 both copies are in the same file, so extract the block 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":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7e94cce0b072b4d6e63ba1868bc657260734631d1212a00d7c5ec7d876d97b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MijiaCore/FragmentedMP4Demuxer.swift:157-166 | Sources/MijiaCore/FragmentedMP4Demuxer.swift:168-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/FragmentedMP4Demuxer.swift:157\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f94ea246f1e3565c3beb5f12e81bc1b1c3d2d9610262daebc4028d5c4413fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:109-119 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:103-113 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea7d3d0e28085606d529e5e9f80ac008dc71dc3dc64256a5b32ec33ebe8eb28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:549-557 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:416-424 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc5dcaf2104679fcf5d95433dc4b791d55c7f96f5655806defe760307c75e1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:537-545 | Sources/MenuBarMijiaApp/DeviceCardView.swift:558-566 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:537\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"03464ca77cc065f69a51d374afeccb866d97be995fe30da70172dd3fc4e9e2ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:864-873 | Sources/MenuBarMijiaApp/DeviceCardView.swift:831-840 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:864\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"42656aab9f527b8e2f7508278b93ed467f41551cb5fd2f36794ba0c95647bf95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:870-878 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:901-909 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:870\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8976f1bf829ab4aec197953e15858b4a884cdb9d8aad874f0f153c70d69e96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:76-84 | Sources/MenuBarMijiaApp/SensorCardView.swift:89-97 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:76\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbbfdc2ac8c66fe671d63f9a661ac774032692a27fd50d83be1e38671956e8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:86-101 | Sources/MenuBarMijiaApp/SensorCardView.swift:99-114 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c9660460c2edcb4eee4c21a1ad78c70d0e12c3676962a76f1bcf5df1ab7191"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:326-334 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:691-698 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:326\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b942dc34b74cb9a9896025cdb1c069b9d63a27fc8fc506d4f9033063d6f4adb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:354-362 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:711-719 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:354\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0347e8845d64f3f42a520af09e66693613d444a047f21407996723c0e8c6dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:410-424 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:764-778 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"099eb0e58dd3188cdace495a290a1bc1b1580b566dbbd031ce1dc55477fafc42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/DeviceCardView.swift:208-216 | Sources/MenuBarMijiaApp/SensorCardView.swift:227-235 \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 \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift:208\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift:206\u0060 calls \u0060hasDetailDrawer\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift:224\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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d91be81e4191573101d44c6b88182a976d42d281465aa66911a62b6aef9b1f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/DeviceCardView.swift:837-845 | Sources/MenuBarMijiaApp/DeviceCardView.swift:868-876 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift:837\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b233a615b8ef2d0621b2889828c561c0e3afbd6aceabbc5737124f110cda84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): Sources/MijiaCore/LocalIntentParser.swift:711-726 | Sources/MijiaCore/LocalIntentParser.swift:1077-1090 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/LocalIntentParser.swift:711\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07f23502d58a1212ca4b81ad6b78bc8d16516aafb6d430900fb125a9ed959b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiCloudClient.swift:1157-1165 | Sources/MijiaCore/MiCloud/MiIOCryptoAndPacket.swift:104-112 \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 matched lines also transfer control out of the body holding them, 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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9d3d6406d365f210d2508656713cabd8724e050ba96fa147caf03f331bfa85a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:125-133 | Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:153-161 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e299a29db34860caba70d4dadbb53b826275bdb1a208d0a197675f14a3db651"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MijiaCore/ModelIntentResolver.swift:243-251 | Sources/MijiaCore/ModelIntentResolver.swift:270-278 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/ModelIntentResolver.swift:243\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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17aa463111ec5a791258b405b99a848d3cf9a00eacb01e08569510d005e21bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MijiaCore/SensorHistory.swift:372-380 | Sources/MijiaCore/SensorHistory.swift:385-393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/SensorHistory.swift:372\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/SensorHistory.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fdce9d34f01bb03eef0e3706fe5620f124abecf735541509ed1ebd11e582f08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:59-66 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:59-66 | Sources/MenuBarMijiaApp/RoomOrderEditor.swift:669-676 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:59\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"807353d06be7e3292a55e45180ac2487534c8bb377d0622ef2f191a247c1625f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1094-1101 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1108-1115 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1134-1141 \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 \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1094\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"b65d3ac597cec11127b69a20d73d772895f4ebff1b87dd334c20ea9ef7ba0081"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:107-117 | Sources/MenuBarMijiaApp/DeviceCardView.swift:131-141 | Sources/MenuBarMijiaApp/SmallDeviceTile.swift:112-122 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ca97e2d768bc4c4c63b308793a6f9df152381e9d088d0597a7657b6aa5b53f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:171-179 | Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:202-210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift:171\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d026a1d7dea468ce7ab5db5709f0254df2dc5d3d6667ed7cba107c9f277cf46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/AssistantCommandBar.swift:1323-1330 | Sources/MenuBarMijiaApp/OnboardingGuideView.swift:734-741 \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 \u0060Sources/MenuBarMijiaApp/AssistantCommandBar.swift:1323\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21099ff9751bbbd5b34eca3f0575a9efbb1464aa0b4d05c41eae3f7d7cd34d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:359-366 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:239-246 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:356\u0060 calls \u0060padding\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:237\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a3580ba5e2a61412893a3d37316e33863b6ab2f621bf252303abfcfd1a1070"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1228-1235 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1195-1202 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1228\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e28f1f1462da30052c734590f684d3a6437f05b1eb1d627082e9886959982b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1331-1338 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1298-1305 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1331\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1331}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e3096d0d6341c79a21feef0bcf01fee9e7c237f70f14b4e698bb438b771f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift:20-27 | Sources/MenuBarMijiaApp/DeviceLayout.swift:665-672 \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 \u0060Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift:20\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2adf998820fd7342d52e584b7db0058b49e719ec9713a584961b1609fac04c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:141-148 | Sources/MenuBarMijiaApp/SensorCardView.swift:171-178 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:141\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c085f28bb1ad008bbd8fb6d5fc539164f23ab2e5ff0db6d0cae4541586c8740f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:291-298 | Sources/MenuBarMijiaApp/SensorCardView.swift:324-331 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d91a9b3f2e7bd4305c09b354f44637e2ca4f8e3ff94f4dd3ace68feb44c056"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:774-781 | Sources/MenuBarMijiaApp/SensorCardView.swift:804-811 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa75d342aa6602e8bdba5806d7bbf220e904c219a51d956afd431ef759c6eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/MiAccountSection.swift:254-261 | Sources/MenuBarMijiaApp/MiAccountSection.swift:335-342 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/MiAccountSection.swift:254\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MiAccountSection.swift"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"42e8ec48620a0923d9f4c39894bee4a1daf48050b047b192c84902a1709b33e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/OnboardingGuideView.swift:329-336 | Sources/MenuBarMijiaApp/SettingsWindowView.swift:1122-1129 \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 \u0060Sources/MenuBarMijiaApp/OnboardingGuideView.swift:329\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":"Sources/MenuBarMijiaApp/OnboardingGuideView.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed6de6fdadaa42ff5906c8ac496a7b63a24041e86a1a6f32feab92833bee1163"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/FragmentedMP4Demuxer.swift:253-260 | Sources/MijiaCore/FragmentedMP4Demuxer.swift:264-271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a845e3cb5bb44aecaa08b50914d83762280d639d82a53125ba78e1fc887d30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/HADiscovery.swift:528-535 | Sources/MijiaCore/LGWebOSClient.swift:913-921 \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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"beb285926a2c1a695769ece6996a9bf3999d878567bbc940c1306a3501f3a45c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/HomeStore\u002BControlWrite.swift:979-986 | Sources/MijiaCore/HomeStore\u002BControlWrite.swift:1013-1020 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/HomeStore\u002BControlWrite.swift:979\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"d935f56609bc935613e5f8edea6a90d8f1d235262ca3bd827d285acdb1eec883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1514-1521 | Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1543-1550 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift:1514\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":1514}}}],"partialFingerprints":{"codehealthFindingId/v1":"2173f141329d2739f5343fee8edc3ea5272d4121f1f2f45c7ef9c6b7ea4fd931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/ModelIntentResolver.swift:368-375 | Sources/MijiaCore/ModelIntentResolver.swift:406-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/ModelIntentResolver.swift:368\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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"763f567202686e6287cf35fc4aa7029ed2ff0c0cc1e1174fe0be54360cdb010c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/RaycastControls.swift:353-360 | Sources/MijiaCore/RaycastControls.swift:586-593 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/RaycastControls.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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a1273abadc4a78a0a45174c37c8cea7a397ea1e6b30d7945c737d216f2a506"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Sources/MijiaCore/DeviceSynthesizer.swift:1304-1310 | Sources/MijiaCore/DeviceSynthesizer.swift:1311-1317 | Sources/MijiaCore/DeviceSynthesizer.swift:1318-1324 \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. The matched lines also transfer control out of the body holding them, 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"c733fbd7fb3c711ca00defe0cd9b9ce292cd1aff5157a60f4d1c39a7127b3391"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:90-99 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:84-93 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2d75594b218106f34bfae63362c653dc7003880aa0d8d3187a8adb0ac09a9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1057-1064 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1024-1031 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9eace9846677316816e1a309ef438d93da38ac3cc20857f10676c24da1fbdfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1323-1329 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1290-1296 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1323\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"9717632e0d50406d86db52a60f3d408059edf22fcca7349f2c3920939c0fc6b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1383-1389 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1350-1356 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1383\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1383}}}],"partialFingerprints":{"codehealthFindingId/v1":"406dd15c40840814cb51bad9764c6784cc05d2c95465bd4a75c87b46556139c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:548-561 | Sources/MenuBarMijiaApp/SensorCardView.swift:581-594 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3bbc2a8da75dbd057b123c245303b55c66c78cb7f962e2328e0f6db7ae223d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:584-592 | Sources/MenuBarMijiaApp/SensorCardView.swift:617-625 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe83fc09688408c59a3c22ec1c8495ae02a124a743249b50c4431c8eeeae1e00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Sources/MenuBarMijiaApp/MiAccountSection.swift:232-237 | Sources/MenuBarMijiaApp/MiAccountSection.swift:300-306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/MiAccountSection.swift:232\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00606\u0060 in one and \u00603\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":"Sources/MenuBarMijiaApp/MiAccountSection.swift"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"be72ffa56141802fab673f30f778312fbf8c64ea34d16dab9a5bd7296602ca9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/SettingsWindowView.swift:811-817 | Sources/MenuBarMijiaApp/SettingsWindowView.swift:1566-1572 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/SettingsWindowView.swift:811\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"660dd88e1235a11fc07a65643703096243ef3a8233b6e3e3fb5b745d3be3f624"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/DeviceSynthesizer.swift:1719-1726 | Sources/MijiaCore/DeviceSynthesizer.swift:1743-1750 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/DeviceSynthesizer.swift:1719\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1719}}}],"partialFingerprints":{"codehealthFindingId/v1":"1287fce862daabba7b15a027bdb16a5a0862154689cdbbd07f624125c551eff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MijiaCore/HADiscovery.swift:640-646 | Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:418-424 \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 \u0060Sources/MijiaCore/HADiscovery.swift:640\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"e40b600ec83867b41ecac864eb4cbcdbfec9926e4c8124d6d766285fdb01d3a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:316-322 | Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:344-350 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:316\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"e01386df00e42db1c598c48fb53a03aff6e8351f9ad58aac1f88b02c90d4699f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiAccountsProvider.swift:123-129 | Sources/MijiaCore/MiCloud/MiCloudProvider.swift:91-96 \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 \u0060Sources/MijiaCore/MiCloud/MiAccountsProvider.swift: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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bd4ecc0e2649d9d28efc53e2471b19b5489a36eb36623692fa775884bf549e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiotCommandMapper.swift:396-402 | Sources/MijiaCore/MiCloud/MiotCommandMapper.swift:412-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiotCommandMapper.swift:396\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b60efa292914f540af6af39636205a23743b9a6d766683f6b3221190e4f4e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:831-837 | Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:861-866 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:463-469 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:493-498 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:831\u0060 it begins part-way through the construct above it, so those exact 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":831}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f221b69a10d7c2d4b67a001069209e929fa68553ebc995f23a1b8338f567722"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:466-471 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:510-515 | Sources/MenuBarMijiaApp/DeviceCardView.swift:525-530 | Sources/MenuBarMijiaApp/DeviceCardView.swift:591-596 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:466\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d508f3d89d579d8e1cdd6b45a6da4495fc3ce003ed265ce6760f564afafbff0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Sources/MijiaCore/ModelIntentResolver.swift:246-251 | Sources/MijiaCore/ModelIntentResolver.swift:273-278 | Sources/MijiaCore/ModelIntentResolver.swift:370-375 | Sources/MijiaCore/ModelIntentResolver.swift:408-413 \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 \u0060Sources/MijiaCore/ModelIntentResolver.swift:246\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9477249f6ad814c386e032df10529d08b1b15f8aea69039f5acfa0f79be90380"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Sources/MijiaCore/FragmentedMP4Demuxer.swift:252-257 | Sources/MijiaCore/FragmentedMP4Demuxer.swift:263-268 | Sources/MijiaCore/FragmentedMP4Demuxer.swift:283-288 \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 \u0060Sources/MijiaCore/FragmentedMP4Demuxer.swift:252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d89ab1c65c21d5f5cac191cb43c1b2498ff015c8765d3a834b78fea2c0c583"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:75-84 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:85-94 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"4723995ce0e22ecfc05bdba301681a6d2584df65e2e14aabf169fd513e22057f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:832-841 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:743-752 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:832\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"683b29d7bd18bc8765718d6c24c9392674ceba797599bd6ff5aa4494984be3b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:446-453 | Sources/MenuBarMijiaApp/DeviceCardView.swift:504-511 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:446\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift:514\u0060 calls \u0060padding\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:456\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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"a975c0dfab58ec7c6652a24b81ddc2540924778f06a6768b3390e4472ac4f0fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:784-789 | Sources/MenuBarMijiaApp/DeviceCardView.swift:751-756 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:784\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a4f63987e3a974b803b6e29243c844aedf19ad853ca0a2e664a6a86f0cbb1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1311-1316 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1278-1283 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1311\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"578d8a9615199cfed4dea4e5987a95f8b050132772cbc5b3945c0e10fc22be79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1428-1433 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1395-1400 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1428\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"729cd96ca14369bb6d0d44b0ef8d8fa7d9207bbb77fc290f5964bf9a59dcef7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:222-228 | Sources/MenuBarMijiaApp/DeviceLayout.swift:475-481 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:222\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":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7c3728d72bda7108ab0a4987efd86586d25779fde5902c4d1909c852a4371b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:666-673 | Sources/MenuBarMijiaApp/SensorCardView.swift:699-706 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"022a1bcf61dc77261e4e3c44d09b358aa8b707a0ab0d453a526a9d98f9f795c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:303-313 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:674-684 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf81dc24ab4673dce1b9a5593c26a0fd73863736dfcacc17f0be8a6f44b86d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/MiAccountSection.swift:243-252 | Sources/MenuBarMijiaApp/MiAccountSection.swift:322-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MiAccountSection.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"07770646ed98fa717eec777c591810ba5b0b3757c8fca41436d7097d38a28155"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiCloudClient.swift:508-513 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:535-540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiCloudClient.swift:508\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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"8355e358b42b0a10ab8d4ce8267b0ea2d0a94050d6f8334a506e37b6968f416c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiCloudClient.swift:1052-1057 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:1264-1269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiCloudClient.swift:1052\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"40213793789452e36edde2128e132c1abe4850a7b6a927a20c7b34e8a1ebb464"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/UpdateManifest.swift:91-96 | scripts/sign_update.swift:93-98 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/UpdateManifest.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc74cb25decf357c2bed0780d9b8401838e224818da47513bca3de1fae2d992c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:392-397 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:540-544 | Sources/MenuBarMijiaApp/DeviceCardView.swift:456-461 | Sources/MenuBarMijiaApp/DeviceCardView.swift:561-565 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"388158ebd3512cd96a2b72cfb3aaa8c23bd5b430d1f9b30dd47c4a70632780a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1081-1085 | Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1093-1097 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1048-1052 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1060-1064 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1081\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f432f4895981d308f5da3184bb658fab57d1f1ec0d1e24f86e718cf1e9bdf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/MenuBarMijiaApp/DeviceLayout.swift:163-167 | Sources/MenuBarMijiaApp/DeviceLayout.swift:566-570 | Sources/MijiaCore/RaycastSnapshot.swift:741-745 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift:163\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":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37ff4215ecf77bd6404653669c9cb99eff8066d1db3be036347ff17ff5623fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 6): Sources/MijiaCore/CommandIntent.swift:556-560 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:340-342 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:360-364 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:370-372 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:373-377 | Sources/MijiaCore/SmartDevice\u002BPresentation.swift:430-431 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/CommandIntent.swift:556\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/MijiaCore/CommandIntent.swift:556\u0060 calls \u0060tr\u0060 and \u0060Sources/MijiaCore/SmartDevice\u002BPresentation.swift:340\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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a35007cd0d3f37654d629244351b7e259b85d78d08ad3722b9dd05cdd69042"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/AssistantCommandBar.swift:458-462 | Sources/MenuBarMijiaApp/AssistantCommandBar.swift:489-493 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/AssistantCommandBar.swift:458\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"2efd0d36281fa83fee0d44b7843546624b6b337e269324057893d34d02ff6f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:177-186 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:187-196 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b11bb10b1c3f3da01bffa696d8e9ce6f9b86e2a827b7e507ed3d9a0ce495346"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:290-294 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:300-304 | Sources/MijiaCore/DeviceSynthesizer.swift:1707-1713 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:290\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"1faa4ff5f658bcffeec5be94781f4024807222609b55dae6176c678e78a4739c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:99-104 | Sources/MenuBarMijiaApp/RoomOrderEditor.swift:638-643 \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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f56705359b3703d26a984f612224bbf37f58a4e300c3e6f927ae7cd4afe87df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:13-17 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:14-18 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65ed4b27b0b90bebcb28db3578d80c583a9042ed5d37d76b22190854bb4c0ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:288-293 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:219-224 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"4487c1aa4b41df03b27bcade109fd9ba86d4107e86abe624c0c4e98124292e4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:769-773 | Sources/MenuBarMijiaApp/CoverDetailDrawer.swift:253-257 \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 \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:769\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"552a216853ff03647b48d7150c2f9af146ed473a27219b31f71236242aa1cd87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1238-1242 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1205-1209 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"66fb4b3209882cb094aeac14182be41fafc1cb3fe5cad565d4cad806bef5c893"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1245-1249 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1212-1216 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"0310d64ab20c48de1d78cef94cb4e0aaba7f3eda9570b333298bb5ecb23aece5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:216-220 | Sources/MenuBarMijiaApp/DeviceLayout.swift:469-473 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:216\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f490882e11d4ab2dc1c55a41d7cf7b4fa6af2f559cae72afa793894523ccc9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:254-261 | Sources/MenuBarMijiaApp/SensorCardView.swift:287-294 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed0888329ad98c1e7d169f78c5c5f8c8ccc777d6307c226072cc26ab62c2f02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:675-680 | Sources/MenuBarMijiaApp/SensorCardView.swift:708-713 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"71879584f29f30c9e79d33f7ab43d07a3622f351f3949e0a7ad2016dc204bf0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:293-300 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:664-671 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de019daade8b5e6b6a8a8c9b07547239976e8843f0768b1bd9910fa505eef20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/SettingsIconTiles.swift:102-106 | Sources/MenuBarMijiaApp/SettingsIconTiles.swift:123-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/SettingsIconTiles.swift:102\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/SettingsIconTiles.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"a720d23bc666e3777f7fb9d90e7fa5d0df08e4b99514aa926d98341256456e2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/UpdateSection.swift:348-352 | Sources/MenuBarMijiaApp/UpdateSection.swift:394-398 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/UpdateSection.swift:348\u0060 it does not close everything it opens, so those exact 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, \u0060Sources/MenuBarMijiaApp/UpdateSection.swift:353\u0060 calls \u0060toggle\u0060 and \u0060Sources/MenuBarMijiaApp/UpdateSection.swift:399\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":"Sources/MenuBarMijiaApp/UpdateSection.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55402658bcff3c2221f063acbf5bcefa3d9a7bdbea908ec7a5ecf5ddea13c19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/DeviceSynthesizer.swift:1046-1051 | Sources/MijiaCore/DeviceSynthesizer.swift:1092-1097 \u2014 both copies are in the same file, so extract the block 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1046}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa3134f8fdb9657cb262a7481968875b7f7f0384a695cfcc2c569e2ec4deda9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MijiaCore/DeviceSynthesizer.swift:1490-1498 | Sources/MijiaCore/DeviceSynthesizer.swift:1505-1513 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/DeviceSynthesizer.swift:1490\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":1490}}}],"partialFingerprints":{"codehealthFindingId/v1":"50deda35655c5ea132bd930bf7e251fc81caf75b27e7cd523ff6dccdcaa33cde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:347-353 | Sources/MijiaCore/MiCloud/MiCloudClient.swift:820-824 \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 \u0060Sources/MijiaCore/MiCloud/LocalMiIOClient.swift:347\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"2750f56580544505bd0f766da0b6973178b391c5ce23b1d99943b65a28b7bf04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:80-84 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:74-78 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f331b446c8499c7e558a792a5af23d2d5fa3d048d8e436b4d91c9983ea184f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:207-216 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:202-211 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"21bb2d257119ddad2e98ef54e52580f8d7a3da41be363cc5de62dcd75402ff72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:218-224 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:213-219 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad7c6e992ca5e445c40a431b0d6689d52cc16aecb5d4766ad299ffd00ab2841"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:255-262 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:245-252 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"e32d1813b2f98dbf3c12066a8815d63091a242ffb7218c746d1c87a8c8ad9593"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:269-275 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:259-265 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9d5d7dd2f6ba353a8399160f2667be259347e951b4a36886989ecd33c096e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:292-298 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:282-288 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:300\u0060 calls \u0060syncMenuBarWindowSize\u0060, \u0060updatePanelSize\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift:294\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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c82f19ef89229bec8e0bbaa3ba93aef07460e010afd65cca7aba2951d30e54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:406-410 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:400-404 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e2d2a2f336e3b285406ff3ed2022b5377a639eb098411fb553279ecd67fc38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:529-538 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:484-493 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae60290629a4e7a697908fb8b3f9d5ad6d688806ac9f53372c048a439e97853"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift:653-661 | Sources/MenuBarMijiaApp/ControlCenterPanel.swift:609-617 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 327 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ab590de18cd08f263507c7047fa7bb06f6ba3c4520a5cbf4dc167cdc1427fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:219-224 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:286-291 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"30137ad0710d085fe976fc03ad4a615e73d6efaa59736f1ef7c311a8fb73a6ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:804-808 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:436-440 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ea8da124e5f7dad142d61ca9134b82635d23f815abe138c2be2f44fdfbe769"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1168-1173 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:695-700 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1168}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0b999bade48fab869cf5290a03cf42e7e75160aa5cdc6414f58fceba7aed4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1175-1184 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:702-711 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"3217667ebd057a30845f34b1132160609bfa1f64167f97639d407e8afa06f36b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift:1224-1231 | Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift:751-758 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 500 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f33e3da4a8672a09ec356c561d5681ce7fde000d76ba629c97d285b2a7e0f21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:32-37 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:42-47 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5c7998fad06f683bdbd0da2dff4c431c656c8d09912b4dd258fc553ef3eca87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:44-50 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:54-60 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcebb41a22ab8e9a0c8ab45f94465576a4ce276a8d6f9d4d5450ce8467cf8a64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:61-66 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:71-76 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cb4ccbf4debf277640165c5aea1e010c13ec4d54e516ccb4e34c352994fa022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:368-373 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:248-253 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f155eba3287890e630c774362ca92284206975452dbddf04a707bed8dbdd41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:559-563 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:437-441 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"0018a81b573977e2ff944325c89bade5a0caf8acd60f0612f512534936394359"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:21-33 | Sources/MenuBarMijiaApp/DeviceCardView.swift:21-33 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac4c364b26ef2ff0efca4b992f8071af9f460656d09b02ab45028383b6cf3e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1356-1360 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1323-1327 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1356}}}],"partialFingerprints":{"codehealthFindingId/v1":"3986f203b9410e8b645876d524c04acde3a1cbc36d42a8a7d64f20c5b78c13f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift:59-63 | Sources/MenuBarMijiaApp/DeviceLayout.swift:696-700 \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":"Sources/MenuBarMijiaApp/Classic/ClassicGroupNamePrompt.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2c0326913228f5d463f3e3a6649adae8a2a5fa739ca3142767a30ea7bf1ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift:15-19 | Sources/MenuBarMijiaApp/PanelDesign.swift:133-137 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift\u0060 and \u0060Sources/MenuBarMijiaApp/PanelDesign.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicPanelDesign.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a6d5c0a45373c476177ac02710d4f159374474d8bf68a591e56629b857c31e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:657-664 | Sources/MenuBarMijiaApp/SensorCardView.swift:690-697 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"839d361f0766dd465135bfaf7c55ea8a2b6f0debfe9c4876fcc508b5b69ad724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:789-797 | Sources/MenuBarMijiaApp/SensorCardView.swift:819-827 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd0648710f8a3c2c96ea0169d3a2670cf7bd08521482862b8a4f94a3876a568"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift:18-22 | Sources/MenuBarMijiaApp/StackedCardGeometry.swift:27-31 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1553e5a11b949dc423020134fc61047b4d56e781646051824558356f60904e21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:251-256 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:622-627 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5decf913cbe0e891fd45f9d5c9e272339fb3ee0f5c36c1e4470c24dee10811"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift:286-291 | Sources/MenuBarMijiaApp/ThemeAndMotion.swift:657-662 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ThemeAndMotion.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f0550156bb8ba2b9bd25b2751391a51c2e793a4b9fc61cb148e9d6c8ac14fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MijiaCore/DualSourceHomeProvider.swift:57-64 | Sources/MijiaCore/MiCloud/MiCloudProvider.swift:122-129 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"63320e0e0bd6dd02aa27b44e12a2db900cc8d6e632b163248039c9469b84aa86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/MijiaCore/HomeProvider.swift:268-279 | Sources/MijiaCore/LGWebOSClient.swift:487-498 \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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"99eeda6113b38cdccb902e7d2074a7c8255d051f2d8097fbb361fd379fc43661"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.swift:11-20 | Sources/MenuBarMijiaApp/Classic/ClassicCoverDetailDrawer.swift:11-20 \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":"Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7185f9089e31e755e9543b89f0129719aae3d82c84a4cbdc605a69e1b1d5152"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:659-669 | Sources/MenuBarMijiaApp/DeviceCardView.swift:678-688 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"0882c49e82209934896f2f7d775eb89cc6ce003a3941bfd178ff6ab8c65aa8f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MijiaCore/EnergyHistory.swift:322-328 | Sources/MijiaCore/SensorHistory.swift:707-713 \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":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d6335cda001e16d96a6370a1fb16b0d4652bec3c40f92c355386338e51b0ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiCloudProvider.swift:845-849 | Sources/MijiaCore/RaycastSnapshot.swift:915-919 \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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78bf452c4b1a932090bbed4f4c70cb5e44462d47e26b75c8b6e403c25a69ad8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:282-286 | Sources/MenuBarMijiaApp/ClimatePanelModule.swift:292-296 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift:282\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f44997e69952e48ebdfa18b7475854f27b9be7d8fd76f4a6aa1e2f4cd450b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:657-664 | Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift:535-542 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift\u0060 and \u0060Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 388 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift:657\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2fe9a19a5fe60a9b2145718f40ed6c2380af86b4dea6f592589e88fc4916c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:609-615 | Sources/MenuBarMijiaApp/DeviceCardView.swift:660-666 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:609\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef634c235fc5438a22e53ea9fcc89582e9ca43622ffe4352aa06a4c1402ddae8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1271-1276 | Sources/MenuBarMijiaApp/DeviceCardView.swift:1238-1243 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060 as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 952 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift:1271\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e03f1ca733e27adfd6555e36f36627c9247cd463ae1018cac9b7b91b79de95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift:209-214 | Sources/MenuBarMijiaApp/DeviceLayout.swift:462-467 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift\u0060 and \u0060Sources/MenuBarMijiaApp/DeviceLayout.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicLayoutEditing.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8db06f5b3ef088d00193de374979b375f8227eb3ab012611109e6372d9f4a55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:764-772 | Sources/MenuBarMijiaApp/SensorCardView.swift:794-802 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f9f01760f88ca65f4f20aa073e8609b3ff5ea8f02ed841aefbb2b447cf06225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:684-688 | Sources/MenuBarMijiaApp/SensorCardView.swift:717-721 \u2014 before extracting anything, compare \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift\u0060 and \u0060Sources/MenuBarMijiaApp/SensorCardView.swift\u0060 as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 603 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:684\u0060 it does not close everything it opens, so those exact 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, \u0060Sources/MenuBarMijiaApp/SensorCardView.swift:722\u0060 calls \u0060lineLimit\u0060 and \u0060Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift:689\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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"6678b68c5a71aeaf41c89555133b5e77354f5bbc7ead1376f109e2ad9d706f46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:224-229 | Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:243-248 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:224\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc5611b0457fa6c363990130ba61f4999eed48b5c46c5daf0e1b55d6cc8a3d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:669-674 | Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:712-717 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/MijiaCore/MiCloud/MiotSynthesizer.swift:669\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea9a894e747b80c350da2173bed2069d22e566d444353ec3c3f66a01a2411625"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/MijiaCore/RaycastControls.swift:455-459 | Sources/MijiaCore/RaycastControls.swift:490-494 \u2014 both copies are in the same file, so extract the block 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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa52414f65f0cd3e385d3af0e136413a6804e2c18805c2161d6157b19be6844"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): windows/src-tauri/src/camera.rs:1302-1313 | windows/src-tauri/src/camera.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"9301080eb03bb3c5b69937bf598ce6cdd1af5051f4aebb9ad5f0656e4b8c0200"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): windows/src-tauri/src/desktop_shell.rs:66-75 | windows/src-tauri/src/desktop_shell.rs:123-130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060windows/src-tauri/src/desktop_shell.rs:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/desktop_shell.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"810bd987a8a9c52f79b07544b66ef6dd097505139de26b79345443de3d193702"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): windows/src-tauri/src/camera.rs:267-275 | windows/src-tauri/src/camera.rs:1145-1153 | windows/src-tauri/src/camera.rs:1197-1205 \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":"windows/src-tauri/src/camera.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"262573b048c08ceb8f5b1a7934089455132907b74ef0a97f0753cb35c703984b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): windows/src-tauri/src/camera.rs:1577-1585 | windows/src-tauri/src/camera.rs:1654-1662 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060windows/src-tauri/src/camera.rs:1577\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"8372d5e638e57194b0dbde1f9b35ee9a9e2de5f9bd54fea59101f616c146edb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): windows/src-tauri/src/window.rs:589-597 | windows/src-tauri/src/window.rs:713-720 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060windows/src-tauri/src/window.rs:589\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":"windows/src-tauri/src/window.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc80d68640bd25ea30bf0f2058e4e969c52840d910e72201c1e050856c95dc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): windows/src-tauri/src/window.rs:504-508 | windows/src-tauri/src/window.rs:533-537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/window.rs"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"a774ae636f292df32176f16a39037163eddcfe56dd536ec2930c6cda0d2c6a59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): windows/src-tauri/src/companion.rs:720-727 | windows/src-tauri/src/desktop_shell.rs:46-53 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"f776f42927566ae358ec9925a3a68569d2ac1572e6dc7d24a77c6a6d3a9cd3ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): scripts/probe_lan_gateway.py:341-346 | scripts/probe_lan_gateway.py:350-355 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/probe_lan_gateway.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5d12fe8ee733f516afd0def15a1f0f322d1c8a5e5e805a29f73b06a067b771"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): scripts/check_swift_harness_lints.py:363-373 | scripts/check_swift_harness_lints.py:377-387 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_swift_harness_lints.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc0f996a50c8919a26ceac590a35678d77dfe6b590e5d136d7d34465f583ccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): scripts/probe_lan_gateway.py:387-398 | scripts/probe_lan_gateway.py:402-414 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/probe_lan_gateway.py"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d02e52accb32e4055d6fa10d7328f947e5c26d463fc426a0b97c492a25a835"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): scripts/probe_lan_gateway.py:359-369 | scripts/probe_lan_gateway.py:373-383 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/probe_lan_gateway.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"9078b6f558b85f9706c368a24fdcc96a06fb24e0a4b17bfdf8d5bfc057e4e290"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (1 corresponding lines): scripts/linux-check/Shims/Security/Shim.swift:16-21 | scripts/linux-check/Shims/Security/Shim.swift:22-22 \u2014 These two members are one piece of code written twice and then edited apart: 1 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":"scripts/linux-check/Shims/Security/Shim.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e4512124c196868c551429d8b139a116b67068c09fbb3bf7202f44261b5bdf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/generate_app_icon.swift:88-97 | scripts/generate_app_icon.swift:134-143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/generate_app_icon.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":"scripts/generate_app_icon.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0549a2e4c829e4da5e466ddf278945d1673f64a21e4937b42c834ad1b6c8d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/probe_lan_gateway.py:387-394 | scripts/probe_lan_gateway.py:402-409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/probe_lan_gateway.py"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"e751632527ee4de07366babcada094b81fd8e978e3e0a451b6a9839371ee00e3"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: MijiaCore: MijiaCore: abstractness 0.03, instability 0.00, distance 0.97 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"5252b274e5d88920034baad7d10e0f3e6709b10661434113bedc9f5fcb8b24f4"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HotkeyAndNotificationManager (LCOM4 4): HotkeyAndNotificationManager\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6582d9868184ab6da07047748c0b258f5cbabf9c9be141058ec6ff21ee550c6"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MenuBarPanelController (LCOM4 4): MenuBarPanelController\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52f68c884943fcfc2bf865467afa6c3b1b153d38d44e9035cc69d708d206efc"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MockHomeProvider (LCOM4 4): MockHomeProvider\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"3439bf7c021a57f1bddada0e9211754fbf83e1728eb2c84b0fbc70280bd203aa"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: counterResetNeverGoesNegative: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/EnergyHistoryTests.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa99c36065161314589e064dc7ef9838a55cddc86f47ff8c6e722e798525e1a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: outOfOrderSamplesIgnored: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/EnergyHistoryTests.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94bc2cf531279bf2a798dc577bb7595b19ff767b9fe5a957a9201249dd53f4f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: restartKeepsHistoryAndBaseline: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/EnergyHistoryTests.swift"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37b2a27caca9ae5cfacbed0e830f6e916fa5cef104f9d6ab8d4c06977eae132"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: mutatedStreamsNeverTrap: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/FragmentedMP4DemuxerTests.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e5d26616fdbeeee3a4c44161f246922bb97d8ccd131b6b83ab61b14c89ad1b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: arbitraryBytesNeverTrap: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/FragmentedMP4DemuxerTests.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"48112b3edc93c9fee3422010b6bef33ad7e9eebb95d1d8ea7384a67771bcf480"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: randomFramesNeverTrap: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/HAHomeSnapshotTests.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"520b140e5e936d4e142557f49ca3d414ba0b597586691da98553a07d2454666f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: cleanMalformedFirmwareJSONFuzz: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/LocalMiIOAndHybridTests.swift"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd0b45b575922623381a21e3e8edde4564a4b82bac4dca4255615ac0fca1670"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: coverageGolden: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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":"Tests/MijiaCoreTests/MiotFacetsTests.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bbb70cb20dd6c40bfbf3fa18af07e45bebf74e76394460c2e2c4f6a5f6e5b22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/bindEvents.ts: windows/src/ui/bindEvents.ts changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 260 in bindEvents.bindEvents at line 144. 11 of those changes were fix/bug commits, and the other 23 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/bindEvents.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac63cac63840d152af8fa13c2b4fd3f032450e3b1dae26051c4105ce204eb0df"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/app.ts: windows/src/ui/app.ts changed 104 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in MenuMijiaWindowsApp.performUndo at line 857. 47 of those changes were fix/bug commits, and the other 57 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/app.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39d87304b14dbf5e500a30068ebab94ee4f413086b5c478c8eb8ea33ee64a66"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/DeviceSynthesizer.swift: Sources/MijiaCore/DeviceSynthesizer.swift changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 169 in DeviceSynthesizer.buildSmartDevice at line 871. 15 of those changes were fix/bug commits, and the other 18 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/DeviceSynthesizer.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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f421443912b711dd089683dcdcfc58171ba4aab28f87bdcd38abbe30d4e872"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BBackend.swift: Sources/MijiaCore/HomeStore\u002BBackend.swift changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in HomeStore.handleProviderEvent at line 225. 23 of those changes were fix/bug commits, and the other 28 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BBackend.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":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"d528a7fc325f8558ee8240547703fbee25c4c2df25c74da27777f407a9b617f7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BControls.swift: Sources/MijiaCore/HomeStore\u002BControls.swift changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in HomeStore.togglePrimary at line 60. 19 of those changes were fix/bug commits, and the other 28 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BControls.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":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6dfca5999ea3a1d4cdc3b594d5b89b5b32044022e64843449c15f164fd5d3d9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/models.ts: windows/src/core/models.ts changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in models.deviceStatusSummary at line 1129. 17 of those changes were fix/bug commits, and the other 19 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/models.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"52aa60d653d29f5d73fa5b35fdae5f5278e18d275275094ce70550b4a76c5ef1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore.swift: Sources/MijiaCore/HomeStore.swift changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in HomeStore.init at line 869. 38 of those changes were fix/bug commits, and the other 64 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore.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":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee6148786f81e22994b39033bf606e929698bd7236dacd06f63eb9e63b01b437"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/deviceViews.ts: windows/src/ui/deviceViews.ts changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 138 in deviceViews.deviceSvgIcon at line 852. 10 of those changes were fix/bug commits, and the other 14 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/deviceViews.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"df709767d3e8a7c0d742a8627c358fc90f0f06362bb4fee65c42424963cca1c5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BAssistant.swift: Sources/MijiaCore/HomeStore\u002BAssistant.swift changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in HomeStore.assistantEffect at line 1147. 22 of those changes were fix/bug commits, and the other 27 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BAssistant.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":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"d11e45736d25150faf0b6f4baa15bff68752b54d84552e4eb924bd4d59a3300b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeProvider.swift: Sources/MijiaCore/HomeProvider.swift changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in HAWebSocketProvider.mapCommandToService at line 817. 13 of those changes were fix/bug commits, and the other 28 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeProvider.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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"05382064b5b2b7f99d58c95f6e4b0a7da3f37d27cd4cac9255f4f3dd4bc0b006"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/Models.swift: Sources/MijiaCore/Models.swift changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in SmartDevice.hasDetailDrawer at line 1476. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/Models.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":"Sources/MijiaCore/Models.swift"},"region":{"startLine":1476}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa03040431fa8562fdfb1728708eb3b562abcc97c3710693c079812eaded6591"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/ControlCenterPanel.swift: Sources/MenuBarMijiaApp/ControlCenterPanel.swift changed 95 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PanelSearchKeyboard.handle at line 826. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ControlCenterPanel.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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0aa9b56b99ad81c63be24551e6b3d27d1ba6dfe5e982906f12e502d37a0215e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/homeAssistant.ts: windows/src/core/homeAssistant.ts changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in homeAssistant.buildKind at line 413. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/homeAssistant.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"821607634d9cfa7a89c5b13c9afdc34290ae992633b7c065f1257720d20179a9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/CommandIntent.swift: Sources/MijiaCore/CommandIntent.swift changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in IntentValidator.normalize at line 345. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/CommandIntent.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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb24c30dcb392fff4b275d41e9ff11559fc802bab9bfefe2228cf639849b0e97"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/settingsEvents.ts: windows/src/ui/settingsEvents.ts changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in settingsEvents.bindSettingsEvents at line 714. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/settingsEvents.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"d240beed25af9952c4f9027471ef43215e7afd3eb813b4d98976e8891b95df62"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiCloudProvider.swift: Sources/MijiaCore/MiCloud/MiCloudProvider.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in MiCloudProvider.resolveCameraStream at line 1132. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiCloudProvider.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":"Sources/MijiaCore/MiCloud/MiCloudProvider.swift"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"66069db932fa682b05bace84461c81837c8decaa59d18a563f486f093585ee0e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/cameraLive.ts: windows/src/ui/cameraLive.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in CameraLiveController.resolveCloudCameraStream at line 924. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/cameraLive.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2598ab0627c16fc03524df1c90feac6fd9e3f492b04d8b4d7bb52d43ce16a16"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/DeviceDeduplicator.swift: Sources/MijiaCore/DeviceDeduplicator.swift changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in DeviceDeduplicator.capabilityScore at line 400. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/DeviceDeduplicator.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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1393ffa075bb4a0e967fb8df544505135d36603741e4a728de3dc568cd1904"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/DeviceCardView.swift: Sources/MenuBarMijiaApp/DeviceCardView.swift changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in DeviceCardView.headerRow at line 538. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/DeviceCardView.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":"Sources/MenuBarMijiaApp/DeviceCardView.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91b831acc5ff16b471d6801f470787af46224fc1a8b2dcfc4fb0decabf25621"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BUndo.swift: Sources/MijiaCore/HomeStore\u002BUndo.swift changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in HomeStore.executeQuickAction at line 115. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BUndo.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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"7008d456622434420c2ba17ba635d9c46f3e52a1a5cc46b1b55ab188d54317c6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/cloudRefresh.ts: windows/src/ui/cloudRefresh.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in cloudRefresh.refreshDevices at line 84. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/cloudRefresh.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c904a19d16e0d66dc2d61e0dac3c3fb0baca6d4d44950b5a8219bf1e5a7c4f7e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/panelKeyboard.ts: windows/src/ui/panelKeyboard.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in panelKeyboard.handlePanelKey at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/panelKeyboard.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9533f7ec8f2db023089dedd9e397649c51a9638de0ae81f2e3109d44ab31c09"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiotCommandMapper.swift: Sources/MijiaCore/MiCloud/MiotCommandMapper.swift changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in MiotCommandMapper.map at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiotCommandMapper.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":"Sources/MijiaCore/MiCloud/MiotCommandMapper.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"154ddb77d4165c1891b555a0be336ecd827d1292683b0e1eae3ab3dca077148c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/DemoHomeProvider.swift: Sources/MijiaCore/DemoHomeProvider.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in DemoHomeProvider.applying at line 486. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/DemoHomeProvider.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":"Sources/MijiaCore/DemoHomeProvider.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"303bf40cbbc0505de65d1a7d9b05bdbe6d0ebe88a14288db643382223e8c5b26"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/UserHabitMemory.swift: Sources/MijiaCore/UserHabitMemory.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in UserHabitMemory.topSuggestions at line 704. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/UserHabitMemory.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":"Sources/MijiaCore/UserHabitMemory.swift"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"9388d46418f54f14aa167bed97ab7ed290a0c0d00a1a862acc0f01e72a4e8b12"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiotSynthesizer.swift: Sources/MijiaCore/MiCloud/MiotSynthesizer.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in MiotSynthesizer.genericApplianceStatusText at line 1531. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiotSynthesizer.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":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1531}}}],"partialFingerprints":{"codehealthFindingId/v1":"e23f891df98c781094d0a7a89d224eb1a198a9c086db532c8759f7eb253ae8ca"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/MenuBarPanelController.swift: Sources/MenuBarMijiaApp/MenuBarPanelController.swift changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in MenuBarPanelController.handleMouseDown at line 1361. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/MenuBarPanelController.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":"Sources/MenuBarMijiaApp/MenuBarPanelController.swift"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"a97ff28edc53a1ab24eca2bd49f105b5ca01e6d78309f95688464dc122a96fe4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/LocalIntentParser.swift: Sources/MijiaCore/LocalIntentParser.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in LocalIntentParser.parseEnglishCommand at line 784. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/LocalIntentParser.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":"Sources/MijiaCore/LocalIntentParser.swift"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47be6a09d10fbc2adc4ba779da20fb488e07d622a883c265c39f7329d4e0bfc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/AssistantCommandBar.swift: Sources/MenuBarMijiaApp/AssistantCommandBar.swift changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in SpeechInputController.start at line 150. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/AssistantCommandBar.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":"Sources/MenuBarMijiaApp/AssistantCommandBar.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"875316075552225bdcd4b5c6e0e67821c95eae7bc3a7ac02c9615652664c77bc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/SmartDevice\u002BPresentation.swift: Sources/MijiaCore/SmartDevice\u002BPresentation.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in SmartDevice.statusSubtitle at line 97. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/SmartDevice\u002BPresentation.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":"Sources/MijiaCore/SmartDevice\u002BPresentation.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f9c2d785effb67451cc3f633e813f9eb7f8f1eb55f194a77302f36cf119a5c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/commandEffects.ts: windows/src/core/commandEffects.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 137 in commandEffects.applyCommandToDevices at line 23. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/commandEffects.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4eba91a354771faf92553ebc67a27ef082f07e129950947dd8c2f1e641fd4a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/intent.ts: windows/src/core/assistant/intent.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in intent.parseChineseDeviceCommand at line 1154. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/intent.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e04ed5fe3da8aa2c2fe112d7a40af322ce32ed04a0b784ffed64c1a3acbb16"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/panelView.ts: windows/src/ui/panelView.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in panelView.renderPanel at line 19. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/panelView.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea1af3f6b1fadae5a3b10ef7513705fcb90b3cc6c468fcb0ef2d8dab6c443db"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src-tauri/src/main.rs: windows/src-tauri/src/main.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in menubarmijia_windows::main at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src-tauri/src/main.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/main.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c6f50ea8efdc2ca8762865e900f0900f14a76eed10ce7c357b6d8a33f236635"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/intentExecution.ts: windows/src/ui/intentExecution.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in intentExecution.executeIntents at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/intentExecution.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb5b4f5e735d0e32e63daf763d3c9381953274b9458c36b3b199f883a233a12"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/appUrlCommand.ts: windows/src/core/appUrlCommand.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in appUrlCommand.onOpenURL at line 1064. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/appUrlCommand.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a43c17491fa5e7a8358a19cc6459374e1cff75ff43fe7225d3fdbd35becc00"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/appLifecycle.ts: windows/src/ui/appLifecycle.ts changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in appLifecycle.hydrateCredentials at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/appLifecycle.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"25cbe7bbaf4171534b01505dd9888e4693bd2b8130d10232ad8ba1f94008fa8d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/commandDispatch.ts: windows/src/ui/commandDispatch.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in commandDispatch.applyCommand at line 839. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/commandDispatch.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"69cac4668d998dfaa20db802e2480f365d130a85aaaecb94ed4aa1bebef1f7ef"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/CameraLivePanelController.swift: Sources/MenuBarMijiaApp/CameraLivePanelController.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in CameraLivePanelController.present at line 314. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/CameraLivePanelController.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":"Sources/MenuBarMijiaApp/CameraLivePanelController.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ea15b8c58679b4cfe8cc84465bcf3a0e518a26877630a160e12e0f8ab527eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/automationEngine.ts: windows/src/core/automationEngine.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 108 in AutomationEngine.dispatchEvent at line 1045. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/automationEngine.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"af7d6051f8b7e1f15a9a35f57d4e1052b86d4b8292a6d9e5c26405204089ff86"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/promptContext.ts: windows/src/core/assistant/promptContext.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in promptContext.catalogStateSummary at line 89. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/promptContext.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da31288001807de07754c9963e62f8032da4439e72770b6224e4efaea57e1e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/SettingsWindowView.swift: Sources/MenuBarMijiaApp/SettingsWindowView.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ConnectionSettingsTab.body at line 1065. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/SettingsWindowView.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":"Sources/MenuBarMijiaApp/SettingsWindowView.swift"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f24f6517130fd3284869b3d428e2045111e24b407f9e3b06d7a40c01ae3131"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/automationSettingsView.ts: windows/src/ui/automationSettingsView.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 152 in automationSettingsView.bindAutomationSettingsEvents at line 1148. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/automationSettingsView.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64f1f07e563e92a4cf8b1c1504e8436eccd11760cfaf3308eae22a64c0f2c79"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/ModelIntentResolver.swift: Sources/MijiaCore/ModelIntentResolver.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ModelIntentResolver.planFromSystemOne at line 686. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/ModelIntentResolver.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":"Sources/MijiaCore/ModelIntentResolver.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"1093a0baf10102cf26a624b3035d1bbdab297d275dd2d955cb503872dc32d993"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/settings.ts: windows/src/ui/settings.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in settings.loadSettings at line 59. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/settings.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c02bed790887d2e44e28c486cb6e28307fedd28fd8483de2eb706b1b318c22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/detailDrawers.ts: windows/src/ui/detailDrawers.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in detailDrawers.bindDetailDrawerEvents at line 592. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/detailDrawers.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"3273c78ec7921537686031a2d39d1431353047292aaeb82628aa77da2e394b36"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/synthesis.ts: windows/src/core/miCloud/synthesis.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in synthesis.genericApplianceStatusDescription at line 523. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/synthesis.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bac6f0e3e4d9332f463b13cdc8092fa9f3610a904e22c0d9b7a0fb9acc3328f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/command.ts: windows/src/core/miCloud/command.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in command.coercePropValue at line 25. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/command.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f02366a7ed549b946424ef642013f94bfb7e35f33666fe94476e9b8ff6d3c76a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/spec.ts: windows/src/core/miCloud/spec.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in spec.parseMiotDeviceSpec at line 145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/spec.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba3b3527edbbafe9a041897038fd520611d946177045b31eda4fff20c3476259"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiCloudClient.swift: Sources/MijiaCore/MiCloud/MiCloudClient.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MiCloudClient.extractRawNumbers at line 1110. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiCloudClient.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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2425306d36b97ce532ae2bd051fbbc231061a0093d59176f8e2b45d4894f9b4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift: Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in HotkeyAndNotificationManager.roomOrderKeyAction at line 358. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.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":"Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"41894fd72afa0bd8179da73b39db81eb77fb4a148d2d3ed901eeac4e59b55bde"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/naturalCommand.ts: windows/src/ui/naturalCommand.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in naturalCommand.handleNaturalCommand at line 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/naturalCommand.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"307810d4d0ec67acde2a5969d37a4930e56f939f921406f24190e684e506b4c4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/reconciler.ts: windows/src/ui/reconciler.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in reconciler.extractControlIdentityKey at line 128. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/reconciler.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"6501f3282e10d689456447e46ecbb327fc1acabe45a837c365f1adcb05f5a53e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/URLCommandHandler.swift: Sources/MenuBarMijiaApp/URLCommandHandler.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in URLCommandHandler.execute 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-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/URLCommandHandler.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":"Sources/MenuBarMijiaApp/URLCommandHandler.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cab21d9528deb1b414427dd200fee368b39b11214faacd99839a29001889a08"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/settingsViews.ts: windows/src/ui/settingsViews.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in settingsViews.renderGeneralPanel at line 324. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/settingsViews.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2cb306169d3454c284d3b3ca7a3d3067ac3c734970a0e6bd042cfe1f3284cb9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/ThemeAndMotion.swift: Sources/MenuBarMijiaApp/ThemeAndMotion.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in LiquidGlassSlider.classicBody at line 686. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ThemeAndMotion.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":"Sources/MenuBarMijiaApp/ThemeAndMotion.swift"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"f817152b66712fccc1dc1c25608f19c42cf70031b0e7417a6ba648191fce8769"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/menuViews.ts: windows/src/ui/menuViews.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in menuViews.renderContextMenu at line 88. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/menuViews.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"708ab32cf6fec3849f5275dfc47574f077e3ab7b65c3c1969f9760fafb796501"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/SensorCardView.swift: Sources/MenuBarMijiaApp/SensorCardView.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SensorCardView.chartPlot at line 435. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/SensorCardView.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":"Sources/MenuBarMijiaApp/SensorCardView.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aafbcb3f0803b5db5fc7c8d5f6355d1062ec8f7c5c6d3990675670b3419c47f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift: Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MenuBarStatusSummary.text at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/MenuBarMijiaApp.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":"Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"27902b3adc6fb8363ef4a1b7db083ca68702b32e729c25f05a3550fea2b188e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiAccountsProvider.swift: Sources/MijiaCore/MiCloud/MiAccountsProvider.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in MiAccountsProvider.updateAccounts at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiAccountsProvider.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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"912c8c57231d3c2006152bbe761d24f25f07ec5c6889b8df89f29a38b6346cb7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/ManualControlPolicy.swift: Sources/MijiaCore/ManualControlPolicy.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ManualControlPolicy.facetRequiresConfirmation at line 176. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/ManualControlPolicy.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":"Sources/MijiaCore/ManualControlPolicy.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd7d29713e9839548e83164c2a278397d47039b1755ff4b886635306ff6cebdf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/AppURLCommand.swift: Sources/MijiaCore/AppURLCommand.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in AppURLParser.parseEnvelope at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/AppURLCommand.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":"Sources/MijiaCore/AppURLCommand.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"19cfdf93c475612d90b1e42a019550d402872bd1b3b3914d420ee5b9df30b26e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/activityStackView.ts: windows/src/ui/activityStackView.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in activityStackView.buildUpperCardFactories at line 1408. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/activityStackView.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1408}}}],"partialFingerprints":{"codehealthFindingId/v1":"0506e8dbb15660e04aa9bd8d17a3d7ccaa719fea81f4a09fb32eb0f7f8ada541"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/facets.ts: windows/src/core/miCloud/facets.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in facets.facetControls at line 484. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/facets.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d0327c0d7db3f1bc401b6db30bd0d0076709afd774ebd7db7c7058a2b9519b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/layoutGestures.ts: windows/src/ui/layoutGestures.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in layoutGestures.bindLayoutGestures at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/layoutGestures.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dfc29b45972b5ae737ec6beb7971027d88c51f501faf093aeae4c760b2f18ca"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift: Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ControlCenterPanel.emptyStateView at line 442. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ControlCenterPanelChrome.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":"Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"3384a7de2846d76297e6d142dabd64e2a3f454f657566d74d659433537bc669a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiAccountLogin.swift: Sources/MijiaCore/MiCloud/MiAccountLogin.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MiAccountLogin.parseSetCookieExpiry at line 263. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiAccountLogin.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":"Sources/MijiaCore/MiCloud/MiAccountLogin.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd1fa2cfced48f26c7972c0b39c066a6ce9eafa3d737e35f82d9a4bf5fbd815"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/UpdateChecker.swift: Sources/MijiaCore/UpdateChecker.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AppUpdater.stageUpdate at line 1060. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/UpdateChecker.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":"Sources/MijiaCore/UpdateChecker.swift"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"4921549f66b0ebe2a90f0fe83c1231430bd29d23b5ff0de5f55869329b9738b2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/ModelActionPolicy.swift: Sources/MijiaCore/ModelActionPolicy.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ModelActionPolicy.decide at line 124. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/ModelActionPolicy.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":"Sources/MijiaCore/ModelActionPolicy.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"178cd828149b604fec2f6b4f8e58d7d52a88e4106532c9291dc0f48c978a88b2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/AssistantConfig.swift: Sources/MijiaCore/AssistantConfig.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AssistantProviderPreset.infer at line 200. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/AssistantConfig.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":"Sources/MijiaCore/AssistantConfig.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b76c7b5f3b23afd0ccb6de61b786669127cf26c57a1e14a8548ad93907182d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HAHomeSnapshot.swift: Sources/MijiaCore/HAHomeSnapshot.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in HAHomeSnapshot.receive at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HAHomeSnapshot.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":"Sources/MijiaCore/HAHomeSnapshot.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c8a1867975dd2b17ca9267602f4bd8b343edf2a8bdc04128e8503561e75362"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BMetrics.swift: Sources/MijiaCore/HomeStore\u002BMetrics.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HomeStore.menuBarText at line 161. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BMetrics.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":"Sources/MijiaCore/HomeStore\u002BMetrics.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"06030e0d077fb613f40b87e4e74b38f534d5c51919d482a54788b1157c50e80f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/haDomains.ts: windows/src/core/haDomains.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in haDomains.buildMediaPlayerKind at line 515. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/haDomains.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f44a7f5c42edea2472be4f74384f7e46aa39e7493ef417464b2a4510ebb215"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift: Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ControlCenterPanel.deviceCollectionView at line 675. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ControlCenterPanelLayout.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":"Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e45c1a90ffba174cd76590f8f99857c6c6ecddd295e3ed1b5c97ef95c8e066"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BControlWrite.swift: Sources/MijiaCore/HomeStore\u002BControlWrite.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in HomeStore.commitManualWrite at line 868. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BControlWrite.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":"Sources/MijiaCore/HomeStore\u002BControlWrite.swift"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"3211c30ea78ac3fd86ec3a0d144a76e7dc80eb4a7a0fe71f061a6f950c924344"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/proactive.ts: windows/src/ui/proactive.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in proactive.maybeRefreshProactiveInBackground at line 202. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/proactive.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/proactive.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec42b1f0186084ccbf0b10e1fc6fd4ef7d156081b66a1bdd583246bb9af653e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/modelIntentResolver.ts: windows/src/core/assistant/modelIntentResolver.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ModelIntentResolver.planFromSystemOne at line 205. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/modelIntentResolver.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"a72507d5f4f894c1e11764a0675381b8eb2120f47447fc535ae6beea4de208cf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/client.ts: windows/src/core/miCloud/client.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in MiCloudClient.parseRooms at line 311. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/client.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a176e95a86cbac9445d95f5664f90efaedfff7f0d924d627121e32e7a11c3b1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/check_capability_matrix.py: scripts/check_capability_matrix.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in check_capability_matrix.main at line 594. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- scripts/check_capability_matrix.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":"scripts/check_capability_matrix.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"500c27984093e3caf8a6883e77b25916b484a1ff7b4ed90dae1903885876d666"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift: Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in CameraLiveVideoPlayer.enqueue at line 261. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.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":"Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abe535d5be8b342402d58da83380e47a168dad49d6b141051baa600df1471f7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/DualSourceHomeProvider.swift: Sources/MijiaCore/DualSourceHomeProvider.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in DualSourceHomeProvider.handle at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/DualSourceHomeProvider.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":"Sources/MijiaCore/DualSourceHomeProvider.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"302c57902fd491838b0353d859a4d9359d13917fea1a8e2c1cf953cb044dfdcc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift: Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ClassicDeviceCardView.headerRow at line 479. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"507ac2b9c7f74e4b12c4ab82520910b6d6b769c7ea8016e10fc31e7ec32c08f9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/sign_update.swift: scripts/sign_update.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in sign_update.swift.main at line 130. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- scripts/sign_update.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":"scripts/sign_update.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"6472cc7c69ecb688f12d5ca209fecc005f5a4704cf3d5a3e99a7a857e1e74d45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/actionPolicy.ts: windows/src/core/assistant/actionPolicy.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in actionPolicy.confirmationHazard at line 65. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/actionPolicy.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2d0bd2a3de90b1226c4097aef9b2154065fc3302a0c60915e5c7d971640839"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift: Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ApplianceDetailDrawer.body at line 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ApplianceDetailDrawer.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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de7cb35557259a70e3c1a6a0034a97b852ca230b34b5a50445fd6e65410ab84"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src-tauri/src/camera.rs: windows/src-tauri/src/camera.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in menubarmijia_windows::camera::spawn_cs2_udp_relay at line 1983. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src-tauri/src/camera.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1983}}}],"partialFingerprints":{"codehealthFindingId/v1":"869bd2ab58560b1f18fb9ee42802b34d0b9ca0725fe06d9f0adead24e6e1f3c6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/optimisticLock.ts: windows/src/core/optimisticLock.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in optimisticLock.applyHAExtendedCommandEffect at line 1007. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/optimisticLock.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f44e61d0dac948023aa5ae812ef38e937794dc8258fe5eb5aeef95fa77c924"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/facetViews.ts: windows/src/ui/facetViews.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in facetViews.row at line 223. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/facetViews.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7675e0b73778c0c1a511c7c93ada06017eed2df7dba3fc9890e26b3124fc3d8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/speechGuard.ts: windows/src/ui/speechGuard.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in speechGuard.executeBuiltInQuickAction at line 592. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/speechGuard.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"d53c0db1ce3544948bedb929d28fe8b22515145f10ff245074600e0b1fb9bfd2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/GrokBallSidecarController.swift: Sources/MenuBarMijiaApp/GrokBallSidecarController.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in GrokBallSidecarController.handlePointer at line 266. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/GrokBallSidecarController.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":"Sources/MenuBarMijiaApp/GrokBallSidecarController.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee648d432e7b98df3df7ff9ae7691d61564040fde73a3315e19661e8cd8c51bc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/WeeklyHealthReport.swift: Sources/MijiaCore/WeeklyHealthReport.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in WeeklyHealthReport.markdown at line 253. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/WeeklyHealthReport.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":"Sources/MijiaCore/WeeklyHealthReport.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"c069044cbbe8a437276360d3847b76cdf99c69c9e12140de290d2d4c08f27e20"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/DeviceFacetViews.swift: Sources/MenuBarMijiaApp/DeviceFacetViews.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in DeviceFacetSection.rowBody at line 383. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/DeviceFacetViews.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":"Sources/MenuBarMijiaApp/DeviceFacetViews.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"95c8cb335afeb6968325a3bfae718337770fa84bd4385076d26796efc2597f31"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift: Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Go2RTCOwnerRecord.parse at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/XiaomiCameraBridge.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":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5b810c4afe303cf053a233ec7dc85fbbe5a9a55a4d76dfeccda5c9e2f356e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/ui/cameraLiveModalView.ts: windows/src/ui/cameraLiveModalView.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in cameraLiveModalView.renderCameraLiveModalView at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/ui/cameraLiveModalView.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7cbedbd5d7acba63a21cc9a1dfbcfefa186acd04af0b555c9284b86d8b86b8c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/UnsupportedDeviceCollector.swift: Sources/MijiaCore/UnsupportedDeviceCollector.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UnsupportedDeviceCollector.homeAssistant at line 89. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/UnsupportedDeviceCollector.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":"Sources/MijiaCore/UnsupportedDeviceCollector.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca4587e3cff874a90d5f46fd75e42bba2367494461fb506ef2e94c9ffec024a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/secureStore.ts: windows/src/core/secureStore.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in CredentialVault.deleteMiSession at line 470. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/secureStore.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"55affe322d797d252ca1337145d8ec507697ef5bc75dbfd0950699eb2238445c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MacContextAutomation.swift: Sources/MijiaCore/MacContextAutomation.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in MacContextAutomation.events at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MacContextAutomation.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":"Sources/MijiaCore/MacContextAutomation.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"992d8f7e501e52f1a1510ce9f935c0db822f299b5f191a097f128ae3e3953ab3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src-tauri/src/network.rs: windows/src-tauri/src/network.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in menubarmijia_windows::network::native_http at line 136. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src-tauri/src/network.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e094e0b27985e2ce8c2fc2035aa27ce07f24bbe84b2479b946ebc0836cc502"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/FragmentedMP4Demuxer.swift: Sources/MijiaCore/FragmentedMP4Demuxer.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in FragmentedMP4Demuxer.parseFragment at line 301. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/FragmentedMP4Demuxer.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":"Sources/MijiaCore/FragmentedMP4Demuxer.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"410abb2b953c0bba5511cbec2f217dc6d3cb7ffafb071b7763901435cb060cf6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/MiCloud/MiotFacets.swift: Sources/MijiaCore/MiCloud/MiotFacets.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MiotFacetEngine.controls at line 553. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/MiotFacets.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":"Sources/MijiaCore/MiCloud/MiotFacets.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"470a79867898393ee75314a6aada009d6643b6d4f891b9dfd32417e3c47cdba8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/miCloud/cameraHubs.ts: windows/src/core/miCloud/cameraHubs.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in cameraHubs.resolveLiveCameraTarget at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/miCloud/cameraHubs.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b1bdb071951ae53e7715dc5cfc98cb6e79177ad083f2088b8136e5900acb43"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/scripts/verify-flyout-layout.mjs: windows/scripts/verify-flyout-layout.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in verify-flyout-layout.main at line 578. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/scripts/verify-flyout-layout.mjs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6be9efc87d20c5aaf95d716362707ce96e078111d12ab7cee3d6b82e99ce0b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/EnergyHistory.swift: Sources/MijiaCore/EnergyHistory.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in EnergyHistory.record at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/EnergyHistory.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":"Sources/MijiaCore/EnergyHistory.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"232e30beee587986f9547155e7cea758d1339847e62f3be66a47e3ba6222b216"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/UpdateManifest.swift: Sources/MijiaCore/UpdateManifest.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in UpdateManifest.parse at line 110. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/UpdateManifest.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":"Sources/MijiaCore/UpdateManifest.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"5934964c4d71518a1b035069906449446c25e84e7684661e0066daf73aef78cd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/deviceCategory.ts: windows/src/core/assistant/deviceCategory.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in deviceCategory.deviceCategory at line 246. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/deviceCategory.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/deviceCategory.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5045618b33846dafc7d04a179d00038ff76089d37442111b3d01e6f3945ca95"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/updateChecker.ts: windows/src/core/updateChecker.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in updateChecker.parseInstallerAssetRecord at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/updateChecker.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3d5251f6b04d17babdaa66111dcc74884dc03736f5f30ea36a4d11b16f629c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/HomeStore\u002BUpdate.swift: Sources/MijiaCore/HomeStore\u002BUpdate.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in HomeStore.startUpdateInstallation at line 88. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/HomeStore\u002BUpdate.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":"Sources/MijiaCore/HomeStore\u002BUpdate.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"4119898a1ca7f91c1f1c5eb91d07b266fdb6b5fb62fdd79e6040a92303992334"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/SystemActivityMonitor.swift: Sources/MenuBarMijiaApp/SystemActivityMonitor.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SystemActivityMonitor.apply at line 121. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/SystemActivityMonitor.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":"Sources/MenuBarMijiaApp/SystemActivityMonitor.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e1001513da14d92bcfd91147d22e9f5949a3977f09516b03676369829803f7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/RaycastControls.swift: Sources/MijiaCore/RaycastControls.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HomeStore.executeCoverPosition at line 267. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/RaycastControls.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":"Sources/MijiaCore/RaycastControls.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"760a4afcb85961068a2a664e66cd1eb5150d22611a3df638294dad1ce7cf82e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift: Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in MenuBarPanelController.showPanel at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.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":"Sources/MenuBarMijiaApp/MenuBarPanelController\u002BPresentation.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"efaa65499d602f5f404ac2db5db281a987d358bcad4c85439e7fb0950d7f9c39"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: windows/src/core/assistant/chineseIntentTables.ts: windows/src/core/assistant/chineseIntentTables.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in chineseIntentTables.spokenChineseNumber at line 195. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src/core/assistant/chineseIntentTables.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"200af8265582b46dbbcae707e613ce84ea0a8f2fb8378cd35b69ca52ddd0744d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/MijiaCore/SafetyMonitor.swift: Sources/MijiaCore/SafetyMonitor.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SafetyMonitor.evaluate at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/SafetyMonitor.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":"Sources/MijiaCore/SafetyMonitor.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"757c0ce2f9f395e05141f39c225b3a5b836a8399280d214f9e3d23076fa0ee82"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift: Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is CameraLivePanelController.run at line 133), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(camera): keep a release stop tracked when quitting retries a failed PTZ stop (#195)\u201D; \u201Cfix(camera): harden macOS and Windows camera lifecycle, PTZ stop, go2rtc reaping, and topology cache (#157)\u201D; \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix: close doorbell, read-only control, and URL temperature gaps (#79)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/CameraLivePanelPTZ.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":"Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3cb4a48a845c19a727180b00ff8c8ba26922e20d58d6eb0295ba7bc2ce5cdc"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MijiaCore/AssistantSchedule.swift: Sources/MijiaCore/AssistantSchedule.swift changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is DelayPhrase.spokenNumber at line 138), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix(macos): consume timers before running and keep them across source changes (#52)\u201D; \u201Cfix(macos): guard safety notifications and bind timers to their source (#43)\u201D; \u201Cfix: protect NAS deployments and complete assistant localization (#72)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/AssistantSchedule.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":"Sources/MijiaCore/AssistantSchedule.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"27304766e1dbc4a261c9388505a35e9a0f79157642ecbc4b4b6cedcdd8ec17e8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: windows/src-tauri/src/window.rs: windows/src-tauri/src/window.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 9 (its worst body is menubarmijia_windows::window::toggle_main_window at line 760), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(windows): harden Tauri IPC bounds, camera stream allowlist, and dead stubs (#135)\u201D; \u201Cfix(windows,scripts): add flyout geometry, layout, and worktree gates (#127)\u201D; \u201Cfix(windows): harden Win11 flyout footer, sub-flyout stack, and spatial tray toggle (#122)\u201D; \u201Cfix(windows): refine Win11 hybrid capsule pills, camera deck, sub-flyout, and tray reopen (#121)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- windows/src-tauri/src/window.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/window.rs"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"de84e3a16ce72fdf862f26ae4922fff498e8e495fbf73acff9284b9135635616"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift: Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is ClassicControlCenterPanel.omnibar at line 542), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Crefactor(macos): deduplicate Classic/Glass views and fix UI/idle regressions (#41, #32a, #32b, #39, U2-U4, U7-U8) (#142)\u201D; \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix: resolve remaining Codex review findings from PRs #70 and #103 (#109)\u201D; \u201Cfix: harden untrusted-number handling and close cross-platform gaps found in the 1.2.5 read (#103)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"07480f403a80821e376daf046661359575d7230b7734f5aaf1a481bc3dfa0371"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MijiaCore/MiCloud/LocalMiIOClient.swift: Sources/MijiaCore/MiCloud/LocalMiIOClient.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is LocalMiIOClient.isPrivateRFC1918IPv4 at line 416), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(swift): prune dead non-seam symbols and complete zh-Hant localization (#162)\u201D; \u201Cfix(security): close network, redirect, LAN, handshake, and rate-limit boundaries (#139)\u201D; \u201Cfix: project audit fixes for assistant, automation, facet safety, Windows, and CI (#129)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MijiaCore/MiCloud/LocalMiIOClient.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":"Sources/MijiaCore/MiCloud/LocalMiIOClient.swift"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9e7ec325fa5946c891d6adc7465c09a983add556429e69ad552aba3ce7567a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.swift: Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 1 (its worst body is ClassicApplianceDetailDrawer.body at line 11), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Crefactor(macos): deduplicate Classic/Glass views and fix UI/idle regressions (#41, #32a, #32b, #39, U2-U4, U7-U8) (#142)\u201D; \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix: resolve remaining Codex review findings from PRs #70 and #103 (#109)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.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":"Sources/MenuBarMijiaApp/Classic/ClassicApplianceDetailDrawer.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"82695c245b674c7d7cc46a023ea5d51e14aa49ef8d0576b2deaafd0fd68db74f"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MenuBarMijiaApp/Classic/ClassicDeviceFacetViews.swift: Sources/MenuBarMijiaApp/Classic/ClassicDeviceFacetViews.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 1 (its worst body is ClassicDetailPillButton.body at line 12), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Crefactor(macos): deduplicate Classic/Glass views and fix UI/idle regressions (#41, #32a, #32b, #39, U2-U4, U7-U8) (#142)\u201D; \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix: harden untrusted-number handling and close cross-platform gaps found in the 1.2.5 read (#103)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/Classic/ClassicDeviceFacetViews.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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceFacetViews.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c6508c3b18b4e7f2278b23236bd9da0b54875802aed104c32f951fb8564d09"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/MenuBarMijiaApp/ControlCenterPanelStacks.swift: Sources/MenuBarMijiaApp/ControlCenterPanelStacks.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is ControlCenterPanel.deviceStacks at line 180), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: close pre-1.2.5 cross-platform security, concurrency, synthesis, and release-gate findings (#107)\u201D; \u201Cfix: resolve remaining Codex review findings from PRs #70 and #103 (#109)\u201D; \u201Cfix(macos): omit redundant single-item headers and duplicate room badges in Liquid Glass (#89)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-19 19:53:40 \u002B08:00\u0027 --until=\u00272026-11-17 19:53:40 \u002B08:00\u0027 --full-history --no-merges -- Sources/MenuBarMijiaApp/ControlCenterPanelStacks.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":"Sources/MenuBarMijiaApp/ControlCenterPanelStacks.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad451a9620f0e8d988fdba782881f4a77e89501e26cccf945e17c51b62f0ff9"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 4 significant file(s) lose their only recent owner: Sources/MijiaCore/ModelIntentResolver.swift, Sources/MijiaCore/AssistantConfig.swift, Sources/MijiaCore/KeychainAndPrefs.swift, Sources/MijiaCore/MiCloud/MiCloudCrypto.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0fb4265ee04276c9ebc1f37b133c9cfeffb2414071929b72ad64620d43aa6bfa"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060sharesDID\u0060 spells \u0060DID\u0060 where 25 names in the project spell it \u0060Did\u0060: 25 of 26 names in project MenuBarMijiaApp spell the token \u0060Did\u0060 (25 of 26; unit: names in project MenuBarMijiaApp containing \u0060Did\u0060). Peers: AutomationEngine.rulesDidChange (Sources/MenuBarMijiaApp/AutomationEngine.swift:192); CameraLivePanelController.ptzManualStopBatchDidFinish (Sources/MenuBarMijiaApp/CameraLivePanelController.swift:125); CameraLivePanelController.windowDidResignKey (Sources/MenuBarMijiaApp/CameraLivePanelPTZ.swift:390); CameraPictureInPicture.pictureInPictureControllerDidStartPictureInPicture (Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift:807); CameraPictureInPicture.pictureInPictureControllerDidStopPictureInPicture (Sources/MenuBarMijiaApp/CameraLiveVideoPlayer.swift:845). Rename to \u0060sharesDid\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"646804a60fccccb10393b72114f6ac97b73b95d3b9e2b57989913747e76869e1"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060cameraCardByHaDevice\u0060 spells \u0060Ha\u0060 where 32 names in the project spell it \u0060HA\u0060: 32 of 34 names in project repository spell the token \u0060HA\u0060 (32 of 34; unit: names in project repository containing \u0060HA\u0060). Peers: DoorbellDetector.ingestHASnapshot (windows/src/core/automationEngine.ts:1400); dualSourceProvider.extractHADeviceIdentities (windows/src/core/dualSourceProvider.ts:149); PairingState.pairedHA (windows/src/core/dualSourceProvider.ts:424); PairingState.miIndexForHA (windows/src/core/dualSourceProvider.ts:426); dualSourceProvider.reconcilePairedHALightGroups (windows/src/core/dualSourceProvider.ts:485). Rename to \u0060cameraCardByHADevice\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1469}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bbbf156e2013d1fc5a79b99d3e6ea437f92c31108d280993c4f15db6c33a3a"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060sharesDID\u0060 spells \u0060DID\u0060 where 13 names in the project spell it \u0060Did\u0060: 13 of 14 names in project repository spell the token \u0060Did\u0060 (13 of 14; unit: names in project repository containing \u0060Did\u0060). Peers: CameraRecordMetadata.parentDid (windows/src/core/miCloud/cameraHubs.ts:35); cameraHubs.extractRecordParentDid (windows/src/core/miCloud/cameraHubs.ts:49); LiveCameraBridgeTarget.bridgeDid (windows/src/core/miCloud/cameraHubs.ts:372); MiDeviceRecord.splitParentDid (windows/src/core/miCloud/client.ts:20); MiDeviceRecord.parentDid (windows/src/core/miCloud/client.ts:22). Rename to \u0060sharesDid\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"291cd6278b057f1d165f45a068e002feb19e816fac176f50a9c5ea235cf3f3c1"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060resolveHaCameraStreamUrl\u0060 spells \u0060Ha\u0060 where 32 names in the project spell it \u0060HA\u0060: 32 of 34 names in project repository spell the token \u0060HA\u0060 (32 of 34; unit: names in project repository containing \u0060HA\u0060). Peers: DoorbellDetector.ingestHASnapshot (windows/src/core/automationEngine.ts:1400); dualSourceProvider.extractHADeviceIdentities (windows/src/core/dualSourceProvider.ts:149); PairingState.pairedHA (windows/src/core/dualSourceProvider.ts:424); PairingState.miIndexForHA (windows/src/core/dualSourceProvider.ts:426); dualSourceProvider.reconcilePairedHALightGroups (windows/src/core/dualSourceProvider.ts:485). Rename to \u0060resolveHACameraStreamUrl\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"2daa9896377a3512a21480478be7db208bced6dd6e4d04a6f27ab14a54ff69b8"}},{"ruleId":"D24","level":"note","message":{"text":"redundant comment: \u0022Two online hubs in the same room -\u003E ambiguous_hub\u0022 repeats the code it sits on: 5 of its 6 words (two, online, hubs, room, hub) are already in \u0060const twoInSameRoom = resolveCameraHub(\u0060. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/cameraLens.test.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61ec130d2df5d5cbc92ada84dd82691209a1166137bb81d8d5a7a1c6e7f97c5"}},{"ruleId":"D24","level":"note","message":{"text":"redundant comment: \u0022Positive switched lights\u0022 repeats the code it sits on: 3 of its 3 words (positive, switched, lights) are already in \u0060const positives: SmartDevice[] = [\u0060. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":2583}}}],"partialFingerprints":{"codehealthFindingId/v1":"587feccdcdf4b93894d4a697c3d41fad219bd3309cbd5ffaa3c78af2f58e5050"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (88806 LoC, 804 module-visible types across 6 directories) overshoots its size bounds. 2 of 5 build unit(s) (Cargo, SwiftPM, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. 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":[{"physicalLocation":{"artifactLocation":{"uri":"Package.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef91926bd754eb6d4ee98140c4b33eb6f98f362cf24a02371c2db5e0aec4e519"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060windows\u0060 (63801 LoC, 454 module-visible types across 5 directories) overshoots its size bounds. 2 of 5 build unit(s) (Cargo, SwiftPM, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. 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":[{"physicalLocation":{"artifactLocation":{"uri":"windows/package.json"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"384465c941e19759a37860b9d95854839ac7035abbb97c4fe306fcd46906a5a6"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9b79a42c1353f66f0a4d39600ecafc51a05b89031e98896312f2acc981a4331"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"20c0b461b1ba15d0326c19b2f1324052f9470f2e3b813d04c11865e3e283d01d"},"taxa":[{"id":"CWE-125","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"756e33f26b0e50309d5e89c499dcad2b69ec22ef4fd9304fba80a6e251456e47"},"taxa":[{"id":"CWE-125","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f67a21832d1cba10f7df7aee1e97d04d1b9f4f1d94697c35cb5be1f4414aad07"},"taxa":[{"id":"CWE-125","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3103143c896a8e81dc2d6a427618744f695915e53cfc2aeecc6498f40ea22073"},"taxa":[{"id":"CWE-1333","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1909e3afcd3cbcc8638a3bc73b11054997d96dd35ecbd54abd7f35aadf27b5d7"},"taxa":[{"id":"CWE-1333","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4f5379cbc9c3a6ecb2fc27371e1e74f36f725d5aa458e369192a126d51cadeaa"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11789ca0fa2bfcffcb9677abac167aaa9c6c4bfa83cbc2b1426bc953edb07041"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9d57521546c8ac8c717490880fdadfed88eac564d957cf08804e85a1500b10aa"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5c626d44315461df7ad08ad07182d756627277d7c6250dd55775dbe14ec0f3e8"},"properties":{"dependency":{"package":"happy-dom","version":"21.0.3","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"severity":"high","fixedVersion":"21.0.4","relation":"direct","declaredRange":"^21.0.3","reachability":{"kind":"production","file":"windows/tests/companionBridge.test.ts","line":4}}}},{"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":"30ec4bf452117b9bad5529267fb7e95d5a5ca854486b7e69e846627c9aa5600a"},"properties":{"dependency":{"package":"chrono","version":"0.4.45","advisory":"RUSTSEC-2026-0543","severity":"medium","relation":"transitive","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":"492c2b2206089236537f690e642a69ec81a4ed043800ebf2f842d6c482c2ae6a"},"properties":{"dependency":{"package":"glib","version":"0.18.5","advisory":"[GHSA redacted]","aliases":["RUSTSEC-2024-0429"],"severity":"medium","fixedVersion":"0.20.0","relation":"transitive","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":"7aea4dddda66fbbd2d05214aa39f773ae5393ed0fdff40a3146c52f4e8fc935b"},"properties":{"dependency":{"package":"proc-macro-error","version":"1.0.4","advisory":"RUSTSEC-2024-0370","severity":"medium","relation":"transitive","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":"c5ef1b07fc2c6fe29783cc72c99e7b7a1f2f9ce24ea8aadbfd440c6e584d8f34"},"properties":{"dependency":{"package":"rustix","version":"1.1.5","advisory":"RUSTSEC-2026-0486","aliases":["[GHSA redacted]"],"severity":"medium","fixedVersion":"1.1.6","relation":"transitive","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":"7460514a771c0c7126345f4a0a4d4597e55179c33655fe312c972d82d99cbc71"},"properties":{"dependency":{"package":"tokio","version":"1.54.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","RUSTSEC-2026-0384"],"severity":"medium","fixedVersion":"1.54.1","relation":"direct","declaredRange":"1","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":"5d9a5fec73300c5433b49dbb5eff81a41270c99d7122d16d9d5db07530739b96"},"properties":{"dependency":{"package":"minimatch","version":"10.2.6","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"severity":"medium","fixedVersion":"11.0.1","relation":"transitive","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":"6f5af614f92bae0837f3e2cc965634a2d64fbc95afb7af2247c3b6cb45cfed10"},"properties":{"dependency":{"package":"vite","version":"6.4.4","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"severity":"medium","fixedVersion":"6.4.5","relation":"direct","declaredRange":"^6.0.5","reachability":{"kind":"test-or-tooling","file":"windows/vite.config.ts","line":4}}}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: ControlCenterPanel.swift \u2192 ClimatePanelModule.swift, DeviceCardView.swift, MenuBarMijiaApp.swift, HomeStore\u002BMetrics.swift: \u0060Sources/MenuBarMijiaApp/ControlCenterPanel.swift\u0060 changes together with 4 other files \u2014 \u0060Sources/MenuBarMijiaApp/ClimatePanelModule.swift\u0060, \u0060Sources/MenuBarMijiaApp/DeviceCardView.swift\u0060, \u0060Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift\u0060, \u0060Sources/MijiaCore/HomeStore\u002BMetrics.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1be6e79446e232966754220e410c0ea27f6c8fbbb557e5d3e278007f33b871f4"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: main.rs \u2194 app.ts: \u0060windows/src-tauri/src/main.rs\u0060 and \u0060windows/src/ui/app.ts\u0060 change together 65% of the time (20 of the 31 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are \u006004536add\u0060 feat(windows): add PanelTheme profile, Settings switcher, and dynamic\u2026; \u006071c0ced0\u0060 fix(windows): harden Win11 flyout footer, sub-flyout stack, and spati\u2026; \u006020f84443\u0060 fix(windows): refine Win11 hybrid capsule pills, camera deck, sub-fly\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"15cc3e3c5dd2cd88ca3f4f8a1389740895ffaff389cf9ed57103a89a4253fac5"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: HomeStore\u002BControls.swift \u2192 DemoHomeProvider.swift, DeviceDeduplicator.swift, HomeStore\u002BUndo.swift, MiotCommandMapper.swift: \u0060Sources/MijiaCore/HomeStore\u002BControls.swift\u0060 changes together with 4 other files \u2014 \u0060Sources/MijiaCore/DemoHomeProvider.swift\u0060, \u0060Sources/MijiaCore/DeviceDeduplicator.swift\u0060, \u0060Sources/MijiaCore/HomeStore\u002BUndo.swift\u0060, \u0060Sources/MijiaCore/MiCloud/MiotCommandMapper.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BControls.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96da3029fb4ad1a4b1a822dfe3b79e15c21a429cc29495f6b0a8fa95c75bcb5a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: MiotSynthesizer.swift \u2194 ModelActionPolicy.swift: \u0060Sources/MijiaCore/MiCloud/MiotSynthesizer.swift\u0060 and \u0060Sources/MijiaCore/ModelActionPolicy.swift\u0060 change together 55% of the time (6 of the 11 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 6 shared commits counted here, the most recent 3 are \u0060eda82dee\u0060 \u6D17\u8863\u673A\u3001\u70D8\u5E72\u673A\u3001\u6D17\u7897\u673A\uFF1A\u72B6\u6001\u3001\u7A0B\u5E8F\u3001\u5269\u4F59\u65F6\u95F4\u4E0E\u8D77\u505C (#3); \u006047396e2e\u0060 \u6D74\u9738\u3001\u6CB9\u70DF\u673A\uFF1A\u591A\u670D\u52A1\u805A\u5408\u6210\u4E00\u5F20\u5BB6\u7535\u5361 (#4); \u006022f3a422\u0060 [\u8BBE\u5907][macOS] \u5BB6\u7535\u5361\u7247\u7B2C\u4E00\u5200\uFF1A\u70ED\u6C34\u5668\uFF08\u7535\u6E90\u3001\u76EE\u6807\u6E29\u5EA6\u3001\u6A21\u5F0F\u3001\u72B6\u6001\u3001\u6545\u969C\uFF09 (#300) (#347) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiotSynthesizer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c4ebb9b075cb68f1774590191132a551fc481588d0e0f8355267e7cad57e64"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: miCloudClient.ts \u2194 models.ts: \u0060windows/src/core/miCloudClient.ts\u0060 and \u0060windows/src/core/models.ts\u0060 change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u006064912684\u0060 feat(mi): show the sanmei.valve.s1 mains breaker as a read-only meter\u2026; \u006082156866\u0060 fix(ai): require a tap for shared and wide model actions (#194); \u00602e577e5d\u0060 fix(miot): keep unverified fallback specs read-only (#154) (#159) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudClient.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1d2cf84f15df291149fbf5cb31c023cfc734b46031b20d132e515df0d82912"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: HomeStore.swift \u2194 MiCloudClient.swift: \u0060Sources/MijiaCore/HomeStore.swift\u0060 and \u0060Sources/MijiaCore/MiCloud/MiCloudClient.swift\u0060 change together 50% of the time (8 of the 16 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 \u00600a325983\u0060 fix(micloud): reject code-less responses, complete shared-home discov\u2026; \u0060f7b1d488\u0060 feat(controls): explain why a control write failed (#289); \u00605fd791a3\u0060 feat(mi): fold Mi light-group members into the group card on macOS (#\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a705c286678a6b7bc5b4078bfa0f149558dd59ffad5b907f005add6dcc3d04b8"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: bindEvents.ts \u2194 deviceViews.ts: \u0060windows/src/ui/bindEvents.ts\u0060 and \u0060windows/src/ui/deviceViews.ts\u0060 change together 50% of the time (7 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u00608198a83b\u0060 feat(windows): add 28px LiquidGlassSlider and unified peek/swipe uppe\u2026; \u0060433dff8d\u0060 feat(windows): add Classic single-card glass shell, 4-size Bento grid\u2026; \u006020f84443\u0060 fix(windows): refine Win11 hybrid capsule pills, camera deck, sub-fly\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e76edc1a7179c179dd2a5f71a82143bc6a67978a1cb27e7055a8ced6222f1b1"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: HomeStore.swift \u2194 LocalIntentParser.swift: \u0060Sources/MijiaCore/HomeStore.swift\u0060 and \u0060Sources/MijiaCore/LocalIntentParser.swift\u0060 change together 50% of the time (6 of the 12 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 the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u00607c336c04\u0060 feat(raycast): companion snapshot and trusted bridge token for menumi\u2026; \u006053d8a5d7\u0060 feat: persist scheduled timers, lower macOS target to 14.0, and share\u2026; \u0060fff32d65\u0060 fix(windows): system tray popover, real Xiaomi device sync, and Apple\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2fa6d5827ea623662fb0d013fb649a91aa850c4613a07d70d3d3efe72a95cc"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: HomeStore\u002BBackend.swift \u2194 HomeStore\u002BMetrics.swift: \u0060Sources/MijiaCore/HomeStore\u002BBackend.swift\u0060 and \u0060Sources/MijiaCore/HomeStore\u002BMetrics.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 the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither 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 \u0060b22c4838\u0060 fix(mi): keep working sources usable when one Mi account expires or H\u2026; \u00605fd791a3\u0060 feat(mi): fold Mi light-group members into the group card on macOS (#\u2026; \u0060ac374545\u0060 feat(core): remember the Mi session\u0027s server-declared end \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2ee43461ef4f9f0c36257de86845f424c85cdd122e30ec6cca3cef9f77ce35"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: synthesis.ts \u2194 deviceViews.ts: \u0060windows/src/core/miCloud/synthesis.ts\u0060 and \u0060windows/src/ui/deviceViews.ts\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) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u0060e2c4662c\u0060 fix: align HA/MIoT synthesis, command coercion, and presentation pari\u2026; \u0060853f4c40\u0060 fix: resolve remaining Codex review findings from PRs #70 and #103 (#\u2026; \u0060daabad30\u0060 fix(windows): \u8865\u9F50\u901A\u7528\u8BBE\u5907\u544A\u8B66\u4E0E\u4F18\u5148\u8BFB\u6570 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"048a2583a92a16618c7220d0b94f7648f802633a680c83d9060d0e2c61f723bc"}},{"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":"d158e2a16e14de6b21242c807dae103b702c451551159ea24ee761b88eab1814"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label for=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"31cde956a57aba15e58604a540162593ad3c1a27a05fae65b1cd03434dab5478"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label for=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"57513c4a413e4fd0e3c006971d26b6e6a1603d08379161e957c67a4f6a9464a2"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"703f03df8c854bab70f8c44b82ff1684b2fe9d998f3e112a7e5266feecee98b0"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. This document\u0027s body is only the mount point \u003Cdiv id=\u0022app\u0022\u003E, so there is no content here to wrap \u2014 render the \u003Cmain\u003E from the component mounted into it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5bc87065a9a875ff27ddd28b4e782511f0f535fce726a0025e6364944494e8"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.4:1): \u0060#app[data-panel-theme=\u0022classic\u0022] .cc-tile.is-active .cc-tile-orb\u0060 sets color: #ffffff on background-color: #ff453a \u2014 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/styles.css"},"region":{"startLine":5226}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e57904aaec93cd36b3c7b2a432c21576782aaeaba6366d8bb02c2ae0b8930b"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.cc-all-off-pill.is-holding .cc-hold-fill\u0060 moves (\u0060transition: transform 600ms var(--ease-linear)\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/styles.css"},"region":{"startLine":3272}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8fcd3e8bc2b9005c509b5ca183472fb913a992efb4e470d8e7bc15018bc2884"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060#app[data-panel-theme=\u0022classic\u0022] .cc-tab-indicator\u0060 moves (\u0060transition: transform 220ms var(--spring-lens), width 220ms var(--spring-lens), opacity var(--dur-fast) var(--ease-standard)\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/styles.css"},"region":{"startLine":5168}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d34ecc4052b9ea426fb69caf4a6359611b0dbb030cc065e54ed8ba3c728f1c"}},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: SettingsEventsHost (18 required operations): \u0060SettingsEventsHost\u0060 declares 18 required operations: \u0060clearPendingHighRisk\u0060, \u0060selectRoom\u0060, \u0060habitSequences\u0060, \u0060lastHabitAction\u0060, \u0060checkForAppUpdate\u0060, \u0060handleNaturalCommand\u0060, \u0060invalidateSourceControl\u0060, \u0060openSettingsSheet\u0060, \u0060openUpdatePage\u0060, \u0060refreshDevices\u0060, \u0060refreshHADevices\u0060, \u0060render\u0060, \u0060saveSettings\u0060, \u0060shouldKeepPopoverPinned\u0060, \u0060signOutXiaomiAccount\u0060, \u0060startUpdateInstall\u0060, \u0060startXiaomiQRLogin\u0060, \u0060syncKeyFieldWithEndpoint\u0060. Counted over its REQUIRED operations \u2014 a method signature or a function-typed property with no \u0060?\u0060, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"b058216f8b71e3062eff0825d12966ada06dd6f1f9040dabb0ae893cc9cfa94b"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.scrub_persisted_streams_in_file calls \u0060std::fs::read_to_string\u0060: \u0060camera.scrub_persisted_streams_in_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::read_to_string\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"6171b700deb952e8f89b80835ed3d3497773ab1f6e9ba6e0473b1b2784a5849f"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.file_sha256_hex calls \u0060File::open\u0060: \u0060camera.file_sha256_hex\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060File::open\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87488d215553bb1618249da1bc641c630743d5bc49917e820ecc5eef6f95586"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.component_is_usable calls \u0060std::fs::metadata\u0060: \u0060camera.component_is_usable\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::metadata\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c68b7947c47b7e82476c7a8aeb82c4395773f8cd4f720dd3eab51abfdf0c00d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.download_go2rtc_once calls \u0060std::fs::create_dir_all\u0060: \u0060camera.download_go2rtc_once\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca54a9ed9548d6f1a600cbf1282110fa64df3170091cf11a0ab50882ea428cf"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.download_go2rtc_once calls \u0060std::fs::remove_dir_all\u0060: \u0060camera.download_go2rtc_once\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a81cdc8cdf068e2758d934685215f25f64d66a1ce8502348e66deeab9f65f09"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.download_go2rtc_once calls \u0060std::fs::remove_file\u0060: \u0060camera.download_go2rtc_once\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"debb6b2b3698bb01a4e94c194d3f9825ca2c2226b5283dc9a52ff711e895c50d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.download_go2rtc_once calls \u0060std::fs::rename\u0060: \u0060camera.download_go2rtc_once\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::rename\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"9341240386bdd4147ec50d98b279836d506e4e82893c9604f550c910795e8d61"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.download_go2rtc_once calls \u0060std::fs::remove_dir_all\u0060: \u0060camera.download_go2rtc_once\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46a2f053dbc19823b10e70ae2f4c33d9959feb032c55e2fa16840c65de54e25"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.stage_go2rtc_exe calls \u0060std::fs::create_dir_all\u0060: \u0060camera.stage_go2rtc_exe\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"bffef7bdbe8f14022ff289b4a85e433652fc6c11bf3f226ca02c966f01862e17"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.stage_go2rtc_exe calls \u0060std::fs::write\u0060: \u0060camera.stage_go2rtc_exe\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::write\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa06fd5921ab8dd49a59e4842bf8b56c5584ec35b73a1b057280914624394021"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.write_secret_file calls \u0060std::fs::create_dir_all\u0060: \u0060camera.write_secret_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a09563e2658a1ad0b3c269265d4ceacc89432e9617758db8213536a4f979e8d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.write_secret_file calls \u0060std::fs::write\u0060: \u0060camera.write_secret_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::write\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"04775c13a736a471cf202f313b4b4701801799790c1f04ecab036fb1439463b0"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.reserve_loopback_ports calls \u0060TcpListener::bind\u0060: \u0060camera.reserve_loopback_ports\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060TcpListener::bind\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd21c3b8d80495977904b9045147957be85c49ae52663f1aa6eed292ec63e94"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.read_owner calls \u0060std::fs::read_to_string\u0060: \u0060camera.read_owner\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::read_to_string\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"508eb84124881c422f5f891c0181caea273221de3858caf923048ceaa05c04e9"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.ensure_go2rtc_running calls \u0060std::fs::create_dir_all\u0060: \u0060camera.ensure_go2rtc_running\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1160}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc67289ceb24c31379d309976bcf3e9debcf441832d36686a7f834a32d7e257"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.ensure_go2rtc_running calls \u0060std::fs::read_to_string\u0060: \u0060camera.ensure_go2rtc_running\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::read_to_string\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"113793e3e5fdf45dea9565442ac40d02947e1bc08e154f19c339d2aff0cfa3c8"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.spawn_cs2_udp_relay calls \u0060UdpSocket::bind\u0060: \u0060camera.spawn_cs2_udp_relay\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060UdpSocket::bind\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":1990}}}],"partialFingerprints":{"codehealthFindingId/v1":"e12ad3273d10c4cb3a4997074e72daac69e3fd3e405cc30fd1cdab3967c1dc03"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.spawn_cs2_udp_relay calls \u0060UdpSocket::bind\u0060: \u0060camera.spawn_cs2_udp_relay\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060UdpSocket::bind\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":2003}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82bc1e61d1381a41af72157107f7d51964f9afd1a4da8a8f0657eb034f7a881"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: camera.spawn_cs2_udp_relay calls \u0060UdpSocket::bind\u0060: \u0060camera.spawn_cs2_udp_relay\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060UdpSocket::bind\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1e91bc3100d0848745fae82a622f13e36be548d3044ffd9fef7ccac1428948"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.write_atomic_file calls \u0060std::fs::create_dir_all\u0060: \u0060companion.write_atomic_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"b62510fab73a0d0b9ed47b45d6b32a89a0b54cc392d7fcd41be2b03ab89b427d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.write_atomic_file calls \u0060File::create\u0060: \u0060companion.write_atomic_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060File::create\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1f8f89cae7a4cff3e93a34cf8d1de4a27d85a09f1838298f5d245c617811c4"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.write_atomic_file calls \u0060std::fs::remove_file\u0060: \u0060companion.write_atomic_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"58016acbf1fd4c2be50817f3fc42c381e0bd179ad7ec7dc534accb653af86aa4"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.write_atomic_file calls \u0060std::fs::rename\u0060: \u0060companion.write_atomic_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::rename\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7c59732dbd7df205127d467aac5e00be4d54ed9cff05b99510bbca49bdd0c4d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.write_atomic_file calls \u0060std::fs::remove_file\u0060: \u0060companion.write_atomic_file\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8c4763dc895ef4fb93891d718f64358d8624a95b27a22f2d18e69f13589788b"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: companion.remove_snapshot_in_dir calls \u0060std::fs::remove_file\u0060: \u0060companion.remove_snapshot_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"2720b943ed170a124ca970c56cc78de4ebe421f650b0c338541a91edd7ed1b21"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: network.write_origin_store calls \u0060std::fs::create_dir_all\u0060: \u0060network.write_origin_store\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1f29cfb63352c085410520f41b7982af4a8b1cc9e57ed65f652a5d3b69542d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: network.write_origin_store calls \u0060std::fs::write\u0060: \u0060network.write_origin_store\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::write\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde7088dec695c87f3eca46af7b33424f89c942e4a5e0f87ae28e100e9cc2baa"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.sweep_stale_installers_in_dir calls \u0060std::fs::read_dir\u0060: \u0060update.sweep_stale_installers_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::read_dir\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"6067ecc21cc0b3b12ed00b24c6a712ad36e8087c44c5f2bf59ffede79ee75e5b"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.sweep_stale_installers_in_dir calls \u0060std::fs::remove_file\u0060: \u0060update.sweep_stale_installers_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"72210dd39e069768b9a37bb2708b4a28bdf34a5e34a1aae180f1fa2b212fba6a"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.write_staged_installer_in_dir calls \u0060std::fs::create_dir_all\u0060: \u0060update.write_staged_installer_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f967602152b7d03e8224ab9ca5160de7a25fd390ebf198b5bb57d4dfe11ad42"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.write_staged_installer_in_dir calls \u0060std::fs::symlink_metadata\u0060: \u0060update.write_staged_installer_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::symlink_metadata\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7829e966d8eeb72ef1a6c6bbd212187a5e3d9a6da09ca3d7f0b79406441751a"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.write_staged_installer_in_dir calls \u0060std::fs::remove_file\u0060: \u0060update.write_staged_installer_in_dir\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"294605b0cd0c866a7ea30899f7937a08b29eca28842f2a2385650791f89bcc7e"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.launch_installer calls \u0060thread::sleep\u0060: \u0060update.launch_installer\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060thread::sleep\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d032876d167ac66135e9f74bdf2f8e18ad757dc933890f9ecf58d979a4ec49"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: update.install_update calls \u0060std::fs::remove_file\u0060: \u0060update.install_update\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::remove_file\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/update.rs"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a5e480ba6149ca18e30abe9dd21641e87e5658ec9c517cccce0be966a4e67fb"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: window.write_panel_placement calls \u0060std::fs::create_dir_all\u0060: \u0060window.write_panel_placement\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::create_dir_all\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/window.rs"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"da602f95d3e99b12db568bd67fd95864b1f7b3eedb43265c690d07114047d47d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking call on the event loop: window.write_panel_placement calls \u0060std::fs::write\u0060: \u0060window.write_panel_placement\u0060 runs on the async event loop (it is async, an actor or framework handler, a hand-written \u0060poll\u0060, or called from one) and makes the blocking call \u0060std::fs::write\u0060: while it blocks, the loop\u0027s worker thread serves nothing else, so every task, message and request scheduled on it waits \u2014 and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (\u0060tokio::time::sleep(..).await\u0060, \u0060tokio::fs\u0060, an async channel/client), or move the work off the loop with \u0060tokio::task::spawn_blocking\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/window.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce0085f305dbcd3393bfe66c9b12d82672a4de4396d4ff3de652ec898deba7f"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 1/2 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060windows/src-tauri\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"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 6 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":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/ci.yml"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"Dependabot does not watch npm/cargo: \u0060.github/dependabot.yml\u0060 schedules updates, but no \u0060package-ecosystem\u0060 entry covers \u0060npm\u0060, \u0060cargo\u0060, which this tree depends on \u2014 so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the \u0060updates:\u0060 list."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/dependabot.yml"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0c54ac7d1909cf66cde56c6953f9b69c17981f10a9d84238b8ca04b469d8a1"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060fetch(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cbf99b1207481a6112e0ea81043bd2239ad95700fc44364380060e643ea890"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060downloadGo2RTCBinary\u0060 is async and calls .waitUntilExit() \u2014 a blocking call inside async code stalls the cooperative pool\u0027s thread \u2014 one per core \u2014 and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/XiaomiCameraBridge.swift"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"295a4afc86259adc94f8442795004618cc74884ed47cf4360a329260ed410368"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmSync\u0060 in \u0060terminateChrome\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a2589c6fd756dbda126977341e3413be27e84ef172b5a340b06fdbff05246b"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.mkdtempSync\u0060 in \u0060runLaunchChromeStartupSelfTest\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a36883feac588ce79ef74b098537b73bcb3981af22b592d405c3c2204aa645"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.rmSync\u0060 in \u0060runLaunchChromeStartupSelfTest\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"e435c8982766093dfa529375ba6515ce1c648dcab1a5cd091462f5cdb62b2bb7"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.mkdtempSync\u0060 in \u0060main\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"99253ced13388969ac8cf59a8f768ea12156fedf6e6fc82a4ae6be36cea8ebd1"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.mkdirSync\u0060 in \u0060main\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"817312678e69bf0440135748b4c81bdb698e4f9b3dde69e085a59c2566c5c1ff"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.writeFileSync\u0060 in \u0060main\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0a834376644a4dfc11cc5ed3404eb405cfd89f8208b4e116ab6f731893bb7e1"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060fs.writeFileSync\u0060 in \u0060main\u0060 blocks the event loop until it finishes \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc87b60f66b2263eb5e9bbc0a4333f9831e58b62f3e5f2b91697f1e1bfc3e0b3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplication concentrated across 2 sibling directories (16 clone groups): 16 duplicated blocks under windows/src/ have copies in at least two of the sibling directories core, ui \u2014 13 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10\u0027s bar for an individually reported row \u2014 either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 16 and which does not depend on how exactly each block\u0027s copies still match. That concentration is one structural fact, not 16 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module \u2014 a common library every sibling imports \u2014 rather than 16 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa309ab53d67b86ff989399bba605ba0d33ff57e6643e09985b584d8c729d2a6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (63 matched lines \u00D7 2 locations): windows/src/ui/demo.ts:52 \u00B7 windows/src/ui/demo.ts:143 \u2014 the two spans are one implementation copied and then locally edited \u2014 400 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c19a2cff3fdafbb0d94968c835567d2efaada03c3f454f60b325f475a518422"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (49 matched lines \u00D7 2 locations): windows/src/core/models.ts:540 \u00B7 windows/src/core/models.ts:618 \u2014 the two spans are one implementation copied and then locally edited \u2014 232 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cdbf17c103cdb985a403e87167339584e1e353068cbca006f4aeb8cf5a4a1c9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (41 matched lines \u00D7 2 locations): windows/src/core/miCloudCrypto.ts:114 \u00B7 windows/src/core/miCloudCrypto.ts:185 \u2014 the two spans are one implementation copied and then locally edited \u2014 435 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07946c169d2a0d06804a43591a6d851d3561d597e96fbc6c9cc121c98ccfe39"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (41 matched lines \u00D7 2 locations): windows/src/core/optimisticLock.ts:364 \u00B7 windows/src/ui/intentExecution.ts:180 \u2014 the two spans are one implementation copied and then locally edited \u2014 273 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d55ccac45c78fae1befd36741e96e326a7ab1b676669c10fd7fb95cf90aaaa1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2 locations): raycast/src/search-devices.tsx:8 \u00B7 raycast/src/search-scenes.tsx:6 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-devices.tsx"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"081588c7d439be76079ea18adb790c52a76c19309861be8b8ad9cd5dc4c23c7f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2 locations): windows/src/ui/onboardingGuide.ts:286 \u00B7 windows/src/ui/settingsEvents.ts:1112 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"2242efb370b380656b5babcf58d0657ecf29c7820e095a4f73f55ee9dc2a1f4b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (30 matched lines \u00D7 2 locations): windows/src/core/assistant/chineseIntentTables.ts:219 \u00B7 windows/src/core/assistant/intent.ts:1064 \u2014 the two spans are one implementation copied and then locally edited \u2014 283 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad929a763788362028b4faa2c875310135ef5f345f191742fbe07ec3f85a019"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (26 matched lines \u00D7 2 locations): raycast/src/search-scenes.tsx:44 \u00B7 raycast/src/search-scenes.tsx:71 \u2014 the two spans are one implementation copied and then locally edited \u2014 182 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-scenes.tsx"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccce6c4a6ed3453ff0718b8a903ea9f600bd4927c39149d14f0492a3d5856c37"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2 locations): windows/src/ui/onboardingGuide.ts:225 \u00B7 windows/src/ui/settingsEvents.ts:153 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef825c64973de62004c83a7611b728dddaa0f56e1bf9f936b35a4d07fa85250f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2 locations): windows/src/core/miAccountsStore.ts:935 \u00B7 windows/src/ui/cloudRefresh.ts:60 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"02b7c4c1abd89f34be6a0db93f9deb3aed26710856137ef31f3c19d2bd1b164d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2 locations): windows/src/ui/cloudRefresh.ts:343 \u00B7 windows/src/ui/cloudRefresh.ts:951 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c9109ae23a0016d9f9424170adbebfe7b6099e4bb93143893a98c31854d64c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2 locations): windows/src/ui/onboardingGuide.ts:719 \u00B7 windows/src/ui/settingsEvents.ts:814 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"c658ddd0dee47dbe4c946b4be9c9a8603b3c572fa6dc8778a7b69d5eca1e72b0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1280 \u00B7 windows/src/core/assistant/intent.ts:1585 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1280}}}],"partialFingerprints":{"codehealthFindingId/v1":"20749b9110dadd394631d3b5ade07683987eb79b63f0af19afe0a837aefa7562"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (21 matched lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:150 \u00B7 windows/src/ui/sensorHistoryView.ts:251 \u2014 the two spans are one implementation copied and then locally edited \u2014 109 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1f64989076cb193c43c68cbb6bce46e6cdea90400c774a6089942a812723a2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2 locations): windows/src/core/optimisticLock.ts:812 \u00B7 windows/src/ui/commandDispatch.ts:557 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc846f94291e17f7e87a5784f9cff6d409ac5b93c45692b3aa035f2bc957dfc"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (18 matched lines \u00D7 2 locations): windows/src/core/safetyAndHealth.ts:5 \u00B7 windows/src/core/sensorHistory.ts:98 \u2014 the two spans are one implementation copied and then locally edited \u2014 151 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f5fcedbb586450e8a64c61490e06fd0b61b99eafb0fd36cf9a6e1c2cdb3157"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1262 \u00B7 windows/src/core/assistant/intent.ts:1566 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c49c88a027f242bb9181990e44f66fbd39707f00c3cca66cae1caecfa5b0245"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): windows/src/ui/cloudRefresh.ts:843 \u00B7 windows/src/ui/cloudRefresh.ts:1107 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b36834e79bb260e1577258a4d06ee32b74c25ad10226a95a07b05634b9560b5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): windows/src/ui/deviceViews.ts:496 \u00B7 windows/src/ui/deviceViews.ts:564 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"964bff2066528aacc6a499da1407d10d7128b434203f85746aefbcad90ba2ca0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (17 matched lines \u00D7 2 locations): windows/src/ui/naturalCommand.ts:121 \u00B7 windows/src/ui/naturalCommand.ts:243 \u2014 the two spans are one implementation copied and then locally edited \u2014 103 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3989b84aa26c35cd552340f58c20e36cbf2d5e71410d8995711be84f5f387e5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): windows/src/ui/sensorHistoryView.ts:972 \u00B7 windows/src/ui/sensorHistoryView.ts:991 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23fc9d00da47bfbd4d594c4b4b309d5ff0cd21590ea253110d97dfed7bedbed"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): windows/src/core/haDomains.ts:1231 \u00B7 windows/src/core/homeAssistant.ts:95 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"968b22dbf4a83663c6aad42811ac3b200be8bd56f5af0a95d08f4751cd7e9671"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): windows/src/core/optimisticLock.ts:834 \u00B7 windows/src/ui/commandDispatch.ts:719 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b228764478e4879d099e8d8b957f927a2bee475a8c9cc1504aee698436a3721"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): windows/src/core/miCloud/command.ts:313 \u00B7 windows/src/core/miCloud/command.ts:521 \u2014 all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"5755e1a5e1f15386db2fb8c8ed38bf83c57dab36e756b6f772bed2f1897772e3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3 locations): windows/src/ui/automationSettingsView.ts:166 \u00B7 windows/src/ui/commandDispatch.ts:109 \u00B7 windows/src/ui/detailDrawers.ts:1008 \u2014 the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape \u2014 one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values \u2014 and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d956979107e50ce06c59cfaa71656bf48bbe560d95929fd80f326aff83f8a5e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (15 matched lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:566 \u00B7 windows/src/ui/energySettingsView.ts:681 \u2014 the two spans are one implementation copied and then locally edited \u2014 106 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a04fefdb8a3191cc6cd9beb60f4137ef2b301cff60274b1e5fe80326f4f963d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): windows/src/ui/commandDispatch.ts:109 \u00B7 windows/src/ui/detailDrawers.ts:1008 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb678c06a6307b96b0ba3d92ce1c55586c0741f12cdcd4eb0dc4b49f2155365c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): windows/src/ui/deviceViews.ts:1359 \u00B7 windows/src/ui/deviceViews.ts:1480 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88907902b4ee0a778cb37cbd72d3fe9276c7bd6ff8d45725559b7e211016f77"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/core/diagnosticsAndScanner.ts:27 \u00B7 windows/src/core/miAccountsStore.ts:58 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"704842dacb86505a2569e4ea646dcd8c98ba15b9b1ac5f2b4382384857fd2bab"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/core/energyHistory.ts:209 \u00B7 windows/src/core/energyHistory.ts:225 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"1616ceccb5f18560973ed1a15c5badddeebb76aa5f53d94736a23fc17965672f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/core/miCloud/speakerActions.ts:56 \u00B7 windows/src/core/miCloud/speakerActions.ts:104 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"301accbf8c009536b483c8994fbc33a3d59e27f81799bfdd5774b722b38fe257"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/core/models.ts:518 \u00B7 windows/src/ui/automationSettingsView.ts:396 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d27fcac3a5eb2e2086005948a20d0683f1b1c64d9acd34a93a5e6fb5a2f635e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/core/safetyAndHealth.ts:36 \u00B7 windows/src/ui/undoTracker.ts:32 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"811efc0161f300b2ff377136df53a9eb579fbf161ded0666a76ba0d85086dca5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/ui/cloudRefresh.ts:274 \u00B7 windows/src/ui/cloudRefresh.ts:803 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb21521bab330e5b73ad78d59ade256b253faf6a10c19555aaf46b160c24d9b8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/ui/intentExecution.ts:621 \u00B7 windows/src/ui/intentExecution.ts:644 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/intentExecution.ts"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b74c7cf60855668d436b9a8b671475cfee8a51667e57869ba8268f87f4ac6f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): windows/src/ui/settingsEvents.ts:581 \u00B7 windows/src/ui/settingsEvents.ts:597 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa67c4c2bbf347188d6e0886497a70c5a57dcb8ff9acd48e64362c2f7d365c8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3 locations): raycast/src/snapshot-validation.ts:40 \u00B7 raycast/src/snapshot-validation.ts:57 \u00B7 raycast/src/snapshot-validation.ts:71 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/snapshot-validation.ts"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a490ec4d01d4015ed9c732dafbb80f6d1e4a5e1a3e627a5946ae147b137c29"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): windows/src/core/haDomains.ts:320 \u00B7 windows/src/core/haDomains.ts:370 \u2014 all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db7980a02109ef73d8fdd3b93f554919e8b64f8a3558597702f6258faabf357"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): windows/src/core/miCloud/speakerActions.ts:224 \u00B7 windows/src/core/miCloud/speakerActions.ts:240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8c8b4c4780e1032065ac987d65ae12bab95421f1cf35b74377577083ffcdff"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): windows/src/core/models.ts:969 \u00B7 windows/src/core/models.ts:1014 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":969}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af7bd6e8a2452a04b8a9b39b5da1c648ade8624edc77873c4113c073206d7d9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:656 \u00B7 windows/src/ui/naturalCommand.ts:283 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"f913adbb1e4424acb5d4a2d35beae49b3ac26a09dcc68060be5fc62c4f756fcb"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:828 \u00B7 windows/src/ui/detailDrawers.ts:847 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3eb3c7613655f58ada626e83fe59db4e22434e21400f5ffe04be3adf5dcaa3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (12 matched lines \u00D7 2 locations): windows/src/core/assistant/habits.ts:245 \u00B7 windows/src/core/assistant/intent.ts:556 \u2014 the two spans are one implementation copied and then locally edited \u2014 88 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc339f2a63f141bd8e274326682d44bdda12c53f04954518afa51117a10dc14"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3 locations): windows/src/core/miAccountsStore.ts:1102 \u00B7 windows/src/core/miAccountsStore.ts:1123 \u00B7 windows/src/core/miAccountsStore.ts:1205 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"272a91a4788d33ff6c99157182f21b376fc5e329b4030287ba154f1694163d5a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): windows/src/core/miCloud/cameraHubs.ts:83 \u00B7 windows/src/core/miCloud/client.ts:29 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec1b6deb0d5d218be0f3a46c05423cbb0391287dc38abec127a0b43a19ef3aa"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): windows/src/core/miCloud/synthesis.ts:1314 \u00B7 windows/src/core/miCloud/synthesis.ts:1421 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"af6075c7ed4b05bc44683a8a3dbeb522c3381d415b0966b631b575f155f78a4e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): windows/src/core/safetyAndHealth.ts:706 \u00B7 windows/src/core/safetyAndHealth.ts:727 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"8589df5cc1f3c4fc41a8a83c36cd40ce93ffed0823c8a0b15bcba709661641b3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): windows/src/ui/automationSettingsView.ts:343 \u00B7 windows/src/ui/automationSettingsView.ts:362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b0cd9b1dfecb26c31e3887dfccfa1c1b95f5f0bd90b61298862348545a0d17"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): windows/src/ui/energySettingsView.ts:114 \u00B7 windows/src/ui/sensorHistoryView.ts:410 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"838f94258ed13b69a037e92022708f57b8566d1d457de4dcf26622c8e83ed84c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/appUrlCommand.ts:238 \u00B7 windows/src/core/appUrlCommand.ts:249 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"021e93657b08ccaeff9699f957e89f5fa4200afdbe997bf37277b84206802107"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1070 \u00B7 windows/src/core/assistant/intent.ts:1085 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4a29f028acc05eb7f56477dea92df3605062f41e74c1543366e35fa51d6e0f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/dualSourceProvider.ts:1057 \u00B7 windows/src/core/dualSourceProvider.ts:1085 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c42ce908117c998edf319d0fdd361f695b5cf6a7f587df4829cb68fc2c5ccf"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/haDomains.ts:338 \u00B7 windows/src/core/haDomains.ts:385 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/haDomains.ts"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4822c2621259573675c11ae1650959e425f062f53ab70b10479016c31730a8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/homeAssistant.ts:198 \u00B7 windows/src/core/homeAssistant.ts:241 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4a1890a8b766fa42086284cc9ebe9b233c5f492e277cc21dc529b24787dc9bd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/core/miCloud/command.ts:248 \u00B7 windows/src/core/miCloud/command.ts:334 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74d8adb37c8c75abe1ff8c788c3ad9c64efb167d51e521de2583c9b24c8d797"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): windows/src/core/secureStore.ts:392 \u00B7 windows/src/core/secureStore.ts:445 \u2014 the two spans are one implementation copied and then locally edited \u2014 80 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aa817c6d3c55e599eed92cfa92fde7b9a27c7f9c41cb9689e5e499c892f69ea"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:909 \u00B7 windows/src/ui/bindEvents.ts:925 \u00B7 windows/src/ui/bindEvents.ts:941 \u00B7 windows/src/ui/bindEvents.ts:1003 \u2014 all 4 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8010e41c45c078c1ed8268d7d247be685a530e99ba975e17eba6d6c366d4150"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): windows/src/ui/roomOrderEditor.ts:460 \u00B7 windows/src/ui/roomOrderEditor.ts:478 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"548a1ef4201703d3a9345f0365f724056de23cda6742e7957698afef7ba41018"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (10 matched lines \u00D7 2 locations): windows/scripts/verify-flyout-layout.mjs:276 \u00B7 windows/scripts/verify-flyout-layout.mjs:297 \u2014 the two spans are one implementation copied and then locally edited \u2014 92 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"abfe41b7134678fe344472ca0e83b73f5b52ceac529c56bf4329e6346c6ec17c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1114 \u00B7 windows/src/core/assistant/intent.ts:1130 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7640af7cd9ec9adce2a6f82785b568f0c3ab8e0838b1cc24c6bf50a911bb9d4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/homeAssistant.ts:440 \u00B7 windows/src/core/homeAssistant.ts:467 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"74b0955f83bb45730eb35565f42620462e279b549bb602ff7f5c5015a7bf1c96"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/homeProvider.ts:100 \u00B7 windows/src/core/miAccountsStore.ts:1403 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeProvider.ts"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"756e4bb5fcc32ac44847e5ceb65005cce920fc2775725dfe66d13e22560230da"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/miCloud/cameraHubs.ts:306 \u00B7 windows/src/core/miCloud/client.ts:422 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"6999ca7402686c9f674ae4134ce8389b713b834c3d978d0c6380ac1e21dfb0d6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/miCloud/command.ts:260 \u00B7 windows/src/core/miCloud/command.ts:575 \u2014 all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"c803dbbcfe8e0f6fd54185431276b3a3b57742763f5ab01e904295a8e1d67019"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/quickActions.ts:147 \u00B7 windows/src/core/quickActions.ts:228 \u2014 all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/quickActions.ts"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"4140a808dc61c91e87c969c318f48fbd6cdd4bf2f564d07a4445072d5579e0e3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/core/scheduledCommands.ts:104 \u00B7 windows/src/core/scheduledCommands.ts:114 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fd20d441b00427e852a951a0067b90b2ddf23883e1bcbc94b3102d68ab1a1f3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/appLifecycle.ts:1021 \u00B7 windows/src/ui/panelKeyboard.ts:306 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6849422384761357836b50fb25e1e187c434571ee1a5e824e2c281cd4abdba"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:723 \u00B7 windows/src/ui/bindEvents.ts:819 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1fc46cec2d7cc2314f081730f0156e5af64adb9679fb29bec978a532512a6c7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1050 \u00B7 windows/src/ui/bindEvents.ts:1498 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"0547caa611723dc68b2ee6c9e64813d10ffc412778c65d65be39849b3d4beb5d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/cameraLive.ts:310 \u00B7 windows/src/ui/cameraLive.ts:371 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/cameraLive.ts"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa553b4ae2812df324bb47eedbcef3939e4bcd9bf695b2da9af998c20d7021a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/cameraLiveModalView.ts:281 \u00B7 windows/src/ui/deviceViews.ts:485 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"473f0d2f15c0f88bfd7ceab5e4b56ad19657e2b217176c5e0b0bd09c791acd04"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/connectionsAndDiagView.ts:39 \u00B7 windows/src/ui/detailDrawers.ts:1028 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"a049b680a08c47ab938fbfc1e55171ce23bf0d431737db2a595edf949435a9b9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/reconciler.ts:1628 \u00B7 windows/src/ui/reconciler.ts:1641 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c2527ca63442e7ff24a677e11c51a0301e4e45f8f3fb59c25a529f9568c9af"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/roomOrderEditor.ts:329 \u00B7 windows/src/ui/roomOrderEditor.ts:355 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ad1a81f2c4df4395b9fa8cc74a1d0d595d72cd7b373f16099399539cf686678"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): windows/src/ui/sensorHistoryView.ts:181 \u00B7 windows/src/ui/sensorHistoryView.ts:195 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b6331340121654e85e24c182a61f269f60f34b8b91c920ef32580e671a1bffd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4 locations): windows/src/core/appUrlCommand.ts:1273 \u00B7 windows/src/core/appUrlCommand.ts:1293 \u00B7 windows/src/core/appUrlCommand.ts:1313 \u00B7 windows/src/core/appUrlCommand.ts:1344 \u2014 all 4 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1273}}}],"partialFingerprints":{"codehealthFindingId/v1":"6350ecff85578341409fe1749517856b93e16e99aebd2c120c284599975f7bf2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/core/assistant/promptContext.ts:436 \u00B7 windows/src/core/assistant/promptContext.ts:471 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"662306d9c0b196de080295403f0ee9b883c9bbaa9ba7aea970b9e8fc4d3fabaa"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:33 \u00B7 windows/src/core/commandEffects.ts:87 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b368c3b181ff11cd3d72bb5bf405951bafc6f4b2b98b97fad95663f467d1b4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (9 matched lines \u00D7 2 locations): windows/src/core/miAccountsStore.ts:972 \u00B7 windows/src/ui/cloudRefresh.ts:713 \u2014 the two spans are one implementation copied and then locally edited \u2014 161 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b67e683589d5ab774a170729f765159d436d7cbd35351541842f1c3ce2a17d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:515 \u00B7 windows/src/ui/automationSettingsView.ts:462 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f30ccf03ed62481b9fdb166ea3241d4d91421d0a11e67c40bf4e616865127f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1707 \u00B7 windows/src/ui/activityStackView.ts:1717 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1707}}}],"partialFingerprints":{"codehealthFindingId/v1":"a191ba20e5bd514dd773a4622f4ada7fa2b91f742a5a33bfc3addae6bcd069ed"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (9 matched lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1489 \u00B7 windows/src/ui/panelView.ts:293 \u2014 the two spans are one implementation copied and then locally edited \u2014 163 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1489}}}],"partialFingerprints":{"codehealthFindingId/v1":"176b83433f8810212cdaf2caee70cd224cedb524a9330d4ed75df6801a00b07f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/appLifecycle.ts:1003 \u00B7 windows/src/ui/panelKeyboard.ts:288 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f255e7ede5719f113262252a07161fd56de8640b5098c736aac5f1b2cbec24"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:462 \u00B7 windows/src/ui/bindEvents.ts:474 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8334c48fa0e316fe8ddd1a8253515f37d78b87ed77cbfba0cab9510345d692"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1064 \u00B7 windows/src/ui/bindEvents.ts:1522 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f2c53d7fa0d83a7c922f665a77ae28e9cd03eb2765d0ec991483884df94d22e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1106 \u00B7 windows/src/ui/bindEvents.ts:1120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"231d67bb087faab6abba7bd8ab3404dc834d1c2c98c2590f7f0b6cf8ad18223a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/cameraLive.ts:1307 \u00B7 windows/src/ui/cameraLive.ts:1319 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1d8fb81dc5d29d3169aa5ef01b22dd3214064cbc8669ba878ada02f278f247"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:124 \u00B7 windows/src/ui/detailDrawers.ts:265 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"a57afb879fe1758bffbf01a59c1707969c86f17a21ee3ceb5a84aeed8d436438"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:707 \u00B7 windows/src/ui/detailDrawers.ts:717 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"834f39c17b32f91c48ee55c8102c6c9858b23066409842a695e1f46d5c2be0ff"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:935 \u00B7 windows/src/ui/detailDrawers.ts:964 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e301222abc5ef1ac9ad1261bc1e24898c8593e6a985004d2a2bab2c1f3795d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/reconciler.ts:323 \u00B7 windows/src/ui/reconciler.ts:333 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b7374f6dc1b1cc4128f4328918c6531c48e90b49d4f09b603fe7adb24ce882"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/roomOrderEditor.ts:542 \u00B7 windows/src/ui/roomOrderEditor.ts:679 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"6728749a3eae65e404fb73c662dffccf75352205d8fc3ee442c833466a112906"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2 locations): windows/src/ui/settingsEvents.ts:921 \u00B7 windows/src/ui/settingsEvents.ts:1082 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"eafc3fc3a1157faa5d03c3fdf9e62caa16c053f52c929454798d908aa46841f8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): raycast/src/snapshot-validation.ts:54 \u00B7 raycast/src/snapshot-validation.ts:68 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/snapshot-validation.ts"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3edfc645c4a561554cd66f85229aa18c3420e550670d360336603474a21299"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/appUrlCommand.ts:110 \u00B7 windows/src/core/appUrlCommand.ts:119 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"1002a5241d6e2ce7b7407e0640b9028c79fe1051ed52c69ecb5adba5fd3f0bc6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5 locations): windows/src/core/appUrlCommand.ts:1190 \u00B7 windows/src/core/appUrlCommand.ts:1273 \u00B7 windows/src/core/appUrlCommand.ts:1293 \u00B7 windows/src/core/appUrlCommand.ts:1313 \u00B7 \u002B1 more site(s) not listed \u2014 all 5 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1190}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bd595c779db7a417e0e712993ed89ceb3ca7fd29bd63bcaba85cbb83c6ce7e2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1316 \u00B7 windows/src/core/assistant/intent.ts:1340 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1316}}}],"partialFingerprints":{"codehealthFindingId/v1":"805f9976c8b68d0227bc0dedae4617808652ef81ec3499d89b86988226268689"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/automationEngine.ts:174 \u00B7 windows/src/ui/panelPrefs.ts:140 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f2b60fb0a0e27de7405cafce0b178a225aae50e5e7e7f0ad202c0dbee00ea7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/automationEngine.ts:1180 \u00B7 windows/src/core/automationEngine.ts:1188 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/automationEngine.ts"},"region":{"startLine":1180}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5965b9c2f1a5243f441bc2543a7a6ecc73748c82a638ef77c27890534db671"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/miCloud/client.ts:695 \u00B7 windows/src/core/miCloud/client.ts:720 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/miCloud/client.ts"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"a983d114be4aeb9f1e99b4684674a18dc40ad31ebf92d9e59ba358726a817029"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/core/optimisticLock.ts:476 \u00B7 windows/src/core/optimisticLock.ts:504 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"7143f5bb0ccd692d1dd5efbf42bf8239a2ef1b98c0682029c03ef9580b4d1e4f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1361 \u00B7 windows/src/ui/activityStackView.ts:1518 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"002c6c3c53dc1697b5ec083742daced422aeca847c01e8ed0e2f173fb2e5bfa8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3 locations): windows/src/ui/activityStackView.ts:1681 \u00B7 windows/src/ui/activityStackView.ts:1692 \u00B7 windows/src/ui/activityStackView.ts:1701 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1681}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ad53077dd1f2da8d60cc92ee5fa1537a5390a19bcd3605bfd08ee4d0376327"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/automationSettingsView.ts:375 \u00B7 windows/src/ui/energySettingsView.ts:158 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"19561e3dbbee8814e79a453c38b2f6e965914df41f69a78d219f2b9c9ccb70dd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:324 \u00B7 windows/src/ui/bindEvents.ts:464 \u00B7 windows/src/ui/bindEvents.ts:486 \u00B7 windows/src/ui/settingsEvents.ts:1201 \u2014 the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"4000130c1f284e315ccaef97646ed23486b39221f3057cf0f3d34792ff4174c7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3 locations): windows/src/ui/bindEvents.ts:853 \u00B7 windows/src/ui/detailDrawers.ts:712 \u00B7 windows/src/ui/roomOrderEditor.ts:535 \u2014 the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"c029c45984c0d21c12a5a83520e992da61c474003700ca9477ddcb04750c93dc"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1034 \u00B7 windows/src/ui/detailDrawers.ts:702 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1034}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b20c84431816471b073e80fbc7306d55cd05158dee531a1467766f20822dae"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1204 \u00B7 windows/src/ui/detailDrawers.ts:778 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf37504a06641c1b044ff83bf3c25795e553a21d93821c521bedb527ce63d8c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (8 matched lines \u00D7 2 locations): windows/src/ui/cameraLive.ts:1270 \u00B7 windows/src/ui/energySettingsView.ts:675 \u2014 the two spans are one implementation copied and then locally edited \u2014 63 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1270}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd4d20b01cf6d3c3d1dbac2348277b6172a0ed11124d206b838ba9f407b9272"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/deviceViews.ts:1389 \u00B7 windows/src/ui/deviceViews.ts:1498 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1389}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d29bcb6912099836d6d5e802bfdbf1c678d58a40e1353a22317da36fa83d594"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/panelKeyboard.ts:194 \u00B7 windows/src/ui/panelKeyboard.ts:203 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"345dbc5be1fb542f3637c4b87521c81fadd06a656be23d79f034165788697350"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (8 matched lines \u00D7 2 locations): windows/src/ui/panelPrefs.ts:282 \u00B7 windows/src/ui/roomOrderEditor.ts:114 \u2014 the two spans are one implementation copied and then locally edited \u2014 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5b862a5d8fd4186c9df2ab55994431ee3b6453847ae80af1d46ac790375f0d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): windows/src/ui/settingsEvents.ts:805 \u00B7 windows/src/ui/settingsEvents.ts:838 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"02af295a6bf6bba06a22d6cd391e9face825626d443d81629a5375635b0d6451"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/appUrlCommand.ts:893 \u00B7 windows/src/core/appUrlCommand.ts:901 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9ff279a8cc3c0703cd7930dea0334a8f76272821a8342e86b870ad1923773d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:1338 \u00B7 windows/src/core/assistant/intent.ts:1345 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8836b868d715f20a6269ad21f324ff28b902112e290584b834bdfd261573eb"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/assistant/promptContext.ts:150 \u00B7 windows/src/core/assistant/promptContext.ts:171 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c5061b5d20f5bef72833252e13556f3e9c8907a733fa308709e1a4c5819441"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/dualSourceProvider.ts:218 \u00B7 windows/src/core/dualSourceProvider.ts:250 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f8c311e247081a685f39bdac51a0b11cdb811258d1395972f6b063c42dc8f3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/haDomains.ts:62 \u00B7 windows/src/ui/panelPrefs.ts:5 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"48791a22d6e675a7a05bb079caa3a481f06d16df8667de64cf8abbbcd179d9eb"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/core/haDomains.ts:1249 \u00B7 windows/src/core/homeAssistant.ts:62 \u00B7 windows/src/core/homeAssistant.ts:117 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57be67f5d4c172173f7f34e4d4b8bf3534b3f4e60a2cce24d3f316a06fa63a9"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/miAccountsStore.ts:636 \u00B7 windows/src/ui/panelPrefs.ts:536 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"131321cd36bf3571fcc66f87f57e88dd4dc755593414c90cf70ac315da585285"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/miAccountsStore.ts:987 \u00B7 windows/src/ui/listCut.ts:114 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5e485d3a3511e1c6ff74e86cbef1cc60ace08721b475248bd98977e9498419"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/core/miCloud/cameraHubs.ts:318 \u00B7 windows/src/core/miCloud/client.ts:434 \u00B7 windows/src/core/miCloud/client.ts:605 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"9855ae17796a9eadb10d23e7a4b3bcd82ba0ed64a86b0404ef0cedd6af8f2c49"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/core/miCloud/spec.ts:150 \u00B7 windows/src/core/miCloud/spec.ts:160 \u00B7 windows/src/core/miCloud/spec.ts:197 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"59719b6cf9365651d12ffea8be9200d9460d94dbf0d8d7151da87c6b572c33c5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/core/optimisticLock.ts:946 \u00B7 windows/src/core/optimisticLock.ts:955 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"5963eb591d36785fd19eeb7cacb9997ec20977062945ab3f4b92ac51cb111ba0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1456 \u00B7 windows/src/ui/undoTracker.ts:201 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bab13159438e4772bf686629fbb13859e365b77b5e1b4ce61338cb6576d5d21"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (7 matched lines \u00D7 2 locations): windows/src/ui/app.ts:779 \u00B7 windows/src/ui/speechGuard.ts:1131 \u2014 the two spans are one implementation copied and then locally edited \u2014 63 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"5712d1495a9b8343be478512e24e84506ccbe6838f1ed4f7787c78b6246b1a32"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/ui/bindEvents.ts:202 \u00B7 windows/src/ui/bindEvents.ts:325 \u00B7 windows/src/ui/settingsEvents.ts:1202 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a285334f2c37a7a746d18642920d54e5ac4fb68370dc6d63e3cd1f55f6eff863"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:454 \u00B7 windows/src/ui/settingsEvents.ts:1223 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17c6d3d026f482c48138de7c4fd1a7784d842b9fc45ba23cc4a0a02570c1660"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:501 \u00B7 windows/src/ui/bindEvents.ts:513 \u00B7 windows/src/ui/settingsEvents.ts:804 \u00B7 windows/src/ui/settingsEvents.ts:837 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"355fe158e9d0f4288379d9f864f50280cb04bd7c31e3e8a1cce02a9e2d27b4e0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/ui/bindEvents.ts:549 \u00B7 windows/src/ui/settingsEvents.ts:920 \u00B7 windows/src/ui/settingsEvents.ts:1081 \u2014 the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"776d04c9abb273dca6bbbb61995a8b068d1f1c6abc6d5de265d78af5e9fac9eb"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:686 \u00B7 windows/src/ui/bindEvents.ts:694 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df59c5a5324663ea9b1f23125f66746715d88b17e96f8a8b2c69d01067390be"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:1164 \u00B7 windows/src/ui/bindEvents.ts:1198 \u00B7 windows/src/ui/bindEvents.ts:1223 \u00B7 windows/src/ui/bindEvents.ts:1253 \u2014 all 4 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"1770dd2dd64ab2dce45e7f5ba8b4051c30318f512e5e788732f211adf27a7241"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/ui/bindEvents.ts:1474 \u00B7 windows/src/ui/bindEvents.ts:1490 \u00B7 windows/src/ui/bindEvents.ts:1513 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1474}}}],"partialFingerprints":{"codehealthFindingId/v1":"99bc019d5a6b5c6c2386db68ae030ccebcc550ee855969f4a4c045e7a082b4bd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:309 \u00B7 windows/src/ui/detailDrawers.ts:320 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"920d9a1a6a5e409a11a82d4df07693f5491d939a19b1524febdff92802391691"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/ui/detailDrawers.ts:482 \u00B7 windows/src/ui/detailDrawers.ts:505 \u00B7 windows/src/ui/detailDrawers.ts:513 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"01467b035f05ea9c5b88ad474744099b17cc0dbb50ad3e95e4624f61f395037f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/detailDrawers.ts:809 \u00B7 windows/src/ui/detailDrawers.ts:983 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cdb5fb2ee17021d0289e1f3e7e27199ac57f002b53ad905f9574b94bbb7fdd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/reconciler.ts:287 \u00B7 windows/src/ui/reconciler.ts:302 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"04798c5cfe51f9ff7c0347226fde26d9e5bc56b0ac58a1a14c572b21bb28afa3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3 locations): windows/src/ui/roomOrderEditor.ts:481 \u00B7 windows/src/ui/roomOrderEditor.ts:592 \u00B7 windows/src/ui/roomOrderEditor.ts:661 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fbb8a957f0d9762e8721e1b62362e77a7356601220f38dee2b4a874a961fcb0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4 locations): windows/src/ui/roomOrderEditor.ts:622 \u00B7 windows/src/ui/roomOrderEditor.ts:633 \u00B7 windows/src/ui/roomOrderEditor.ts:641 \u00B7 windows/src/ui/roomOrderEditor.ts:674 \u2014 all 4 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1d0fbe6aa5a417129ecfc70476fd6795a115b7939d1afca8ac81e124e2e29e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): windows/src/ui/settingsViews.ts:361 \u00B7 windows/src/ui/settingsViews.ts:373 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75b33c4a637ea3aa1dcdd2e254c71641c21d6fe0d2cb3932215e6e68b324b4f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:272 \u00B7 windows/src/core/commandEffects.ts:281 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e2f651646e6af89f082445f480485da23af5c1b020bd675815001a33e015d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:380 \u00B7 windows/src/core/commandEffects.ts:401 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b749d47986f06d724d005d8a0c3273a541c9e16d4a6f40ea5ff79dfced6b1e5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/dualSourceProvider.ts:228 \u00B7 windows/src/core/dualSourceProvider.ts:262 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"128e304214accf46973c89005a4963e70ebc558ca652008af320bdd2809e0e10"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/energyHistory.ts:598 \u00B7 windows/src/core/energyHistory.ts:605 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"64345b75193f23aa24edeb55bfea60a4217d30ff240ce49352196635093f6c90"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/haDomains.ts:449 \u00B7 windows/src/core/haDomains.ts:522 \u2014 all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3b5bcf540d34e8ffa08876924e3b6736174f4aa8876c8cb5102b7ed5be3bb3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/miCloud/cameraHubs.ts:140 \u00B7 windows/src/core/miCloud/cameraHubs.ts:463 \u2014 both copies are in the same file, so extract the block 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":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"b383509d9c42cb508b9e7b82420c17879bcf18d3a4362dcb645838a12a5ee06e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/miCloud/client.ts:413 \u00B7 windows/src/core/miCloud/client.ts:436 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7619b115e13fa293fb26da0a0309c5bec270eb3b572af8d34cce21b328c31de"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/miCloud/client.ts:436 \u00B7 windows/src/core/miCloud/client.ts:607 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ae073228b86a50e246b585988d1ee376e9d84772eb840dc3b57c82f20811d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/miCloud/command.ts:49 \u00B7 windows/src/core/miCloud/command.ts:64 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e63425ba9b811ab91138740d345f35d70f44f6ec811e111f00552100174c18e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (6 matched lines \u00D7 2 locations): windows/src/core/miCloud/feedAction.ts:190 \u00B7 windows/src/core/miCloud/synthesis.ts:1046 \u2014 the two spans are one implementation copied and then locally edited \u2014 101 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/feedAction.ts"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64cb8aafbcbc299a71a7e35e2a1e8cad7e3b55e4690251dc73a670a4bb0c1b1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3 locations): windows/src/core/miCloud/synthesis.ts:1208 \u00B7 windows/src/core/miCloud/synthesis.ts:1414 \u00B7 windows/src/core/miCloud/synthesis.ts:1603 \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":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bde9f2e91af854764f6ecd7c6bad35baaaa6a011b14491ff964d661bd654d71"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/core/miCloud/synthesis.ts:1693 \u00B7 windows/src/core/miCloud/synthesis.ts:1938 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1693}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a380bab4b6b8e78a5968662af81b33a0f083535ac8ae9b0ea074dac6d46f3db"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (6 matched lines \u00D7 2 locations): windows/src/core/quickActions.ts:11 \u00B7 windows/src/ui/undoTracker.ts:23 \u2014 the two spans are one implementation copied and then locally edited \u2014 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/quickActions.ts"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"16d3acd65673c8666b3dbcae5581a7582248a235abe116d57fd2b346e8c424de"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1601 \u00B7 windows/src/ui/activityStackView.ts:1672 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c27bf25fadbdbb82fd010dcf1c32eb0b5db997870497ab249f11a7e13242b68"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/app.ts:322 \u00B7 windows/src/ui/app.ts:328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0a9cef7ee0ccc98d6fa304fcd3713458334d550cd47ff487292c8471de1aa6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/appLifecycle.ts:294 \u00B7 windows/src/ui/settingsEvents.ts:512 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"48df5d05ac5a28caaca5b7899361abe5357fe005bb2441176563a3af4fb79343"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:240 \u00B7 windows/src/ui/bindEvents.ts:256 \u00B7 windows/src/ui/roomOrderEditor.ts:469 \u00B7 windows/src/ui/roomOrderEditor.ts:516 \u2014 the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"482de3ac59f52697ec87d200c22e72292a651224862509ffad6f9e95de3bf2d7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5 locations): windows/src/ui/bindEvents.ts:382 \u00B7 windows/src/ui/bindEvents.ts:970 \u00B7 windows/src/ui/bindEvents.ts:993 \u00B7 windows/src/ui/bindEvents.ts:1101 \u00B7 \u002B1 more site(s) not listed \u2014 all 5 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"d66a2207d7f26d294474f926c68dbf337efcdf1e6833c6071030756b23fd094f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:813 \u00B7 windows/src/ui/bindEvents.ts:1037 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a3aa9afd489e6433de7d5dafb539d59ba333072de41838e9f23c34a37df259"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4 locations): windows/src/ui/bindEvents.ts:966 \u00B7 windows/src/ui/bindEvents.ts:1404 \u00B7 windows/src/ui/bindEvents.ts:1414 \u00B7 windows/src/ui/detailDrawers.ts:649 \u2014 the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"d875ff78b60e9613b6e4deddb9b26f8df86af26e82eb9fa54594264f506163fd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5 locations): windows/src/ui/bindEvents.ts:1028 \u00B7 windows/src/ui/bindEvents.ts:1063 \u00B7 windows/src/ui/bindEvents.ts:1076 \u00B7 windows/src/ui/bindEvents.ts:1091 \u00B7 \u002B1 more site(s) not listed \u2014 all 5 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"c49a36e41b50ef201f42435f0fffb1aee8696365564f16183589c091812e3fba"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (6 matched lines \u00D7 2 locations): windows/src/ui/demo.ts:225 \u00B7 windows/src/ui/sensorHistoryView.ts:290 \u2014 the two spans are one implementation copied and then locally edited \u2014 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"f56ab1ac97a58b85077bce8215f733c7359de15f9194e08a6b0ce70d8bb8d123"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3 locations): windows/src/ui/detailDrawers.ts:501 \u00B7 windows/src/ui/detailDrawers.ts:515 \u00B7 windows/src/ui/detailDrawers.ts:521 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d6f2cad22cb87c828b9c6841cce116a3f630b1fe5f6389a4cfcdb1305edb8d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (6 matched lines \u00D7 2 locations): windows/src/ui/liquidGlassSlider.ts:23 \u00B7 windows/src/ui/liquidGlassSlider.ts:34 \u2014 the two spans are one implementation copied and then locally edited \u2014 71 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"724af7471b3d75e60d7d2b12a1300ba0fa6363000887ad549233a7402f30ec55"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/roomOrderEditor.ts:647 \u00B7 windows/src/ui/roomOrderEditor.ts:667 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"706d9a8aaf01e25ff66cc89828e31475f37ca0a871e227e3d40d6f56bbdedb7e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): windows/src/ui/roomOrderEditor.ts:655 \u00B7 windows/src/ui/roomOrderEditor.ts:662 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"610647e2f7aa9d1bf255ab56cf12b92fea52fc227e18990fb1364e82ed01677b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (6 matched lines \u00D7 2 locations): windows/src/ui/settingsEvents.ts:1266 \u00B7 windows/src/ui/settingsViews.ts:129 \u2014 the two spans are one implementation copied and then locally edited \u2014 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b94c804b14b5570f58419fb8dcacf72101a012fd1435c2e23b34c535289f508"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/appUrlCommand.ts:935 \u00B7 windows/src/core/appUrlCommand.ts:941 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"730442ca53d17afa5c2eeedd027dc146936355296b29413786dba126542c2c88"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/appUrlCommand.ts:966 \u00B7 windows/src/core/appUrlCommand.ts:994 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"32297ce190d6e643a377c34bb1b11ef82ea0ab223d22f238a894681cc9aaff06"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/assistant/intent.ts:413 \u00B7 windows/src/core/assistant/intent.ts:419 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf2c97869df05942cb72d2432b8ddff11482dfd1a75c8193f562784ecf003c7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/automationEngine.ts:1401 \u00B7 windows/src/core/automationEngine.ts:1412 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a81699c34ad31cf262db1501c2e67c07f41b785a835be3a50a4fa39c41d045a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:156 \u00B7 windows/src/core/commandEffects.ts:200 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ac76d21cb3183c71758783f292f51e4583187348541d3806ce1fb98585585f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:346 \u00B7 windows/src/core/commandEffects.ts:365 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"454d9b1b8c4fe03a65f3d74b45519ce4beb3a22c336d483c85622758346ebdf7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/commandEffects.ts:355 \u00B7 windows/src/core/commandEffects.ts:459 \u2014 all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour \u2014 the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator\u0027s options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"48616c0e332d18d0dca1a04093a237ab70f527fa1b9cd9bcdef10fc522fe4884"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/diagnosticsAndScanner.ts:841 \u00B7 windows/src/core/miAccountsStore.ts:300 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d176223104a00d1386a01d4324bfd7d2bf2a553dd0956f49685fc6043cd738"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/diagnosticsAndScanner.ts:1174 \u00B7 windows/src/core/diagnosticsAndScanner.ts:1192 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":1174}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7953eab584fa17ecaa3e067c72018b1f0d2829ef798fbfcb689a302e5317972"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (5 matched lines \u00D7 2 locations): windows/src/core/homeAssistant.ts:1208 \u00B7 windows/src/core/optimisticLock.ts:1031 \u2014 the two spans are one implementation copied and then locally edited \u2014 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"2321b6bfeca0fe89640f37983d3cf9cc68709c43129fd58d93d59a033e1e33f0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/miCloud/accountLogin.ts:147 \u00B7 windows/src/core/miCloud/accountLogin.ts:157 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f73b96235a3a4372ef10e15b71dc2881e33d595fa369cc9be945ad7df4b3b1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/miCloud/cameraHubs.ts:270 \u00B7 windows/src/core/miCloud/client.ts:269 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3fc1a10ca5a26ed4212a5f803aac1df739eb7b9a498b89e5d498d82501a44c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/miCloud/command.ts:356 \u00B7 windows/src/core/miCloud/synthesis.ts:1371 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"153aa5948bab31e1e093079ec9934cfda335d2dc52887be9be3359a563dbda04"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3 locations): windows/src/core/miCloud/synthesis.ts:1371 \u00B7 windows/src/core/miCloud/synthesis.ts:1693 \u00B7 windows/src/core/miCloud/synthesis.ts:1938 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1371}}}],"partialFingerprints":{"codehealthFindingId/v1":"679547bf50930650c99317a5cd529c102e17b1bc0bbe7122c3d66f4f0058f636"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/core/models.ts:1178 \u00B7 windows/src/ui/deviceViews.ts:364 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b42cd39394b8a4349c412437630c64e01b91903ea2c548420bbe324b212204"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/activityStackView.ts:1377 \u00B7 windows/src/ui/activityStackView.ts:1530 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1377}}}],"partialFingerprints":{"codehealthFindingId/v1":"958a005caaf37ef7dfba66b24f12ef5570ffcf987e93deb6da41f3ddf36d130a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/automationSettingsView.ts:1323 \u00B7 windows/src/ui/automationSettingsView.ts:1534 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba392d788e93d350c2558179740dd181eacb2c75b20004ac1698971955230ec"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:317 \u00B7 windows/src/ui/bindEvents.ts:641 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8365c741b6d783add7f4efb0bcf8a7e7c7d398965e41dc4f033f816f064212f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7 locations): windows/src/ui/bindEvents.ts:638 \u00B7 windows/src/ui/bindEvents.ts:673 \u00B7 windows/src/ui/bindEvents.ts:703 \u00B7 windows/src/ui/bindEvents.ts:897 \u00B7 \u002B3 more site(s) not listed \u2014 all 7 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf21919a15ebfbee286eff7a467bec1238106641100a6b18313779e40f1a846e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/bindEvents.ts:1397 \u00B7 windows/src/ui/detailDrawers.ts:653 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1397}}}],"partialFingerprints":{"codehealthFindingId/v1":"2071c404102af3325e77130b9f4661927d8200c56904ebc38f7bf2793ff67f9b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/menuViews.ts:295 \u00B7 windows/src/ui/settingsViews.ts:508 \u2014 the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"2349ff0269f40c413b79e76eceb4d9180ec854b6a282c883c800093f57313f0a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): windows/src/ui/settingsViews.ts:85 \u00B7 windows/src/ui/settingsViews.ts:90 \u2014 both copies are in the same file, so extract the block 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":"windows/src/ui/settingsViews.ts"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"743959011c62dd85a012ab2091eb281f9ba9272c84c5fc47eb5f42571e5e35d3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDeviceKind (cyclomatic 370, cognitive 540): buildDeviceKind has cyclomatic complexity 370 and cognitive complexity 540; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec241588b4e0b809170e855c1140abf6365eae7ab2cf0c0b8b46da912c88661"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceSvgIcon (cyclomatic 140, cognitive 99): deviceSvgIcon has cyclomatic complexity 140 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"f08341ce65ab508a49e203115f4f91bea5cf9ccd35818fc4aa2527648d7cbb8b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyCommandToDevices (cyclomatic 138, cognitive 227): applyCommandToDevices has cyclomatic complexity 138 and cognitive complexity 227; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6ecf87656a20ca1a21d42e172398be05737653739c7967c4d9be6d9226b77c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commitRender (cyclomatic 137, cognitive 172): commitRender has cyclomatic complexity 137 and cognitive complexity 172; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"d10e29603798103e6d0e2a741842716832aafc9db23e927e05d6172c9bb102be"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function classifyRawError (cyclomatic 135, cognitive 65): classifyRawError has cyclomatic complexity 135 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"86945a33a4f749e2851ae69b0961f9d3b06d87bd5be32da4a1b79e5084e4e040"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handlePanelKey (cyclomatic 124, cognitive 133): handlePanelKey has cyclomatic complexity 124 and cognitive complexity 133; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"26170fc7ac8635188c3105b069221b17a69061ad6703cab9ff543654f43753d8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function map (cyclomatic 122, cognitive 194): map has cyclomatic complexity 122 and cognitive complexity 194; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc0dd744bc8b3efe6d474d6f7dabc8c4f79a0106edb6efd512a244c096dc2835"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderPrimaryDrawer (cyclomatic 122, cognitive 173): renderPrimaryDrawer has cyclomatic complexity 122 and cognitive complexity 173; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"43662b9da4dcaaeb65928675e2fb38ca146692d4afbc4cb065bc66f8a6108d70"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function merge (cyclomatic 121, cognitive 179): merge has cyclomatic complexity 121 and cognitive complexity 179; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b3097d949dce01e93d736c9c1860249af22c594a553058ad915c1a9d00d678"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function inverseCommands (cyclomatic 117, cognitive 198): inverseCommands has cyclomatic complexity 117 and cognitive complexity 198; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"88fb97d4f69c2cdd201be59f3532ab2f437be77d7c9531eedc9e765615c02039"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function dispatchEvent (cyclomatic 112, cognitive 209): dispatchEvent has cyclomatic complexity 112 and cognitive complexity 209; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a19fe1799d76215e6015e111fd2928c862ca62f2b5feaf72c1f93faa48e4f25"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderDeviceTile (cyclomatic 112, cognitive 131): renderDeviceTile has cyclomatic complexity 112 and cognitive complexity 131; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9251f0f2eadbb2df472a7d6c279efe1f40ea61d4ffa95020102c87ec380741"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildKind (cyclomatic 107, cognitive 161): buildKind has cyclomatic complexity 107 and cognitive complexity 161; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"28fe3af6e72965b0e5d155ca688c6bb7336ec958351d5d0593b6ad86f6b36271"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applianceOrGenericIcon (cyclomatic 106, cognitive 43): applianceOrGenericIcon has cyclomatic complexity 106 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd1db3eb0d96166e5b06d9c86f1986554918b14cfccc31e200de78803819966"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceStatusSummary (cyclomatic 104, cognitive 173): deviceStatusSummary has cyclomatic complexity 104 and cognitive complexity 173; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9591087ddf02c7e83b3a58e96d3f1c0e7cb8fe8e6647406cbb7b548600fe177"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function onOpenURL (cyclomatic 90, cognitive 148): onOpenURL has cyclomatic complexity 90 and cognitive complexity 148; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f154546243d8bdd8b5eaeca3d63410e00903e8ceec749bf5f5a734c3aa9152b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalize (cyclomatic 90, cognitive 137): normalize has cyclomatic complexity 90 and cognitive complexity 137; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cdc02179e9f04a538f23c8bfcb6c433a5f1c4f2176a4c3a001168f315d2072"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function capabilityScore (cyclomatic 86, cognitive 132): capabilityScore has cyclomatic complexity 86 and cognitive complexity 132; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"70efbf0f3fd3ed70d1c45409aed53d795d93d0bb81860cf804c9825f378d6b47"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveCloudCameraStream (cyclomatic 84, cognitive 201): resolveCloudCameraStream has cyclomatic complexity 84 and cognitive complexity 201; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e77eb1d2666a9f63cbea27c910dc0b490c7ee7a4a8720632dce82feb8a5625"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshDevices (cyclomatic 79, cognitive 102): refreshDevices has cyclomatic complexity 79 and cognitive complexity 102; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"23873636c24acaf6d6a3436dc92dd739bbd30f1daf4a355c71a0d14e71070c58"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateSnapshot (cyclomatic 76, cognitive 108): evaluateSnapshot has cyclomatic complexity 76 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b498b5aebf24fb55fbedd27eca545639d7e62790419a68f4ff91c8bb0b75c82"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haServiceCall (cyclomatic 73, cognitive 82): haServiceCall has cyclomatic complexity 73 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9149de54a47496ad42484361d6a8c9d2590597ec6272a96239eb8cb1cd6152cf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseEnglish (cyclomatic 72, cognitive 104): parseEnglish has cyclomatic complexity 72 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ba16f0051ce79ad687e9cd1216aeb8e25513dc406f88d393bcf9e936bcc53e8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function hasDetailDrawer (cyclomatic 72, cognitive 46): hasDetailDrawer has cyclomatic complexity 72 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"299d1d8cbb8f48134051531429401f79a79ca549bb0f3d0933a0b55f46fa1edd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderCameraLiveModalView (cyclomatic 69, cognitive 77): renderCameraLiveModalView has cyclomatic complexity 69 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd80cddc84554a93915f222a7ef3a25cbdea5c4579d8867a42169c576a65ac74"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeDirectAskPreset (cyclomatic 66, cognitive 104): executeDirectAskPreset has cyclomatic complexity 66 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe9fcd28b42a9c562920d6190e556ef12037667dc220ddc3d28abaef90a2ff6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 66, cognitive 81): (anonymous) has cyclomatic complexity 66 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f5e3b1b5b24bb3661c12cf0238a2a8d4a4bdbe69b7dd09d542c2485bcbf9c7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadSettings (cyclomatic 65, cognitive 93): loadSettings has cyclomatic complexity 65 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3e3d3f2f2be6150c7793a747b0af74a9e44c4fe23efa0075600555bcd0557b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderAutomationAndSafetySettingsSections (cyclomatic 65, cognitive 64): renderAutomationAndSafetySettingsSections has cyclomatic complexity 65 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ccb63a5b04c73019a44fc1aff77170ef3330fa00e1c785fbb889137afa5a8c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function catalogStateSummary (cyclomatic 64, cognitive 94): catalogStateSummary has cyclomatic complexity 64 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"35623befd850879e048e0a7a91695cb2ce27e2cd9246c3e507cd1b17236d60b4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyCommand (cyclomatic 64, cognitive 84): applyCommand has cyclomatic complexity 64 and cognitive complexity 84; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b547c65bbea8aa8af94292fb18e76f6b599407cd312519ce2dcdb4bc7ec4c22"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commandsForIntent (cyclomatic 62, cognitive 104): commandsForIntent has cyclomatic complexity 62 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"a89bb0d09def226d74dd84171ee6750adc0d43b3c73e301beb11cb9236b5d560"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveLiveCameraTarget (cyclomatic 62, cognitive 89): resolveLiveCameraTarget has cyclomatic complexity 62 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"8871379f10e171fc0fcf930be00a0a65e5158f62d7a3ac7c8a0f131240de5a5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseEnvelope (cyclomatic 62, cognitive 66): parseEnvelope has cyclomatic complexity 62 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ad08eede1c91ae84564b4ffb85307543c00d7bfd573944f5d1894898e407b51"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseChineseDeviceCommand (cyclomatic 61, cognitive 99): parseChineseDeviceCommand has cyclomatic complexity 61 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9ce5800101aaab6882affbb0b6e3f764bd986985983e28479cc716cd5b5652d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleNaturalCommand (cyclomatic 60, cognitive 86): handleNaturalCommand has cyclomatic complexity 60 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d1d20ae422003a643a18a060452770dcd2d4fc20ce8bc370f3f9c7430c6091"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractControlIdentityKey (cyclomatic 60, cognitive 69): extractControlIdentityKey has cyclomatic complexity 60 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"3728b07a855787e63f7a4e3ab884e8bb2f3e30784b27961889dc111b0a749056"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applianceActivity (cyclomatic 60, cognitive 28): applianceActivity has cyclomatic complexity 60 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"504bc2ffe07d69002609b8dd0f1150ba4ed2c69b5719f2ec1cd7330aabf2285d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function performUndo (cyclomatic 57, cognitive 89): performUndo has cyclomatic complexity 57 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9831e79cfa862cbcd365e80367b66e1b7319fa23a66fb9e29fa309d5551770e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeIntents (cyclomatic 55, cognitive 87): executeIntents has cyclomatic complexity 55 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"4052d985fb288e31a3942df6abb1a44150fba854e2e1484b7d450e01c16aaec3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeStored (cyclomatic 55, cognitive 86): sanitizeStored has cyclomatic complexity 55 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"087d29beecb63a69f198e43fb18f563f1a9af2059852481f18fee0a26aba0f87"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function topSuggestions (cyclomatic 55, cognitive 78): topSuggestions has cyclomatic complexity 55 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"979da27d95a6e0174ad7c9198e1fd78206afaae8b420610e27bd2804f08e5dd1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncElementAttributesAndProps (cyclomatic 54, cognitive 69): syncElementAttributesAndProps has cyclomatic complexity 54 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"816be841f3e80bc62196425f551ea105efb3d6ed7d6d03a46248fcd9a67d1036"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderConnectionsAndDiagSection (cyclomatic 54, cognitive 51): renderConnectionsAndDiagSection has cyclomatic complexity 54 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce5216315f76a585321e98fb6d22f2e071c2210721c678373cc008de14bede75"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshMultiAccountXiaomiDevices (cyclomatic 52, cognitive 60): refreshMultiAccountXiaomiDevices has cyclomatic complexity 52 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"a81187faa76291fda94a981160faa4c209690531707e24724b1c7d41048e1386"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceAcceptsControlWrites (cyclomatic 52, cognitive 29): deviceAcceptsControlWrites has cyclomatic complexity 52 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"51693487dc6d6016c93dbca757b2aaefd6c6012d4a6667c6d1eb39b754f11d25"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseMiotDeviceSpec (cyclomatic 51, cognitive 109): parseMiotDeviceSpec has cyclomatic complexity 51 and cognitive complexity 109; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"41d4febba8111b7f278ef55f933cca4b7dc4b7afe1b3b38b0b19e97d88ac2124"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildSingleHAFacet (cyclomatic 51, cognitive 49): buildSingleHAFacet has cyclomatic complexity 51 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb749d0f579aae64833d3363b82bf6b7406bf1fb15e5d5f5a4be1494850fdad3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildUpperCardFactories (cyclomatic 50, cognitive 52): buildUpperCardFactories has cyclomatic complexity 50 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1408}}}],"partialFingerprints":{"codehealthFindingId/v1":"10475f96a2b210dbf5775f8c0fc9a2798fadb51a9105b7dd45f183a78c707efe"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function homeAssistant (cyclomatic 49, cognitive 75): homeAssistant has cyclomatic complexity 49 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a287434341d098e71839c0aae52c8ada8716c1d06def73684232721833cc229"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeMiAccountSnapshots (cyclomatic 48, cognitive 118): mergeMiAccountSnapshots has cyclomatic complexity 48 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b5db8f0a0e82adf96fc27669053710226baa62e393ec2c438112fa78905411"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function markdown (cyclomatic 48, cognitive 71): markdown has cyclomatic complexity 48 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":1042}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d81940b35077bf3dba1ec100b7580e283dd728e36ffb3401ef1590c2fd733b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function patchCloudPresentation (cyclomatic 48, cognitive 60): patchCloudPresentation has cyclomatic complexity 48 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3094d86401d566ba37716251c142dec77822c922a59230d87441580a1490fb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshDualSourceDevices (cyclomatic 47, cognitive 42): refreshDualSourceDevices has cyclomatic complexity 47 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a43415fd735e3ad9956a30134d9ab5f266c0ec06abd2ba63a07a2a6288ecb5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function facetRequiresConfirmation (cyclomatic 46, cognitive 57): facetRequiresConfirmation has cyclomatic complexity 46 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7699d0dbd4872acfa83586993f7f272930cb723182eb147ab8d17c8b9b8ff0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function facetControls (cyclomatic 45, cognitive 64): facetControls has cyclomatic complexity 45 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"507720678c051baa7e7375f713c0c276fb4d91c5f9f4030baa216036298ea157"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function demoSensorHistorySamples (cyclomatic 44, cognitive 87): demoSensorHistorySamples has cyclomatic complexity 44 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"788d8c23b3f6b632c28c09eb37b5bb409298befb284f714360daa47be0cdb66b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function ingestHASnapshot (cyclomatic 44, cognitive 66): ingestHASnapshot has cyclomatic complexity 44 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"623a2bed35fc9474a95908edaafba78bac951ee3ab48f55a73d4fc3e60580f52"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeAutomationRule (cyclomatic 43, cognitive 81): executeAutomationRule has cyclomatic complexity 43 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"571676eb24913318ee0cb190124e2440481be83a30fa9e735cd605ca5dd6c328"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function receive (cyclomatic 43, cognitive 76): receive has cyclomatic complexity 43 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04cd73fac0391e3b7c627a32ab54a64c612cf64cb355d7ca31ae07374ad8b51"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function coercePropValue (cyclomatic 43, cognitive 65): coercePropValue has cyclomatic complexity 43 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b803c457b8b775fa92fda788ec75d3f64f6c17db9ad1872ddc85322ada26a866"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 43, cognitive 61): (anonymous) has cyclomatic complexity 43 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/cameraLive.test.ts"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed269a33ba21a3f016745f1cdb659ede13d57c29b5c68819b27ad4c9af9dcd11"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 43, cognitive 56): (anonymous) has cyclomatic complexity 43 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf5fc20cf97ef014b09b24cd33c373f3fe511cc280f04bd4ecc4da169e1d114"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluate (cyclomatic 43, cognitive 55): evaluate has cyclomatic complexity 43 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"027f7c7b76b786355cc7ff6ff2fabd566270d220781006e65efcc7c7833465ed"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildWeeklyHealthReport (cyclomatic 43, cognitive 48): buildWeeklyHealthReport has cyclomatic complexity 43 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f14f4c7de4183c8357576912292b6e4eaeba2d8564ced4814cffe2aabca51968"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderClimateStrip (cyclomatic 43, cognitive 41): renderClimateStrip has cyclomatic complexity 43 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"c63b55d140b81d9d22a7eaeab29e504420f8e78b707fbbeba6490ab83d011b95"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractHADeviceIdentities (cyclomatic 42, cognitive 97): extractHADeviceIdentities has cyclomatic complexity 42 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7b29fa6264c84c6330318a9bfbd5e091366b3dce13000049aea925b68a1c9f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function scan (cyclomatic 42, cognitive 74): scan has cyclomatic complexity 42 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a4c3d6b5ae932cfc51babed9de66c6fd7417df413073dc3890b2a3bbe014c4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseHomeAssistantHistoryResponse (cyclomatic 42, cognitive 73): parseHomeAssistantHistoryResponse has cyclomatic complexity 42 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3986a69b9bc15bdb69cc09230c9013bd503d9345a66e77a071ba10fd76f1f6c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reconcileElementTree (cyclomatic 41, cognitive 70): reconcileElementTree has cyclomatic complexity 41 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a587da2c647b6a46ff87a95dea2b8261f5112027333d74305b60ce3700e129"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildMediaPlayerKind (cyclomatic 41, cognitive 47): buildMediaPlayerKind has cyclomatic complexity 41 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"3354c88e6dcd5de7e12d5978a35e570e6f9ac8054d9b35c01539a0a4cc211bf2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function habitActionable (cyclomatic 41, cognitive 34): habitActionable has cyclomatic complexity 41 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"a73b17f987ad1cf5146ec976cb32a4dd0bf98fe0e42ead5ba8b2cbe2aa3c2976"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderContextMenu (cyclomatic 40, cognitive 43): renderContextMenu has cyclomatic complexity 40 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d4071baf2409b24afbb167f006e376be5fbfe1e73ee0e3680cbce07a7b8ea5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderCollapsedInlineSlider (cyclomatic 40, cognitive 41): renderCollapsedInlineSlider has cyclomatic complexity 40 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f68ab319bc26d9cc062e2de96b6ebf6db85d0b419b75718c5d53c85670ae243"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseStoredRule (cyclomatic 40, cognitive 39): parseStoredRule has cyclomatic complexity 40 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"aede399e5fbf7aaa509d478f99f5a23308e637eb5a5ca5b8d3344967eb9cf8c6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderNotificationStack (cyclomatic 39, cognitive 101): renderNotificationStack has cyclomatic complexity 39 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"7edadaef329828dc2dd37e66fd6a682c81efec0ed0ac3dea463366fff2aab2ee"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncDirectCommandToFacets (cyclomatic 39, cognitive 91): syncDirectCommandToFacets has cyclomatic complexity 39 and cognitive complexity 91; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad570e7a0dbf7c8cbb18950ad6a8a5d9d86e09025d2ad339dcbf640cfd42465"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 39, cognitive 57): (anonymous) has cyclomatic complexity 39 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w1CompanionUndoErrors.test.ts"},"region":{"startLine":1367}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d5a9f8420a5d52b8d193507b96c755300031a9c59f4de6f4f66a797f92b6bed"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function planFromSystemOne (cyclomatic 39, cognitive 56): planFromSystemOne has cyclomatic complexity 39 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e2bdb49329b1932b570762bae7a81424b142a74647ac5f5a39562fb90c0b73"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderPanel (cyclomatic 39, cognitive 38): renderPanel has cyclomatic complexity 39 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"5513c5802b8b560c1df8f77ed080c8c3db2737084b25c06041999b8453358847"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshHADevices (cyclomatic 39, cognitive 32): refreshHADevices has cyclomatic complexity 39 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0129f3828ead36c7b66744c915601e6cc477c4224c7770d6abe90915aac027"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeSingleCommand (cyclomatic 38, cognitive 54): executeSingleCommand has cyclomatic complexity 38 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fadc6cd861fbf832d81d98c29d650d0326591a23e66c816b1e5cbbf8f88177"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 37, cognitive 55): (anonymous) has cyclomatic complexity 37 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"311b3722fad848fffb9c0116ca4487eccf4f42467ba7127a976941dbce38cebc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function record (cyclomatic 37, cognitive 51): record has cyclomatic complexity 37 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e76b9a32a3ef12f8f7838aef171fbe21baa3331063141d59a62429fab8256a2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function decodeChatOp (cyclomatic 37, cognitive 30): decodeChatOp has cyclomatic complexity 37 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"e651f1f4ca1ae76e11ee206c04706f915388a979b4724291dd7f36db04a42563"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function hydrateCredentials (cyclomatic 36, cognitive 41): hydrateCredentials has cyclomatic complexity 36 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a6239daf625890c6cfcc284c26a4d5f714f0ffef4da8aaf804f68b6b0bf1818"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderWeeklyHealthMarkdown (cyclomatic 35, cognitive 58): renderWeeklyHealthMarkdown has cyclomatic complexity 35 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"465e40daf78f6c12e821ff451f7335deda49f8027731b78905edb22dc318f8b0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function main (cyclomatic 34, cognitive 49): main has cyclomatic complexity 34 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c5d882e0e1e2e88c81f6837140ed0faf59ec21fb008d056d61990d40276c7b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function morphMatchingDom (cyclomatic 34, cognitive 48): morphMatchingDom has cyclomatic complexity 34 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/dom.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"632a53e9306a954bf38295ac5ff678edb0d60822b3c04c88891bae6796de78e3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function performSignOutSingleMiAccountOnHost (cyclomatic 34, cognitive 47): performSignOutSingleMiAccountOnHost has cyclomatic complexity 34 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f7c2e352f9f621e9606db70bd5c404e30bfefca68a66ff019de3f36f17b2d05"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractSensorObservations (cyclomatic 34, cognitive 46): extractSensorObservations has cyclomatic complexity 34 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbcf73a24703e2d0598f1bfa516fd8378aea43ef848b5dcfd51a3ffcf1e3084"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractMiHistoryRawNumbers (cyclomatic 34, cognitive 41): extractMiHistoryRawNumbers has cyclomatic complexity 34 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1002}}}],"partialFingerprints":{"codehealthFindingId/v1":"f458209f78c23926e8e545280558aa476832a17161a8b22aa039c9199572627c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateSafetyFacetValue (cyclomatic 34, cognitive 40): evaluateSafetyFacetValue has cyclomatic complexity 34 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"cab37c26f0d890439cef2fb371945d3e4b50855b7d88502def991b05c4d8a3bd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commandsForPowerIntent (cyclomatic 34, cognitive 36): commandsForPowerIntent has cyclomatic complexity 34 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"d30bf23d4b08f1c109ab0922a9487da5ba112e33c70e9937d81f85d786ceac87"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commitCameraStreamUrl (cyclomatic 33, cognitive 32): commitCameraStreamUrl has cyclomatic complexity 33 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"45795c60dcc479ba89f6d9db4a594cca4be97b25d111e838a73562e85832e8d5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function triggerRemoteHistoryFetchIfNeeded (cyclomatic 33, cognitive 28): triggerRemoteHistoryFetchIfNeeded has cyclomatic complexity 33 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97094e8abb6e259d2941cf93cd30912972868061bfcdf8b8b036e639dc45952"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function shareHabitSentence (cyclomatic 32, cognitive 48): shareHabitSentence has cyclomatic complexity 32 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f4b0536106f7d1dd57b0b83fd7412f1f6c681993d6228fceb83b269c4e217c2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildActivityFeed (cyclomatic 32, cognitive 46): buildActivityFeed has cyclomatic complexity 32 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"1982fc7d0aaae41705650b0c4a5aae2218dfaa6d17c799bc6b4ec31960ff276c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadUnlocked (cyclomatic 32, cognitive 40): loadUnlocked has cyclomatic complexity 32 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1a596a63b15f63d7b4898489a3a491216b7c38080ad198f248f8eca0084cad"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function synthesize (cyclomatic 31, cognitive 61): synthesize has cyclomatic complexity 31 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9bc17114839a7657c081d3c774987475e9fac9f9f52c16445c0f04dbd6b769"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applyHAExtendedCommandEffect (cyclomatic 31, cognitive 56): applyHAExtendedCommandEffect has cyclomatic complexity 31 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bafe1f3a59fcd44cde17c00e3d102a14c721927d6a8919381b50e98896fd613"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 31, cognitive 50): (anonymous) has cyclomatic complexity 31 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1325}}}],"partialFingerprints":{"codehealthFindingId/v1":"832ff23480746bcf166b931d19abf42ca121d0293114793e13cbdb9ec4356afb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function record (cyclomatic 31, cognitive 48): record has cyclomatic complexity 31 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"64654420bfb6f4240f22bdf5e26dfc14ff24c270a1d33261e9f817f1a5c9096f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function genericApplianceStatusDescription (cyclomatic 31, cognitive 19): genericApplianceStatusDescription has cyclomatic complexity 31 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"985c5615bac38c94870c775471351ec367d15f000430793e7138a676aee4580b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function captureReversibleFacetBeforeWrite (cyclomatic 30, cognitive 50): captureReversibleFacetBeforeWrite has cyclomatic complexity 30 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"63f35a8b6111cb134fc7a4c9d1f80697477478192db08b6f13bab4ac051e447e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeAutomationCardUndo (cyclomatic 30, cognitive 46): executeAutomationCardUndo has cyclomatic complexity 30 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb312cc310f682e273a7d2a22ea7251deb028319905a9ea31c17ed86051f314c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 30, cognitive 37): (anonymous) has cyclomatic complexity 30 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1100}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9784a13a847d85f81076e231e41f96f76fd9afb87f7b8de7ab483605d6af8e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSensorCard (cyclomatic 30, cognitive 33): renderSensorCard has cyclomatic complexity 30 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8232cb45884018c142ff7ef85b270bc305dec21fd326b8a5825683bb14db1619"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function probeAssistantConnection (cyclomatic 30, cognitive 28): probeAssistantConnection has cyclomatic complexity 30 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b05bbc96a4bd75a26b211f6f66112e51463cb22b1b947dc8e3f96ff938ecb8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveCameraHub (cyclomatic 29, cognitive 39): resolveCameraHub has cyclomatic complexity 29 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e95913dcd7c785f4caa26bdda789e7dff0a7e02d0cb2083582f55ad0dc65f3a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSliderDeck (cyclomatic 29, cognitive 36): renderSliderDeck has cyclomatic complexity 29 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f11446704bcf7da62e10fc9feb959e1a08a7fc8478dfd48929f25f3bfc65ec0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function cachedKind (cyclomatic 29, cognitive 31): cachedKind has cyclomatic complexity 29 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8f68ea81b2c979e4c8dcdd94896e8fec9ca0fd5e8ae9d4285594deb7085887"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function flush (cyclomatic 29, cognitive 31): flush has cyclomatic complexity 29 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f17f066c42762778bd39847a616f7b61b8b18beeaa8072b2c601817d9914908"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mapHAFacetCommand (cyclomatic 29, cognitive 26): mapHAFacetCommand has cyclomatic complexity 29 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a0a5f69d71eddd4ca8dbb96c27924e901766bb0d12810580545ab3c509054e5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haEnergyKwh (cyclomatic 29, cognitive 9): haEnergyKwh has cyclomatic complexity 29 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c2113aed73a19b10e0162dc6a672a6240d40c0c450d13bdb059a84b0e32c4f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function patchPopover (cyclomatic 28, cognitive 39): patchPopover has cyclomatic complexity 28 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb55e046caf1c9f61419d9f2be5db58cff3cf7be3a45de4909ab71237973802b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parsePropValues (cyclomatic 28, cognitive 38): parsePropValues has cyclomatic complexity 28 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"316b46e6fb12834c2642455ec13d20cdc81129554832a1b8abaad173a02de447"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSensorHistorySection (cyclomatic 28, cognitive 26): renderSensorHistorySection has cyclomatic complexity 28 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"541c257bd5a7814cacb9195ecfbb466ccad482af828ec60e81af193570adfe83"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function planQuickAction (cyclomatic 27, cognitive 57): planQuickAction has cyclomatic complexity 27 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/quickActions.ts"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"68597be3c1c08723e8659aa3c8e329acd22f2d59e4cd6d7523fd0dec662be434"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildSyntheticPrimaryHAFacets (cyclomatic 27, cognitive 40): buildSyntheticPrimaryHAFacets has cyclomatic complexity 27 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"f401a432850f11ad89e29898ca8598075d5cdb32066aaed42393afe67adbedc8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reconcilePairedHALightGroups (cyclomatic 27, cognitive 36): reconcilePairedHALightGroups has cyclomatic complexity 27 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe035e89f742ca6fefc812819928cc7dfccd017e8ecb8669935a1566e542748"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeHomeSnapshotRespectingLocks (cyclomatic 27, cognitive 36): mergeHomeSnapshotRespectingLocks has cyclomatic complexity 27 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4f7d47233fdf9dfdb4d6d677d9ae5f4a2a97079a32c2e0e1d96f55e6c4ff6d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readSensorMetricValue (cyclomatic 27, cognitive 35): readSensorMetricValue has cyclomatic complexity 27 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"dca98df8dfbae799445e3fbf4bebb4243c544d39558b1bba6625b0af49e2a30e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runLaunchChromeStartupSelfTest (cyclomatic 27, cognitive 29): runLaunchChromeStartupSelfTest has cyclomatic complexity 27 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2803272a02f173e679e08678cb0c01fb2662d4689b836e672afb4718bb17786"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haBinarySensorKind (cyclomatic 27, cognitive 14): haBinarySensorKind has cyclomatic complexity 27 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cab52ae3506b1c2388c4ff6eec18ad3e403d05a5447f64914dd7b1700bde793"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commitSettingsSave (cyclomatic 26, cognitive 44): commitSettingsSave has cyclomatic complexity 26 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"f921772ec4869432564044f65bbb73fecec40516d3956a523a688780cc1268c0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function rawFromPercent (cyclomatic 26, cognitive 43): rawFromPercent has cyclomatic complexity 26 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/percentScale.ts"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"2515e27e193752016a6f345ad07739ea6a17df329b3873be4a6e8b10cf674505"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function unrecord (cyclomatic 26, cognitive 40): unrecord has cyclomatic complexity 26 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"177d8c741346d7a3db80f43a61ad464ab35427d73dacd83a1b54a2c5d951dc14"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractSensorLiveMetrics (cyclomatic 26, cognitive 37): extractSensorLiveMetrics has cyclomatic complexity 26 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"66edfd854b68856b69a53b4a82f7eae9e4f5194d1f9e9e25612cef6a6da097fa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveHACameraMotionFallback (cyclomatic 26, cognitive 33): resolveHACameraMotionFallback has cyclomatic complexity 26 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e4042d8ac24df681b70ec806b32ab89c438644f83340c3c7c63866daf2899e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function dismissActivityById (cyclomatic 26, cognitive 32): dismissActivityById has cyclomatic complexity 26 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1541}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac4fa757a99433079f7dfde5caf9af89a40ef4f08210eb1ecc5d8034810130b3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function tickSafetyHealthAndAutomation (cyclomatic 26, cognitive 28): tickSafetyHealthAndAutomation has cyclomatic complexity 26 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff17f6545723e704175313fcd0e8808ce5a1f8d7d1e4f63975993ecd69eaec61"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function summarizeRuleDetails (cyclomatic 26, cognitive 27): summarizeRuleDetails has cyclomatic complexity 26 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"87f4dd924dfd1674b43fe050cd41aecced93dc79ae90b8c6028061d0d1abcdee"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseDeviceRecord (cyclomatic 26, cognitive 22): parseDeviceRecord has cyclomatic complexity 26 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"a84451d923b32d46aee6febe9fe46d6065de5563543606646b8efb888b50f49e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haCoverSubtype (cyclomatic 26, cognitive 10): haCoverSubtype has cyclomatic complexity 26 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bdac88ac682d07bf36836cd3a5fe45b76934805dfeebf87de30e2e86b8d80e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function synthesize (cyclomatic 25, cognitive 34): synthesize has cyclomatic complexity 25 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"f311e1a6ce85dec65cd5b9cf49d21e2e973c2685e152dd2cab7a7f075bb80a41"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function onKeyDown (cyclomatic 25, cognitive 31): onKeyDown has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ac0561590498e10a3002bc227ebb67cbd02d80385f7abc27244123ff7cb5a9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function facetValue (cyclomatic 25, cognitive 29): facetValue has cyclomatic complexity 25 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miotFacetText.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2d06e833dfb62d1cb8f36ac915b19b26d80dae258edbea60cae0a987c44a68"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 25, cognitive 28): (anonymous) has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc60b784a6b80dc78a08776af8254ac6fbc7cfb1bb45f5f25c395f9050b573f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildHumidifierKind (cyclomatic 25, cognitive 24): buildHumidifierKind has cyclomatic complexity 25 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"53edbfd7cfa37d742b2fba1edf45a2cf84fd39ec650666b98d2294b7001f2edc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceEnvironmentReading (cyclomatic 25, cognitive 24): deviceEnvironmentReading has cyclomatic complexity 25 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2260f337804b58ebc4162fd111f22077e93b2f797a18c292c6b6e1ff200c7b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function airQualityFromRaw (cyclomatic 25, cognitive 16): airQualityFromRaw has cyclomatic complexity 25 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"7334635b7feef8b9fe7e52b8c027a82866f8b96eb881400f3d421fbc63b0f339"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function interpretLockStatus (cyclomatic 25, cognitive 13): interpretLockStatus has cyclomatic complexity 25 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f30999d1725655416f81fcf9c3e4dc99e75e0c9d562050c6815a01319b6006"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function inferHAMetricFromMeta (cyclomatic 25, cognitive 13): inferHAMetricFromMeta has cyclomatic complexity 25 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1263}}}],"partialFingerprints":{"codehealthFindingId/v1":"4875c493b64861a6e48f7be5f91c68e5a2d889dab69ad3975c559a3992008636"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function appendHomes (cyclomatic 24, cognitive 47): appendHomes has cyclomatic complexity 24 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"5962cbf704c4c95244c4e3e4a9eeed7a8ea8af8ccd090fc50df70f37a3ddefa7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveHomeAssistantSensorEntityIds (cyclomatic 24, cognitive 31): resolveHomeAssistantSensorEntityIds has cyclomatic complexity 24 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1371}}}],"partialFingerprints":{"codehealthFindingId/v1":"352ea4289b7015c39970c11eaa4f520145f7b5acc0ff4d984b0ea22ec1e2cfc8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 24, cognitive 30): (anonymous) has cyclomatic complexity 24 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/cloudFixture.ts"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b484e830006f3266876ed43f0f318a7bb6579cd86f91993ddbfca593a96b95f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderEnergySettingsSection (cyclomatic 24, cognitive 25): renderEnergySettingsSection has cyclomatic complexity 24 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a04c595513ef280ab5b2ac904912a68253f61700018741432252439b1c5e6403"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildValveKind (cyclomatic 24, cognitive 19): buildValveKind has cyclomatic complexity 24 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6117320357081dc836888a78afb3eda451f7a9d34caf5fef4c55999a3ac0e4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderApplianceDrawer (cyclomatic 23, cognitive 30): renderApplianceDrawer has cyclomatic complexity 23 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e2790cdb99ca40860dab3b5ef04233068ce716bb4ebeba112fe3ce09508cd7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function record (cyclomatic 23, cognitive 23): record has cyclomatic complexity 23 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"641cc298273744256b2f558f68934ca26366ae882b7d286caccf6cc104c34cd7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseOperation (cyclomatic 23, cognitive 22): parseOperation has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"216fd828dd83d676fb7adcd33a18769da68fab51dfc1363bb6059f55696df7f3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function toggleDeviceForHost (cyclomatic 23, cognitive 21): toggleDeviceForHost has cyclomatic complexity 23 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1357b1b26f48417fa1b17b63213dcf5fdcb2f6db31d3f0f167fbe171b2149df"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildCoverKind (cyclomatic 23, cognitive 20): buildCoverKind has cyclomatic complexity 23 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"551ab6928e968117560c5101320d64a926893e78b373dbc6fde85545768efe5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bareCategoryOutcome (cyclomatic 23, cognitive 19): bareCategoryOutcome has cyclomatic complexity 23 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e90f4410b580d08499662e946797992e55cd85db223f83816c775c2edaee747"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseMiCloudHistoryPoints (cyclomatic 22, cognitive 33): parseMiCloudHistoryPoints has cyclomatic complexity 22 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a69a485d98a07e23a6d2dd5550803fd6d5317593c3a65b4cad14dae05ef666"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 22, cognitive 31): (anonymous) has cyclomatic complexity 22 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0015f45c522667852dc9a832fe01ac4b9eb57e625ef00c4d4a003b7badcaf2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function updateLiveSliderReadout (cyclomatic 22, cognitive 31): updateLiveSliderReadout has cyclomatic complexity 22 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c8bd8026f639a6a584bff15080fbe4b7d9830c750704a278c0c0e7e459be96"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function cachedExtendedKind (cyclomatic 22, cognitive 29): cachedExtendedKind has cyclomatic complexity 22 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"0673fb144d2c26f13d9ab2a9f7313a9a3196329fdaccbbd651e3d4ed50c15b30"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateSensorAlerts (cyclomatic 22, cognitive 29): evaluateSensorAlerts has cyclomatic complexity 22 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"9683b1c861dfd14ff8a0ce364f903e3723e1be01ae409727b7a006be7aeb8fc6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function decodeHabitOperation (cyclomatic 22, cognitive 24): decodeHabitOperation has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"8861c6e68c8e06ef357d203172f9d0b5a2bf113e53547bdaf3e833650e7fc85f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 22, cognitive 24): (anonymous) has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/cameraLogoutRelease.test.ts"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"3309a62024d7bae77cec4844d8fdc5db9b50ea7dcbf1ad28ec00c3d9ddd90056"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function recordHostSnapshotIfLive (cyclomatic 22, cognitive 23): recordHostSnapshotIfLive has cyclomatic complexity 22 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"00360c4949df227dbad520bd6f85cd9d973d03efaf079b9c579b69ac0cd48901"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function applySlotHover (cyclomatic 22, cognitive 22): applySlotHover has cyclomatic complexity 22 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebcec80c5968625e6a60357787d86745c728f90f109cc6679b07a14d35eef4ae"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 22, cognitive 22): (anonymous) has cyclomatic complexity 22 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":3002}}}],"partialFingerprints":{"codehealthFindingId/v1":"619f4380c989645cff4aa1dfc52c056a6bc7f0499d471b1ed0971199b18d326d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function makeFacet (cyclomatic 22, cognitive 21): makeFacet has cyclomatic complexity 22 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/detailDrawers.test.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6fe9ca512593ac4be03bae81ca2ad9e3426d02f51bf90f59536914b655ff22"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function homeAssistantIdentity (cyclomatic 22, cognitive 20): homeAssistantIdentity has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db02c4af1ddf7778979a475cb4d03db2aff5102185f0b32e3f00cb426f4378c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSmallDeviceTile (cyclomatic 22, cognitive 19): renderSmallDeviceTile has cyclomatic complexity 22 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"452753506d2af86d3908ea43251f7106e27c7d8efd1b608b6376256a44098daa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function classifyFacetMetric (cyclomatic 22, cognitive 15): classifyFacetMetric has cyclomatic complexity 22 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"45579e97a2990300d68d4ccf98b8300feb297bc57a67c57cd97439027759ed01"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function coverActionTitle (cyclomatic 22, cognitive 11): coverActionTitle has cyclomatic complexity 22 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb51103d7788602aa382a71a56a23f3bbb053fe776f36104015e6e263f469dd5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haPowerWatts (cyclomatic 22, cognitive 10): haPowerWatts has cyclomatic complexity 22 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"d96a58b87d54ba32056a73183c4736f58929d9dc722e60005071cac0a7c4e305"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runTrackedDevicePresetCommands (cyclomatic 21, cognitive 42): runTrackedDevicePresetCommands has cyclomatic complexity 21 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"679f97ebdf7ad24de762f18bbe832cb11139b7315db85fe48cf8c3ca1d7be6f1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 21, cognitive 41): (anonymous) has cyclomatic complexity 21 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"a583933a5b074b9dd69a6ff6d4cf6febeb459a63f1f4375740b4cba8a49dee51"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 21, cognitive 37): (anonymous) has cyclomatic complexity 21 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"30532aa802b1926c3722f1ba8069b6069b92659dbaed2111655274a674b6abc3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function execute (cyclomatic 21, cognitive 30): execute has cyclomatic complexity 21 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1351}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3fb34d723ecd3625bc96b8f3a232657102412ba476c22aa9849d5da8217c79"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function listReadableHabits (cyclomatic 21, cognitive 29): listReadableHabits has cyclomatic complexity 21 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"b68bc4b081f0f0439367a59ae1f8bb9e09ac42f51e4a30441ca7f01c454bf305"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function row (cyclomatic 21, cognitive 25): row has cyclomatic complexity 21 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"608e3dbc17a5ea9b2ea40b87131024a1397b1c6cc1aa5d83ed61a2d9cf5a3bfa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveTarget (cyclomatic 21, cognitive 24): resolveTarget has cyclomatic complexity 21 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"95701b8f1159b5cacda262ed43ded0510724774d6bb3bf65bd0d68c8ce76e260"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function spokenChineseNumber (cyclomatic 21, cognitive 24): spokenChineseNumber has cyclomatic complexity 21 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd6bc34b0cbdad4d4776c0e44a8c7a24556502df097fbb1174fce768dbfe5cde"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitizeStoredBucket (cyclomatic 21, cognitive 24): sanitizeStoredBucket has cyclomatic complexity 21 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3767b6d91627ba3e6ab5fc11e082b988654c3c99a8640da881cbaa1d08ec40"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 21, cognitive 18): (anonymous) has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2d87a56ff5453d5de136cdaf3fef0262399ec79f5912bec704876944fc83b7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseServiceTokenCookie (cyclomatic 20, cognitive 51): parseServiceTokenCookie has cyclomatic complexity 20 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa8a5281bda9d6a1926b6e9a3f8eef02da4c503ca0b36c2076a3dd311273a89"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function load (cyclomatic 20, cognitive 46): load has cyclomatic complexity 20 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf5c60b6f3e375c7e8860303e8006d5b58df97e6af477ae4385379099887557"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function findDirectiveAction (cyclomatic 20, cognitive 37): findDirectiveAction has cyclomatic complexity 20 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8378e97e6a6f9ed48577e3d12356bd477343cadc8dd7250cc1714c85ff0d27"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadInternal (cyclomatic 20, cognitive 36): loadInternal has cyclomatic complexity 20 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c447ab19f15d3cd23c16cdce4c1e700fa4a1ec2fc94b90743226985b0f86c8a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveMiotSensorPropertyKeys (cyclomatic 20, cognitive 32): resolveMiotSensorPropertyKeys has cyclomatic complexity 20 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"776816a46a424b40163b27ab1056c692078b12d9e9bfab0ef565dd3b6e05c050"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function pruneOrphanedDeviceActivities (cyclomatic 20, cognitive 29): pruneOrphanedDeviceActivities has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3bcb36d805a6b072d98983af2e723cc19e18867b90bb6f52bd3ee99d17b78c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeCloudSamples (cyclomatic 20, cognitive 27): mergeCloudSamples has cyclomatic complexity 20 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5d93d66ae08dc9ade180541dc4d6ffa836f7412defe8a302641fba93814368"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bindActivityStackAfterRender (cyclomatic 20, cognitive 26): bindActivityStackAfterRender has cyclomatic complexity 20 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f84c2ca3595944ee55242f48b01d82099dadb76184f8e34f4eaa03b6a5f6f3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderCoverDrawer (cyclomatic 20, cognitive 26): renderCoverDrawer has cyclomatic complexity 20 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b099622c3ab544c2a4f702ca9cbab597de55254ad852163ec95abdf53d1dea"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceTotals (cyclomatic 20, cognitive 25): deviceTotals has cyclomatic complexity 20 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc35a8c505c72641f48b5a2155220206657917d9fbcea5e6e6c183779338e0e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderDeviceGrid (cyclomatic 20, cognitive 25): renderDeviceGrid has cyclomatic complexity 20 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc2577f984fb6f801a8a239a8e3f542b531535b3794e57870f594a890b3a3da"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 20, cognitive 25): (anonymous) has cyclomatic complexity 20 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":3254}}}],"partialFingerprints":{"codehealthFindingId/v1":"61947836e06f3cedc6b54133e794ebb72f32aa775612cf4b94f1097b86df065b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceCategory (cyclomatic 20, cognitive 23): deviceCategory has cyclomatic complexity 20 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/deviceCategory.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"29f727428358f2a56b7bcbe97049e6339b09819a6b18e3fbe9fc16cec137b70e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 20, cognitive 23): (anonymous) has cyclomatic complexity 20 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"d479af041632e6ba7601be0a21068691eca105b176e4bd66f697f9577f60f303"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncSensorHistoryHost (cyclomatic 20, cognitive 23): syncSensorHistoryHost has cyclomatic complexity 20 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"f150d4b62ebfc61138144bbcb043363879084c1c79f9b1e28b073be8c84a847a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haLightCapabilityFlags (cyclomatic 20, cognitive 22): haLightCapabilityFlags has cyclomatic complexity 20 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"1168961bb9ea571fcadf2e4f010a75abea8f122c4fde6a1d6b17f7272d13a5dd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 20, cognitive 21): (anonymous) has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"3abbffe32d96c179e7450ed558e19badadddb94f2743a4bd83ef4733582d7caa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadFromStorage (cyclomatic 20, cognitive 19): loadFromStorage has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d744b9962b9e3c98b7dda02faa1020ed2a12cdb70d1f1967f75a80abde35099"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildWaterHeaterKind (cyclomatic 20, cognitive 19): buildWaterHeaterKind has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e6b7c92c03f0f2f21824aa4b0aa2ea017f49fbc44a1e061ca79f5bf0168cff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function writeFacet (cyclomatic 20, cognitive 19): writeFacet has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"748b7e29953dcae1e69ac42ec6d39ba012be4706fb4bb5bbf85fa49181d8ded7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderUpdateSection (cyclomatic 20, cognitive 19): renderUpdateSection has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"4819bf9a579cbfd387193912bd5430fcbf6623d1e11e2541cda946c37df08b4a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function describeResolvedTarget (cyclomatic 20, cognitive 18): describeResolvedTarget has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"0760a77f9ae581b6034179394d23ec279e92f66345c9c78f5ea287b43edcd8db"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 20, cognitive 15): (anonymous) has cyclomatic complexity 20 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99b659b4055705a3ad8edfc810e0d639ae5a178f22696a290372eb9baf4f48c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function triggerIconSvg (cyclomatic 20, cognitive 12): triggerIconSvg has cyclomatic complexity 20 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7453e449a659cdc6b58f69cd1fdefde3ebb90a735efd7386e12700b16929186"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractEnglishNumericOps (cyclomatic 19, cognitive 26): extractEnglishNumericOps has cyclomatic complexity 19 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"b63f2bac2baf38bc842bbe91123c35323ab2ab6e281f379c4e7e508bda939479"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function coerceSilentExecutionArg (cyclomatic 19, cognitive 24): coerceSilentExecutionArg has cyclomatic complexity 19 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"12dac9e50cd4e3aa5df3fed31b773a2f549af60c68ef2ab1f3dc3d8f1ef5fa63"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function base64ToBytes (cyclomatic 19, cognitive 22): base64ToBytes has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc41b3ba04e46f118393a786ccf3b6c67fbcc7d48661d73d3fe8e938c393acd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseQueues (cyclomatic 19, cognitive 21): parseQueues has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"36ebdeb5acce0d82ac13214c51f281b84cbdeca49bc29bc916b2efc0cb10923d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function panelHealth (cyclomatic 19, cognitive 21): panelHealth has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"1809bc33f54b217a4092d42a6a7cd73de5a19c39e3ec1ed8b16416738e1a7ef9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderGeneralPanel (cyclomatic 19, cognitive 18): renderGeneralPanel has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8aabc2ceacc27e097be250faa9d65fe4a03d16b9f5008066aaae5c91bdbc7f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function confirmationHazard (cyclomatic 19, cognitive 14): confirmationHazard has cyclomatic complexity 19 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"df063d5717547fb297c41669d71fc713e184fad1f83390053ba33380c0cf2376"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseTimer (cyclomatic 19, cognitive 12): parseTimer has cyclomatic complexity 19 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b641f750d9f27ddb60e17e614e896d5c8e2eaace0ae55c3fc017090425ce652"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 37): (anonymous) has cyclomatic complexity 18 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/percentScale.test.ts"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0956d84623b4f30a82f958a1ed3bc24422afc5ec76c7f0758ba307e9deeb37"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function partitionUndoStepsByHighRiskConfirmation (cyclomatic 18, cognitive 30): partitionUndoStepsByHighRiskConfirmation has cyclomatic complexity 18 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1942da0efcf5145063dab48044786a35194a1e2177c437ba6b1fac4874628c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mentionedHabitTargets (cyclomatic 18, cognitive 29): mentionedHabitTargets has cyclomatic complexity 18 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db57a894fd872772fb057b96528eed323643fe9140a10387df1e91da01c6257"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 29): (anonymous) has cyclomatic complexity 18 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"68df7ee9a9a82a2f0d115b05e2b41e0ee417346b37bbce2b493d43f8949da580"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 27): (anonymous) has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbaa530535689df11433fdcdb3d70a91ae3ed0cd127c8714161332d0c4096708"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildHAFacets (cyclomatic 18, cognitive 26): buildHAFacets has cyclomatic complexity 18 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"946c7cdd02aeff615525e43095f03162604d9ea62ecf7b329dd732aa60e6d8f3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderPlugDrawer (cyclomatic 18, cognitive 25): renderPlugDrawer has cyclomatic complexity 18 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f632c5fb0c72d4f467ba6e5ab7303d01c99cdc758b1ff9534f7c49b31499014"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parse (cyclomatic 18, cognitive 23): parse has cyclomatic complexity 18 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d70016e9009c22b1f7fbe8e0d30a1aadc57579b25d0aea99b1604ca4e66384c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function seedDemoSensorHistory (cyclomatic 18, cognitive 22): seedDemoSensorHistory has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"dec4a92bed018b0d1dac725a8c78591a7df70e22585cce86f5c6bba0643ee7e9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 22): (anonymous) has cyclomatic complexity 18 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w3AccountsDualDiag.test.ts"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"663b20c4779ef08f651272bbe1eb9fe8be55288124eb4780f4e4f05e4056f6e5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function checkForAppUpdate (cyclomatic 18, cognitive 20): checkForAppUpdate has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ec8bdbc0365f9938db8a7fbdcd02ecb0a7054e80886a8e0366e04fcc0ebaa6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function computePlotGeometry (cyclomatic 18, cognitive 20): computePlotGeometry has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"77fe01da6991b00709fe5f61ed92728b130758699202ec7a00cd381271c11cdf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function openCameraLiveView (cyclomatic 18, cognitive 18): openCameraLiveView has cyclomatic complexity 18 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc82ec77e7f4e6139cc25cbae80311f0b14c51819b42b2159539e268ead524d9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceSpecificCriteria (cyclomatic 18, cognitive 17): deviceSpecificCriteria has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"6477ab4bb4bc638e528e36c4070aa161b3f7aaabd02a176f3375ff99ee284eaa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mountOnboardingGuide (cyclomatic 18, cognitive 17): mountOnboardingGuide has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd75cc12ddd4af244b7e235c3f18f2cf83da78603ba2a8fbd4465a12c5b822eb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSingleActivityRow (cyclomatic 18, cognitive 16): renderSingleActivityRow has cyclomatic complexity 18 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"bad54e480cecc8e4035e5da1b7eb5dbb082db67b82c6ad30fe6583b9edc32af7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseInstallerAssetRecord (cyclomatic 18, cognitive 15): parseInstallerAssetRecord has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"878c6ba9b90a1e5145191f78b0de6d7aa563024a0aa5ee1f7accb3797b86e6b0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderLiquidGlassSlider (cyclomatic 18, cognitive 15): renderLiquidGlassSlider has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f88caf8d2a5e68032b740a341c1751ebb3e3a2094ba05a6dca4499174f656e8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function computeActivityScopeKey (cyclomatic 18, cognitive 13): computeActivityScopeKey has cyclomatic complexity 18 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6b231139a4ace1c7ada68cc4a20c6676a4f27783dc0ef9578dbb6c231fa3e62"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isCancellationError (cyclomatic 18, cognitive 11): isCancellationError has cyclomatic complexity 18 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffe77bc4a597e0b62e66276c222d1c8789d180de34f44e40860e84584a188a2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 17, cognitive 44): (anonymous) has cyclomatic complexity 17 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e37373071d3cb91cc897f359ace9fdde963d5bee9db417d65e0ac688d3673c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readTuplePairs (cyclomatic 17, cognitive 33): readTuplePairs has cyclomatic complexity 17 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6361f923d0938142a0c5a0ea33b22bb8cc40bfda169411d09debc6e2a883fee"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mergeRoomPage (cyclomatic 17, cognitive 29): mergeRoomPage has cyclomatic complexity 17 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"61f9d06d25e184c21f3adda246f35820cf88284c1bb353881212b3fea5b9d214"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function proactiveSuggestionsFromSystemOne (cyclomatic 17, cognitive 25): proactiveSuggestionsFromSystemOne has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"622346b857ee6f8d322b3ab2a1e7134e61b11e56a2a26ef45e8fe2e475d4a79c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateSensorThresholdRules (cyclomatic 17, cognitive 25): evaluateSensorThresholdRules has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"dca6341221aa194181f44252d182931e6a42cb82106a9aeded2a57d545f2205b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function propertyFacet (cyclomatic 17, cognitive 24): propertyFacet has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01d8419021b1629207e3fcba4a6320e0ca934b75182338d82738eae4860ca41"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function metricComfortBadge (cyclomatic 17, cognitive 23): metricComfortBadge has cyclomatic complexity 17 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"c949df7ceb782d839776247cb3165559f09889bb07736af841a86059e97594a7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readAccountIndex (cyclomatic 17, cognitive 22): readAccountIndex has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"6039154a3d184421901781676e584d9f8899e18a6c3780393b127232b60fa3ce"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 17, cognitive 21): (anonymous) has cyclomatic complexity 17 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb988029bb5b7a09e8ca33660d293a7b9ac6d61b27086afc20a447ea8d3ebfbf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleRings (cyclomatic 17, cognitive 19): handleRings has cyclomatic complexity 17 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc08cee42be68fdf4c78d727a5f34f2806483a5732bb89426fc615912fc3cdc9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseHAHistoryTimestampMs (cyclomatic 17, cognitive 19): parseHAHistoryTimestampMs has cyclomatic complexity 17 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4a7de40d0f7821d0550319fa1fa905a5d6e7a70ff7f641530f4787c31767e4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function derivePollingBackoffDiagnostics (cyclomatic 17, cognitive 18): derivePollingBackoffDiagnostics has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":959}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fe04d5690a933623395b1f326e9c4fe3077947977b8a37c45ede5adf0d52322"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function hasUnsavedSettingsChanges (cyclomatic 17, cognitive 18): hasUnsavedSettingsChanges has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7d76ed1652e72e3e44a833b4336a66c95ee2621cd48b1bfd6bfdb0b14f861e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 17, cognitive 18): (anonymous) has cyclomatic complexity 17 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/cloudFixture.ts"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c84fb79e2c8f2df647b09731c84725e2406ef818ec960ee7f0385c8d739c231"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 17, cognitive 17): (anonymous) has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w2UndoGrokCam.test.ts"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb8777183d3075dc28ce6903ebb8491706827fd179ff219d85a9ccf98bbc3b4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function collectMaintenanceForDevice (cyclomatic 17, cognitive 13): collectMaintenanceForDevice has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a41f20d6e08eb1eb46c7e143670a478e1974bb90e430c9978ad5a165fb550b6c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function ingestHostHASnapshotForDoorbell (cyclomatic 17, cognitive 13): ingestHostHASnapshotForDoorbell has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dbd868c1fe10acb210e0c754efc0a059c18299e0c8c1332fc64b4b42f068dc9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 17, cognitive 13): (anonymous) has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8fdcf524255b557a4863ef86978e2309156bebcdaadb7c4dd99467a124fff9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isLocalNetworkEndpoint (cyclomatic 17, cognitive 12): isLocalNetworkEndpoint has cyclomatic complexity 17 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/provider.ts"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b20f61995c569d3f7984ea3b2899bdbf774baf7afa1c11d0e1584f2b1a779e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function describeOp (cyclomatic 17, cognitive 10): describeOp has cyclomatic complexity 17 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8acb65ab93f95890e318faa25af3357c9c4a105f00ac587d01568828cdf33ff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeLightGroupOwners (cyclomatic 16, cognitive 41): normalizeLightGroupOwners has cyclomatic complexity 16 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b34bafe779a415995467d6a32ae0caa5241913625650729f8762d0d74688358"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function randomHostileSpecObject (cyclomatic 16, cognitive 36): randomHostileSpecObject has cyclomatic complexity 16 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"816ad7e4db7e71b48cbe9f88c75439cb8fc60f6749d61343bba4df4f18492d29"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 16, cognitive 36): (anonymous) has cyclomatic complexity 16 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a851117dcefde66c4ec94ffe2d698b78983eeda0331c0796ad7f7692c057acc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractBalancedJSONObject (cyclomatic 16, cognitive 35): extractBalancedJSONObject has cyclomatic complexity 16 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b3fe150aae2bcaa473b1189e2fa6126b1c9e36e5746e7192d64b7d6e2384193"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseUpdateState (cyclomatic 16, cognitive 29): parseUpdateState has cyclomatic complexity 16 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79d5cf611d3edd40324526f1d62325717a6795d7a5bc4de91ce5ecb89e27f1c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runIntentOnDevice (cyclomatic 16, cognitive 27): runIntentOnDevice has cyclomatic complexity 16 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"d761bad0b5c2350dc225daa5cb0123adada08407d1c39c4eb9c5ab0cdb90fb2a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildIntentCatalog (cyclomatic 16, cognitive 24): buildIntentCatalog has cyclomatic complexity 16 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"93abc52e1d31ae55f6a415b1c72747542080c356927ced98a656d5307fb18856"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deriveCameraDiagnostics (cyclomatic 16, cognitive 23): deriveCameraDiagnostics has cyclomatic complexity 16 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9adc88b28d1cfce433273d66005675b57297504d8e98760b528f46eaf8fb81"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function pairByFallbackGroups (cyclomatic 16, cognitive 23): pairByFallbackGroups has cyclomatic complexity 16 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d022ba085a74dc208241d49a95c8cf1b9233fb36e9204ca0b13bd4f961f480"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mapSpeakerActionInputs (cyclomatic 16, cognitive 23): mapSpeakerActionInputs has cyclomatic complexity 16 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5bfae98fc246c897823d3590f995519af6899454c19a830839788de3605d52"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolve (cyclomatic 16, cognitive 23): resolve has cyclomatic complexity 16 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/tsLoader.mjs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ce4b1d08633fd244f2e1b2cc9f8c7f46fbd1f70d071d495c01ac6bc5ab112b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function genericCard (cyclomatic 16, cognitive 22): genericCard has cyclomatic complexity 16 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a78035563e35fe2963e5a15a2bb4d4a51d62f76df444c8188ba40fee35d2c89"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function mockFlipRect (cyclomatic 16, cognitive 22): mockFlipRect has cyclomatic complexity 16 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/classicMotionAndReconciler.test.ts"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f242cd5ee0171de0a16da17d3fdb78db03ac57c3b1a4b346a69886b007962d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 16, cognitive 21): (anonymous) has cyclomatic complexity 16 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":2804}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bef596fc06bebf5b40afd2cfb66284ecd9d86e1ef5945a45f3e4598d8d861c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function switchConnectionModeInOnboarding (cyclomatic 16, cognitive 20): switchConnectionModeInOnboarding has cyclomatic complexity 16 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"e636e906db71901b88df129859f3557a16bd6586d613e875623c51e9e73539a1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function planFromChat (cyclomatic 16, cognitive 19): planFromChat has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d84dfa3aaba20bc392867e7d7867363947611be915a37510e90b7b8d00b0c05"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function credentialsFromSettings (cyclomatic 16, cognitive 19): credentialsFromSettings has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba05806132d30b8115c89752a0a3b0aad64129953f3d5f0d371ff77bf3e4050"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function generateLiveWeeklyHealthReport (cyclomatic 16, cognitive 19): generateLiveWeeklyHealthReport has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed121ab28bc357b3b741311592e2c4a833806c724ea57cfa93e15d8980cdd068"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDeviceCapabilities (cyclomatic 16, cognitive 16): buildDeviceCapabilities has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"d906ce5c8f3e50d3f902b9c788ca2b02aa53ecd1ca2beabc20e925e60fe0ec8b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function inferAssistantPreset (cyclomatic 16, cognitive 15): inferAssistantPreset has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/provider.ts"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"af6b759c84a18da3fa0d6832ab2da6af7e2e1f360d958d56b48db3c6274d3f91"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractErrorShape (cyclomatic 16, cognitive 15): extractErrorShape has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"604e9ad94af2ec52b2816df8143d8772fcd3e83221ec52381712210021a5b7ce"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function energyScopeKey (cyclomatic 16, cognitive 15): energyScopeKey has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f61e982a7fac5c0db69d3cfb65d07a6010cb7502014b7f549fab05584d14698"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function addMetricSample (cyclomatic 16, cognitive 15): addMetricSample has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c59b9e8a9c1fc51a940ae5042b790834f6e0d90e7e89bfb31fa046631ea79f9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function constructor (cyclomatic 16, cognitive 15): constructor has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"b72a758a5acc9aa35329a8539befa5a4bb77167c643ed5204417f9f5e752614a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDesensitizedDiagnosticsMarkdown (cyclomatic 16, cognitive 15): buildDesensitizedDiagnosticsMarkdown has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"15258a80f82ba5739f30b5dbcb9e6a3a74dcd9df00fa24ced0ed7f9fbf41fbf0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function recordShortcutFromKeyEvent (cyclomatic 16, cognitive 15): recordShortcutFromKeyEvent has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"22fc8521e41279f5a8d371b36d1c4cfa08b7c4bd9261374e005a22e3b263193e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function automationDraftSaveGate (cyclomatic 16, cognitive 13): automationDraftSaveGate has cyclomatic complexity 16 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3b2358906ce7817832caba6217eb52e4a03001a076de12770462997b70b559f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveTilePresentation (cyclomatic 16, cognitive 13): resolveTilePresentation has cyclomatic complexity 16 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelTheme.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a0e4bf67b4e92c19cd151b89db837dea2f5dc2412bd7482dcf74079ee465e34"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function energyScale (cyclomatic 16, cognitive 11): energyScale has cyclomatic complexity 16 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92d9a615f5d7121b2e6d39e9e040ccd042019d56d1ce855e5d2ed065a458e74"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function primaryMiotEntityIdForDevice (cyclomatic 16, cognitive 11): primaryMiotEntityIdForDevice has cyclomatic complexity 16 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c1a826c1a7130ffe6c9e3f1c1233f7f1b35d3f3f897d636fd583cc0b3a386eb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function matchFanSpeed (cyclomatic 16, cognitive 10): matchFanSpeed has cyclomatic complexity 16 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"3142f32dd253f048f08c9b84609af0cf2309322bdcac4bf5a746351d13c65c47"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeBuiltInQuickAction (cyclomatic 15, cognitive 22): executeBuiltInQuickAction has cyclomatic complexity 15 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"6606f662de35dd8d3b72215a4e259d8969d5b8d72ecbd9fa188e481e7239e97e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveMiSessionForDevice (cyclomatic 15, cognitive 21): resolveMiSessionForDevice has cyclomatic complexity 15 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e14ab74b054b5f8e113c722be112fce848811b821fafa5d8200ecac9e0c8829"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseMiotInstanceIndex (cyclomatic 15, cognitive 20): parseMiotInstanceIndex has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9e28b68f756d7e7a10e1ce2fddd60dc54ac332e46e4edb710d696d7d6956ff"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeMultiAccountMiotCommand (cyclomatic 15, cognitive 19): executeMultiAccountMiotCommand has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb3c2d301f934b6ca9946030ca36f75615c530d4b74e046443d8ed226c6c9cf9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bridgeHlsStreamToMjpeg (cyclomatic 15, cognitive 19): bridgeHlsStreamToMjpeg has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e93bf026d918b5fb3335854056513b7c3e74373f61ba439728fb5348f127ad"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function withHomeDeviceLists (cyclomatic 15, cognitive 18): withHomeDeviceLists has cyclomatic complexity 15 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/discovery.ts"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"e38ce44199fb2ee9e380f44d73caee501094967609e6bfe6efe93e8cda31ebe5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function selectWindowsInstallerAsset (cyclomatic 15, cognitive 18): selectWindowsInstallerAsset has cyclomatic complexity 15 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"baa569463ef97e0819464cf086bf649958c6bed9b81c57a0778d774574b83b13"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderTriggerOptionsEditor (cyclomatic 15, cognitive 18): renderTriggerOptionsEditor has cyclomatic complexity 15 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ba13378bd96e0b0dba5ce580f1e04f1fccd271f123bf396a738b7b46ea18d5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function lockOptimistic (cyclomatic 15, cognitive 17): lockOptimistic has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"b203000f30216ec392271a3e5c1685485ca2c528751de7b0abd327dcec5cea7b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runReadBack (cyclomatic 15, cognitive 16): runReadBack has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"21df00e766d9c2650a48ac40245af4b4fd1037da9f0029bb266c54f137f7956c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncLiquidGlassSlider (cyclomatic 15, cognitive 15): syncLiquidGlassSlider has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13337ff49f818af524fe018753f20589b5daa4f533d5436394b7bf0d880af46"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function maybeRefreshProactiveInBackground (cyclomatic 15, cognitive 15): maybeRefreshProactiveInBackground has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/proactive.ts"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c1fb470433459c61473c821977a1579721694ff00b34e5f8274cbf22336315"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isLiveSnapshotReadyForTelemetry (cyclomatic 15, cognitive 14): isLiveSnapshotReadyForTelemetry has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7596e8e272df468f2b31b9b1b87323dd87721f2cefa9b38141cf42edaaaf7c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 15, cognitive 14): (anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfef8c4af8f577ac5a55f6689cc95af5a0320dd0a10946d867db405d1cbe078"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function canRecordLiveHostSensors (cyclomatic 15, cognitive 14): canRecordLiveHostSensors has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4730a85160337c49bc98a71bbb827a37261eb0d04920135b4045775a23f518d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function hasUnsavedSettingsDraft (cyclomatic 15, cognitive 14): hasUnsavedSettingsDraft has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ea42388a379200b57f6ca43f1a05266c3b458dea491974909b3a47b122a4c8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function cachedFacetControl (cyclomatic 15, cognitive 13): cachedFacetControl has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d98cc94a0a9bdab85a95cb04ef90489a6420ab8e7afcb6d74098f982b98de3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveCameraSource (cyclomatic 15, cognitive 13): resolveCameraSource has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce450b406d54e1036754e4d1015b7630713ff243a6269909c2dde889eef70e0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function exportRaycastSnapshotNow (cyclomatic 15, cognitive 11): exportRaycastSnapshotNow has cyclomatic complexity 15 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eae311274eafdba0cc45491739d4bbf89b7df75a1c5fb44dedc183aa7896108"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function remainingMinutes (cyclomatic 15, cognitive 10): remainingMinutes has cyclomatic complexity 15 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf420c32e32197286fdca47991ad9ef5a39a0459455da9139e34f287cfcf889"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function record (cyclomatic 14, cognitive 33): record has cyclomatic complexity 14 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"47578637ba2581d522c33023f4135df7147b40cfcea007cf50ce6fd11192fa68"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function findTtsAction (cyclomatic 14, cognitive 28): findTtsAction has cyclomatic complexity 14 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/speakerActions.ts"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb559fc60f7e8f3b5af85b82ecde5b7021d8bf109b983d277975544c780c01c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function auxiliaryEntitiesForCover (cyclomatic 14, cognitive 23): auxiliaryEntitiesForCover has cyclomatic complexity 14 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"4833f2cdd2a62d2570a3c63d048d684947374a1ff9f426621bf01e5954462f0b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function dispatchDesktopNotification (cyclomatic 14, cognitive 22): dispatchDesktopNotification has cyclomatic complexity 14 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"34a0b8d96eecfda97e56f28b953fe94aefe7dbfcc6efc7ab2f8b7e71046a576c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function decodeResponse (cyclomatic 14, cognitive 21): decodeResponse has cyclomatic complexity 14 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"373985ae47790fbd4c7d853461ad887127998e655f5fa0ca004cc0c344b65dae"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function miCloud (cyclomatic 14, cognitive 20): miCloud has cyclomatic complexity 14 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"212817293f21a81dc0371a0e3fb731cfa73aa100da9cb1298195401dbe7cd8ce"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractRecordParentDid (cyclomatic 14, cognitive 20): extractRecordParentDid has cyclomatic complexity 14 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd88391765297ce3692baec1935a5f8a1a496bb8149e5d49a5f8edb5bb642d03"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 20): (anonymous) has cyclomatic complexity 14 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w3AccountsDualDiag.test.ts"},"region":{"startLine":1072}}}],"partialFingerprints":{"codehealthFindingId/v1":"679fc0932bb53114701b56abfa0faf77f8263d2387e507bc9121be977ce07f5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractChineseNumericOps (cyclomatic 14, cognitive 19): extractChineseNumericOps has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd677b312b3e80b6f18a916b1daf2b1a0d101bdf787ee0cf723c75cb0a59559"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildDevicePhrases (cyclomatic 14, cognitive 19): buildDevicePhrases has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"def3c791684045b1b89355b0756eea01d0c94e7ecbd1fc3920b368ab1c0451ad"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function restoreSettingsDraft (cyclomatic 14, cognitive 19): restoreSettingsDraft has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"a226fa57b9dbee559ef3633cb798ffcb936621f5547580a3437b48a25c443c0c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshParallel (cyclomatic 14, cognitive 18): refreshParallel has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c0c3689cf91867a1501dfd731c7dc6caffef9f08e7cc99e26e266b84b3a291"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function swapIfNeeded (cyclomatic 14, cognitive 18): swapIfNeeded has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1499}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f1eba735902d66fa4602e166d0c85e3473c8acd224fdc73b0318abb5cca2b8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function handleDraftInput (cyclomatic 14, cognitive 18): handleDraftInput has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1298}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ca06c0b2a102d73cc759b67479f7d32dbb8584207fe528a81556dff606484d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function migrateRoomScopedLayoutKeys (cyclomatic 14, cognitive 17): migrateRoomScopedLayoutKeys has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"5987c1c79f7b593292ee3264c6dd4da59e8c1a84fd7ab89dcaa1f227d8347b73"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bindSettingsEvents (cyclomatic 14, cognitive 16): bindSettingsEvents has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3063fa760d3e7cb253ee48991325d28e56ff2c57f59e1b2d0b39db3917c3d04"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function invoke (cyclomatic 14, cognitive 16): invoke has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/releaseAuditFixes.test.ts"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"284a385600448b791183a5ca1c04fc5bd70c765d9254de4b33d2bed0d58a60af"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 15): (anonymous) has cyclomatic complexity 14 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4MultiDualDiagUi.test.ts"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba2bda6206b77a7d816d2bc0cb180083e5fe8ac24ff9205921815f8799e7d7c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseMiSession (cyclomatic 14, cognitive 14): parseMiSession has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"953add7cfb5870037396c9a1c7587f9757f3cbb0909971dc1cdea39ec6832565"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncMoreSettingsHost (cyclomatic 14, cognitive 14): syncMoreSettingsHost has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d537f20f95bda02d875344370e4639a0559161b12530f2aa015fc5a1a947e8bc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 14): (anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":5151}}}],"partialFingerprints":{"codehealthFindingId/v1":"10dccf7c2c02c592fe9d3a273d5a66c8f200e42dd405770c2c8178b65d6181b3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parsePrivateLanIpv4 (cyclomatic 14, cognitive 13): parsePrivateLanIpv4 has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"48646de151b8b2b0b1f5164ad7e0b4e791c7236cfc845b6485e8152460a87cd4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function speedBounds (cyclomatic 14, cognitive 13): speedBounds has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/percentScale.ts"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"132344da68ea07a46ae9107da9f5f89d666befd97f4b48aa5791dbe420b85ead"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderTokenBadge (cyclomatic 14, cognitive 13): renderTokenBadge has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4f188c267e6e97d3265115dbcd677980482c42065b4c865b29ed64fe88b59a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 13): (anonymous) has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"3467fccfe19e9115ab859c0bf8a373577a05d3de2250387da725c2385e9d5cf9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 12): (anonymous) has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa7c6d5133bda0d814dae0ac117a106f38008dcaceee38b2481d272ed322390"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 12): (anonymous) has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba690127890fa2e6a4d2c682533f72d884bdfde3f6a5e3594ef964f0e8ff648"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 11): (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b89cdad23fe33a58b7f6d0adf6fdff16945578df56162435b1b1616c9f4c24a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 11): (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f6e0cbcd4b0218cfcd21f13c68293b9cf072cee279616aef62a3b86500c3347"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 11): (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52eb3bbf58fd065508bf628a571c4ba2ca99ff47cdc465ce4a862147b60c185"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 11): (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/liquidGlassSlider.ts"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bf112ab35c9f307dd89d811c5cf37758ed119f83efea97cf91a3de9462cb982"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function reconcileOps (cyclomatic 14, cognitive 10): reconcileOps has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cad83f0e3e44cc8ebb89aac1c55e140adfceaefaf747ab7baab1176706518c7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 10): (anonymous) has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1646}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e12c841831434b3ef8108288d69b240c6d8d852a0ba7bbd2ebbe1a20144fcb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 14, cognitive 10): (anonymous) has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"d29d00988313d396acb0b017f9a0265eed37072b757e63868f175fce1d1d259c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function pumpAuthenticatedMjpeg (cyclomatic 13, cognitive 22): pumpAuthenticatedMjpeg has cyclomatic complexity 13 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"6332582d1eed6e8664c867de87b5cd6d632d459d677b5df71835bda5321500dd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function primaryMiotService (cyclomatic 13, cognitive 20): primaryMiotService has cyclomatic complexity 13 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8a3b64ee83a8cf2b943fd2b58f6fc99fb6830ee8273fd097e806ce9e726613"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeMiotPropValue (cyclomatic 13, cognitive 19): normalizeMiotPropValue has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c75e22f3c0b880b5942e0e5dec713399de3b9afbb03a68d9ad2d99e57f01120"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function prune (cyclomatic 13, cognitive 18): prune has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff9b3c72ead4a8049756b9e02ae39af05e7520c0295f98684700980214c0e5e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 17): (anonymous) has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bc6de33614b4ae231a476154b74f1256e6ad0922b2dcd35c64c37ea4e555ec"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function activeModalContainer (cyclomatic 13, cognitive 17): activeModalContainer has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e89839f8ca34044dbef624510dd6fa2065a1ec2f97a8632d68c49d45876722"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function appendMissingRoomDids (cyclomatic 13, cognitive 16): appendMissingRoomDids has cyclomatic complexity 13 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/discovery.ts"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e672cc68de2e773ffd78bd72c307be66d0bd5611043366ca525a78445ddb971"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extract (cyclomatic 13, cognitive 15): extract has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e04dbf98f9c17fbc98f9f9e2cae9611545e0b6ff1cf0d9650519ad77d842df6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseStoredAction (cyclomatic 13, cognitive 15): parseStoredAction has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"57201b40e44e34a8050d1027166466a085d1b1e9c2a8aebc4632e8a1cc12d819"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sha1 (cyclomatic 13, cognitive 15): sha1 has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"e932e340d8cfa619415bf139fac6e441bfed6f823cdf6169e0ada5d9c0ca83e5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 15): (anonymous) has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/miotFacets.test.ts"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fbd266ed8f5927b0826ecc5277f4960f379dc42e47c13ca5d3561bb56542d5d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function findUniqueAskDevice (cyclomatic 13, cognitive 14): findUniqueAskDevice has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a0d6fdc6d680d020010f5ec3cf3b8369ddb381b695c77e89599f7f890dfe65"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readPersistedAccountExpiryMap (cyclomatic 13, cognitive 14): readPersistedAccountExpiryMap has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"54632515093ea1c010171825243bc06e00ec60a64b09d9764ea5554912925493"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function readyGroupApp (cyclomatic 13, cognitive 14): readyGroupApp has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":4626}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2ffe8340239bc35d118aaed78712cd908dcd8f7718b11b25ba89c5b960e21f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function forgetHabitItem (cyclomatic 13, cognitive 13): forgetHabitItem has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"a587e07886e6c99a9c754d674d3f6cd94ce15d3a20088f806ebf0b0a1abf000c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function haBinarySensorStatusText (cyclomatic 13, cognitive 13): haBinarySensorStatusText has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bea844a60cd3f3a0fce84244862dab1777cd3f73e1fc857ade2f4dfc3326b30"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function refreshMiAccountsConcurrently (cyclomatic 13, cognitive 13): refreshMiAccountsConcurrently has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"6853945be57b3a1be7c1d48c6009e0a5b6c0cd4f5338b768d4f6a226e758c430"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseConfirmationOperation (cyclomatic 13, cognitive 13): parseConfirmationOperation has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":2201}}}],"partialFingerprints":{"codehealthFindingId/v1":"6503d032d3e768a04492a05ec21a71c8a5c94421062c7d7681eea99baa2e79c0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 13): (anonymous) has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":3401}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e17621fd6368fed269cfe132231c4a1d904590966361121e519d6ff7c707ba2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function record (cyclomatic 13, cognitive 12): record has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe0eae9f1236b1033f302c79126926fc30cd495e6d30b5af801845f528ed840"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 12): (anonymous) has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca669e8b683c33454f083b9c848f52d6fda68c579a5a275d5765cdd38e4022b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function submitPanelInput (cyclomatic 13, cognitive 12): submitPanelInput has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a905b9e47f51a9c5ac6ae7701eab8e51b4378b3b74dc4ff657ed3d1e2de01c5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function makeLight (cyclomatic 13, cognitive 12): makeLight has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/aiAndSessionParity.test.ts"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"632c40078f6ab22697fd81c798f0113112ed9bd0cbdae8af2cd645c50fa71741"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 13, cognitive 12): (anonymous) has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":3691}}}],"partialFingerprints":{"codehealthFindingId/v1":"e303abf7329d2e77cb46c088a72026c128c1f0305ca605b45383f5a99797bc2c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function percentEncode (cyclomatic 13, cognitive 11): percentEncode has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3956f8ba7057e534b2847d22bdc6aab09aeca0dbc8992a5b36b17e5729b9cf"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function pointMetricRange (cyclomatic 13, cognitive 11): pointMetricRange has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e6eb5d2bb5fa32d2c746722b705facc3c4641a6af88d19e92eeda7b11570cd9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolveCachedCameraTopology (cyclomatic 13, cognitive 11): resolveCachedCameraTopology has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"754e59db6f6332e085587ed470b42527df6e369370a020652921c72fc2f6829e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderPrompt (cyclomatic 13, cognitive 11): renderPrompt has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/menuViews.ts"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b11d8d7ee1a8e69d30c3c5cf8533169a3c39acf85b2f0ee4e41b1135b9862e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function inferSensorKindFromMetadata (cyclomatic 13, cognitive 9): inferSensorKindFromMetadata has cyclomatic complexity 13 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"8410cdf607a1716c1b11d44f391905f416004cedce32b955c4d0d46ba73d1e4f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 27): (anonymous) has cyclomatic complexity 12 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":4001}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0a6d5492ecdff82827d4d9343dfd9450c2a3e3544123b53e3b9c239c853da9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 19): (anonymous) has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaa833759fbef6e951501c8d268cbe83f92ff67ddfc6f7c341f72c994fbde29e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function setRaycastIntegrationEnabled (cyclomatic 12, cognitive 19): setRaycastIntegrationEnabled has cyclomatic complexity 12 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd5f481ac8f0eabae6997b7c7fc0e25adba77a0b627cf1b0c2f542bc30ebaab"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 18): (anonymous) has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7c49d4589c0d761f189aa608930660895879071ad084bd110d2907fb985ea9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncSlidingTabIndicators (cyclomatic 12, cognitive 17): syncSlidingTabIndicators has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44e21ef70139181ac20bf9ec54cba55f2f6e8d2ef930f2d26b6986d3283c9cd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function patchDimPreview (cyclomatic 12, cognitive 17): patchDimPreview has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1160}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc9bba5d956164dcf3b9d0a6e08e599f069d9669adc460a28907ee5c47c5d1f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function onresult (cyclomatic 12, cognitive 16): onresult has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"09eee22a0ee6d5b3bae559b66991c2a8aaca0a82dfa722ed88b124ea9a63f117"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function actionFacet (cyclomatic 12, cognitive 15): actionFacet has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5cde4a27ff11e22d2ab0bc62b7ba22e05b2120c616983e70bdd958933317037"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function clearHostSessionAndDualSourceState (cyclomatic 12, cognitive 15): clearHostSessionAndDualSourceState has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4c6d7e1523bfd91da6a519d11a7185406fccbcca0db0caf7174e145b8863bc"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function trigger (cyclomatic 12, cognitive 15): trigger has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"66df4861ccbda84c8e1c5c6d22a9fc39b5a2da02526b760b77a01f41b3703f11"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function disconnectHomeAssistantOnHost (cyclomatic 12, cognitive 15): disconnectHomeAssistantOnHost has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd06e8eca95d4b7d520fc98838a66c2a467d6d5bf9f24b0b2d2d3b4d312b8c88"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 15): (anonymous) has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":1920}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2347cedac43597683283802e13aa74fe29c131b2d7b340faaa078247dd0c118"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function homeDevices (cyclomatic 12, cognitive 14): homeDevices has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42a1dfa4539863456634353bad98884089e8eca4f0760d59329b69f807cf23d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseArgs (cyclomatic 12, cognitive 13): parseArgs has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d71e389dc75a0704bba3c4cc4f9436313392b2b92cd9f2822470d12bf3c7d8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isSwitchedLightDevice (cyclomatic 12, cognitive 13): isSwitchedLightDevice has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/deviceCategory.ts"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d48776381dad152b6a89c4557e70671eeb1ae72042e49b9c6f0fbf15a8694d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 13): (anonymous) has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8db0f9ede5199878fe9a1ab6d5cd286ca0a38d8df8c057b6f83eff219b97d2c"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 13): (anonymous) has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1d5acdf1167e5028606f0e2df7fa66321575b9e300d6c1fe4edfa0208b3ca9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function startAddAccountQrFlow (cyclomatic 12, cognitive 13): startAddAccountQrFlow has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"3744288a8b6abaa316906fb7615560f6eb27a0d68cc9cd6f84712fc95eae7c97"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function highlightSettingsAnchor (cyclomatic 12, cognitive 13): highlightSettingsAnchor has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsSearch.ts"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5ffa307c58a5fade813c6fb2346cbb8e1531e987659cd485abfaf61099c625"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncUndoBannerClock (cyclomatic 12, cognitive 13): syncUndoBannerClock has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f110b341d64e098a64a56abd90d7ecbe70cc11c897456cb3c395ef791d2c29"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 12): (anonymous) has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"903d7f175c54298443ef82c6fbf39ae6d53172fd4f65273502b438943d5e405d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 12): (anonymous) has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/layoutGestures.ts"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"5620954e6361619cbc5edafcf6906cc80a1d05fef201fa9caaa8be52a7d0a005"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 11): (anonymous) has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cbb832fb14041f5e75f5446f57612c889b019d193cad22288f1539020ac37fb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function uniqueFallbackKeys (cyclomatic 12, cognitive 11): uniqueFallbackKeys has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"af032a9de30615f1a2e064dd129e151a07733ca00bc0fdfc699e3e10946ef368"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeDeviceLocalIp (cyclomatic 12, cognitive 11): normalizeDeviceLocalIp has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f095587b81b89218f87ff1f5b42603b94159808ff769085c53c1423e4f5940"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function bucketToPoint (cyclomatic 12, cognitive 11): bucketToPoint has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"804223804989ba67f3af6a6d4b07a6c333d29c03e991029ad01f86c10554cfe5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseLatestRelease (cyclomatic 12, cognitive 11): parseLatestRelease has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/updateChecker.ts"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a94221f83e42d0124cf212a61c193d61c6bcc2e8ae4084d88aaf96b3ef295d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderMoreSettings (cyclomatic 12, cognitive 11): renderMoreSettings has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/facetViews.ts"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"261175abb6ecef0ebf8051b0ea3b02ec415c31a30cbe09618defc298171d9669"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncSettingsSaveHint (cyclomatic 12, cognitive 11): syncSettingsSaveHint has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a4685903c2a9a79b51c79753b2dd94a2185f7291014f53754fb9e13a437008"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function executeBuiltInSceneFromUrl (cyclomatic 12, cognitive 11): executeBuiltInSceneFromUrl has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd6f022d85461bc1958d168d3652dba9bb9f2e7af6e2d0e5f15725d131b0d7f7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 11): (anonymous) has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":2886}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee2197772f1fb997fdbd9afee8800de6b06e481a1306761ede53422263d6008"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 11): (anonymous) has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/ui.test.ts"},"region":{"startLine":3296}}}],"partialFingerprints":{"codehealthFindingId/v1":"56043cb880be026da0ca8fc7d6b8b861bfaa4226ca7fddb1c495fa6fa55aa67b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 10): (anonymous) has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0fe0e2e887bb7d438f6d5245d10c085b71913c90e5976f37644e639b30ce82e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 10): (anonymous) has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1590}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ebcd1b0199cb607bc257e3159ff01b4e971a6ed8f07d0b911e525be80c274f2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseTicket (cyclomatic 12, cognitive 10): parseTicket has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be5e88effccfdc7ff9902f2101c248aae149372c3ec4e991f92fa9349613c9e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function panelQueryKind (cyclomatic 12, cognitive 10): panelQueryKind has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/panelSearch.ts"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fbe2066ee33f0ec334fa10a174f1640d8bd147510c5ac731344a49a5a7b32ae"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 10): (anonymous) has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":956}}}],"partialFingerprints":{"codehealthFindingId/v1":"179d5ec7b6081f94a8122d953291054e4c297215505a62f53f0d41a9024f2855"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isPrivateOrLoopbackIPv4 (cyclomatic 12, cognitive 10): isPrivateOrLoopbackIPv4 has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4ContractReplay.test.ts"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"229ed16fcad47c37c5741c7259ae5ed8accd3c4861cef132004f83fee890e5fe"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildMiotFacets (cyclomatic 11, cognitive 25): buildMiotFacets has cyclomatic complexity 11 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e565e02a9f85fb8fc832a58175d3dd7dc86c716bde482682554081eba12fe0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function trim (cyclomatic 11, cognitive 24): trim has cyclomatic complexity 11 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ace55b0938b0b9259b8b1e13db5269c2b910c50052bb53eeb1b561225d194f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function waitForScan (cyclomatic 11, cognitive 19): waitForScan has cyclomatic complexity 11 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/accountLogin.ts"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"923f932bb21e815179c36418f2e6bd9f56038d5fce6e46e8f0d4433d4d8dd635"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function takeDue (cyclomatic 11, cognitive 19): takeDue has cyclomatic complexity 11 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/scheduledCommands.ts"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8bf515f380fd011c64c869fea68a608def310ad38521ede10172829ca8c5d1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function deviceSummaries (cyclomatic 11, cognitive 18): deviceSummaries has cyclomatic complexity 11 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f3753c4d3017eac03b2f260ae9691fcff9514ecac27f6c1433872d964464c1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function advanceBy (cyclomatic 11, cognitive 17): advanceBy has cyclomatic complexity 11 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/backgroundAndTrayLifecycle.test.ts"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"0916a684c9c6d6143cbf8e4d34004a6820bd1c1620915494529d5986f92291fd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function transpileTypeScript (cyclomatic 11, cognitive 17): transpileTypeScript has cyclomatic complexity 11 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/tsLoader.mjs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a70bf77819a24fcffeb0bd547252da8a70f914f0ed009ab6c0b16fe5e901b9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseLightGroupMembers (cyclomatic 11, cognitive 16): parseLightGroupMembers has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"709ef79f73d26e30b6a1546fdf90d77ef56e62c23b56948b418ed43bab5d03c0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 16): (anonymous) has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf15844fbff54402e8fd899a7e2ec815bfb85fd4527a92455f0163c12b0ad94"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function apiKeyFor (cyclomatic 11, cognitive 15): apiKeyFor has cyclomatic complexity 11 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1778}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd11667d283d2b73a22c9eb36f4ff2abf2a8592e05c475e89777668806b8e423"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseRawQuery (cyclomatic 11, cognitive 14): parseRawQuery has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"d87cc2d3f2b97cd5aceb0ab1fe3218b8bff15dce404b274c91dde43d1cb2db27"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function isHostAttachedToActiveWindow (cyclomatic 11, cognitive 14): isHostAttachedToActiveWindow has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e7e2ed43d90fe74d1e876db54abca42af1deb185402c1add2016f654ebd2d2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function evaluateScheduledTimeRules (cyclomatic 11, cognitive 13): evaluateScheduledTimeRules has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"740c064b4b9aac796c88aec0b22bf145b03925310f0c0b7f0f7e45ef3f0f2980"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 13): (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d2987d65f197c09670c46a2a4ce18c816d4d25e60e2e86d328e38f0eb5499a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 13): (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w4SeededFuzz.test.ts"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"4511c81b24a94244501d4d888c0159f228120b189ab7b45351b1a53c8b4c854b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function confirmationHazardMatches (cyclomatic 11, cognitive 12): confirmationHazardMatches has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"626a19ed500e99c06d53f21f6853eb647082078a7eb78d773fd4b9a91d26aff4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function disambiguateRoomDevices (cyclomatic 11, cognitive 12): disambiguateRoomDevices has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/chineseIntentTables.ts"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"515b961d69b2fcae49525d91ea8a11e55fd2c88c749f5a1efde70da1feab0575"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function endpointURL (cyclomatic 11, cognitive 12): endpointURL has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f6601159421ed05abf0cc27bcdd650bda993f535270a339e6b84916739b19f7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractMiDeviceIdentities (cyclomatic 11, cognitive 12): extractMiDeviceIdentities has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"7803d8619b4d9087b43e8a15b5d0f544a9be78cc4a2a07fb2f2b4a2a11a7d8bd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolve (cyclomatic 11, cognitive 12): resolve has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"f953db411d43ff6bd57a26d0890d8439db82b48ac4e5bbdeaeb039516154905e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractFacetNumeric (cyclomatic 11, cognitive 12): extractFacetNumeric has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c97a41c747d364d57ce785aa2d330534acf184504b76b2b4e2acb2074b30aa"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function startUpdateInstall (cyclomatic 11, cognitive 12): startUpdateInstall has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"e385d8cebeab46947da375d7c894bb73f48411bb8cbdd97750223b92b9faf251"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function computeQuarterTurnScale (cyclomatic 11, cognitive 12): computeQuarterTurnScale has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLiveModalView.ts"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ecf24fe110d13ed942a03a2cead33ee13a3070f4913595c51cb4313fa4b185d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function validateDevice (cyclomatic 11, cognitive 11): validateDevice has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/snapshot-validation.ts"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"df99e572f7d222abccafb7e292bb3f2ef727750a94c2533a8259792fb70d5cf4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function load (cyclomatic 11, cognitive 11): load has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b141c18ce416f2d442995f075969fef49247055f27bcd0078aaf27fcc4de23"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function getAccountTokenStatus (cyclomatic 11, cognitive 11): getAccountTokenStatus has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"765a4fa6345c82d0ef165051e479b8a0b19d47de757c3c4a7195e28ec309dde4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sha256 (cyclomatic 11, cognitive 11): sha256 has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloudCrypto.ts"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d66020bdaf2839d548b2582adcba5e50f17abc079b9e1a7ad5f9bb943711ee"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 11): (anonymous) has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"7326a712ded2433a8bc611dd59f05b1f7c6a578582969ca81f60c78a1b42e472"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 11): (anonymous) has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c3ad53fbb31b2497dbba3d19aea4582e1851727d88f0ce9d7a8471f5cc2639"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function knownPreferenceIdsForHost (cyclomatic 11, cognitive 11): knownPreferenceIdsForHost has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7513e3e005fa45a7f8a31586148c6660600ecd5f7c4a40b819a25d31e4c3a9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function updateSliderThumbBadge (cyclomatic 11, cognitive 11): updateSliderThumbBadge has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"555ea688ea325256c9252af5a3a1db0a1d920399b2febbe4d6ef0daa90112f1e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseConfirmationDevice (cyclomatic 11, cognitive 11): parseConfirmationDevice has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/core.test.ts"},"region":{"startLine":2224}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8af6627bc7c0e5642741c882b73b7c525807c2926441f295a441bc7c3b39bb"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function DeviceItem (cyclomatic 11, cognitive 10): DeviceItem has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-devices.tsx"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f25bff303f0d32656e32d1f1d6d5121dd035ebd10a9577ef4638004daee3515"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function partitionHabitReceipt (cyclomatic 11, cognitive 10): partitionHabitReceipt has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93b7dc8128943228c337978f8d9070fe3e85fecfb535ed6497aa32ba9f26381"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function createAutomationTriggerOptions (cyclomatic 11, cognitive 10): createAutomationTriggerOptions has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"beab189b55ec40f4d2e73d38581c301f836ff04a749e2eab87b562fc2286e91a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function parseCameraMetadataItem (cyclomatic 11, cognitive 10): parseCameraMetadataItem has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb21d161034315f50b7d16278272913107c2d58668574c8bdde48f5ef1e6dfd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 10): (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"127a1cd3a3bd0305e9df9eb3b40e1f7ac649cb3fe563aa6db5546b67553501d2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function renderSpeakerCommandBar (cyclomatic 11, cognitive 10): renderSpeakerCommandBar has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf6dea947bcf6ad9025728131e8f791387273bcb0a15056d1c5e45cc0e67e980"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 10): (anonymous) has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/settingsSheet.test.ts"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec3ae35515d8f9a4729c508b716b0924ef9e679225e3677dc05d4186abc13eab"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function invoke (cyclomatic 11, cognitive 10): invoke has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w1PollingLockHa.test.ts"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4371c56799747e05464b7cc4e156ce1b5e80e076047f9bd8e7af4b259642b43"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function makeSensor (cyclomatic 11, cognitive 10): makeSensor has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/tests/w3SafetyHealthAuto.test.ts"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e25aa73f29d7a3c36551f09cae92105a8b4b6f87f6ece3cae24922928207f6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 9): (anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"7023bbcf9253c0bfa24d98d493b7bff9c494a2c8fcc5075c4c059f28f6a30e92"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 9): (anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1165}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea54fc464e26ecde89d2bfaaac1a96338716fd6694f53ff4575d75770256668"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 9): (anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1283}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c8a31f69a418ceda0f6da63f380284025a9b5eb7723f83e5d3bed1e4d8ceec"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 9): (anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"184b958cebaad29e919cc9b418eb332c4d9e5948a35f91683eb66ba58367fb4f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function adjustSelection (cyclomatic 11, cognitive 9): adjustSelection has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df7eab8a3af11bc190ebafa6d026ded6928f3f000311390957ed05f53c74640"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function liveBanner (cyclomatic 11, cognitive 9): liveBanner has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d673530efbf41db649dcc3b36eb919d6ada8a74e76b3477d49c852faa69e7f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function enterWarmStandby (cyclomatic 11, cognitive 9): enterWarmStandby has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f96db68e331f5a3bf1d0f7b11d82dff58e36e1288a141d1f7edfede69d8688e"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/synthesis.ts: 1965 lines of code: windows/src/core/miCloud/synthesis.ts has 1965 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/synthesis.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be4d9992447f9f3561fc522aa033ba3538b48d3739e4dbb14eb70c2c4e1bd5f"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/app.ts: 1679 lines of code: windows/src/ui/app.ts has 1679 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/app.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbaa32961997c7b994b94327ea5ee9e835f334492ff57d9a7022d4122f6e3097"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/activityStackView.ts: 1664 lines of code: windows/src/ui/activityStackView.ts has 1664 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da492efca88400b3cf5de86d20bbb8da89319d1a84fd79de045b5d3ccba4e2f2"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/reconciler.ts: 1619 lines of code: windows/src/ui/reconciler.ts has 1619 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8143c29bb914aa2d6e5787b956fd1c6d91c248ee7db45444d8261b36059594"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/deviceViews.ts: 1551 lines of code: windows/src/ui/deviceViews.ts has 1551 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/deviceViews.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"425f8581004649a4df9c8b580b1f0e266527f64799a0e241752b220914ba91e5"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/automationEngine.ts: 1497 lines of code: windows/src/core/automationEngine.ts has 1497 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e26b6c49e30af024a4c3e72a5b7d8ae936a786491bce2c5699c51e2812f7e810"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/assistant/intent.ts: 1491 lines of code: windows/src/core/assistant/intent.ts has 1491 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/intent.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55779fd1be2862898c5f067bebd64b3b229121e29e792b63ef16050f5a47f4c6"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/models.ts: 1483 lines of code: windows/src/core/models.ts has 1483 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/models.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc99aad30dbf06732d651ffbb0d875d0b225b1046da283882f35ca7d8a59965"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/homeAssistant.ts: 1472 lines of code: windows/src/core/homeAssistant.ts has 1472 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/homeAssistant.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97218260196c590be1ab44e34e1a7f4eded0181155c7a1687f9b0c672facd661"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/automationSettingsView.ts: 1459 lines of code: windows/src/ui/automationSettingsView.ts has 1459 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be9c6030f5f348fda9b76bb5305485c883f05cb663a954474df7230f0005ead"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/bindEvents.ts: 1452 lines of code: windows/src/ui/bindEvents.ts has 1452 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b94f8a81711a619f7315a801bb94134116b08e2c773056b4ae9d438348cd994"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/cameraLive.ts: 1407 lines of code: windows/src/ui/cameraLive.ts has 1407 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8067771641d0dec890bfdf70f5372408d6fa602ac31e7f6bb46090064dfdda"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/appUrlCommand.ts: 1372 lines of code: windows/src/core/appUrlCommand.ts has 1372 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/appUrlCommand.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44197a7100ca976b45d9530430126226a2fcb0e2f7c898d10a36685c896a73b7"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/settingsEvents.ts: 1364 lines of code: windows/src/ui/settingsEvents.ts has 1364 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c025affe683dfc75832dad464a086b3090c66efecf5e7462fb387622dac7ea7f"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/connectionsAndDiagView.ts: 1361 lines of code: windows/src/ui/connectionsAndDiagView.ts has 1361 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a4b720bc03ff5f9b5b252acee30f93709516ae570d7e433b4b6f8de259267f8"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/haDomains.ts: 1355 lines of code: windows/src/core/haDomains.ts has 1355 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c19d4ab122e7822d2e2311bff2bb78d8bdc5e784026798d1f3329545198dd67"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/safetyAndHealth.ts: 1349 lines of code: windows/src/core/safetyAndHealth.ts has 1349 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22edd1354599405445cb2bb43a538b1426c0d4faef9251a8506997e2074608b3"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miAccountsStore.ts: 1325 lines of code: windows/src/core/miAccountsStore.ts has 1325 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5710afef83572840a8c71647d2625193bfacd44be1b8d65969063624fb0f290"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/sensorHistory.ts: 1325 lines of code: windows/src/core/sensorHistory.ts has 1325 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e581a8ca8a7944e27fe8c4659ead8eec8bf816b5b68cfd01be853784de031810"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/detailDrawers.ts: 1242 lines of code: windows/src/ui/detailDrawers.ts has 1242 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90926de5722621442323b437f8b9cd8710cb05d1a53a161b5d84d262b547a8db"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/speechGuard.ts: 1226 lines of code: windows/src/ui/speechGuard.ts has 1226 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be406ece6d501e51849c3ee0c135ebcfa86c8479bfabdd986b5b2b34c095661"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/cloudRefresh.ts: 1209 lines of code: windows/src/ui/cloudRefresh.ts has 1209 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"401c7cba6e6f6e2a9c12752b6c565cf9384922b49435f45f7fb7f323b16bc3e9"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/diagnosticsAndScanner.ts: 1156 lines of code: windows/src/core/diagnosticsAndScanner.ts has 1156 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3353ea360eee5cc03f1ce6934fe2668152640f9a10ea94e4de1b9f15920abbf8"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/commandDispatch.ts: 1123 lines of code: windows/src/ui/commandDispatch.ts has 1123 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c2feb24c3b30046ee6dc88285ea5c79bd4ae9dc33af6806c2aa1e84201ace8"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/assistant/habits.ts: 1091 lines of code: windows/src/core/assistant/habits.ts has 1091 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5a739bb35b4b5b43769c38832e31863707acd7456596b7998b22cbcd3f6c491"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/dualSourceProvider.ts: 1076 lines of code: windows/src/core/dualSourceProvider.ts has 1076 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"696412e5fbec14a3db60aaeec52523f1169b229dcf5db39a421c8d5c742a037a"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/appLifecycle.ts: 1043 lines of code: windows/src/ui/appLifecycle.ts has 1043 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa79fc890e8b098532634fe8a286344d48ce0089c73d344e6403a0b85ba861eb"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/settingsViews.ts: 1008 lines of code: windows/src/ui/settingsViews.ts has 1008 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsViews.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c04bd0b10b1b92e133a44d1cde40925a01bc0b1f26ae9c83d78c58f78ac3befc"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/optimisticLock.ts: 989 lines of code: windows/src/core/optimisticLock.ts has 989 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"839f29da7dce3eefd8e0e80acc38726f701cb12374f6a73f04764d26025846a7"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/sensorHistoryView.ts: 970 lines of code: windows/src/ui/sensorHistoryView.ts has 970 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/sensorHistoryView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"69bf0ed035eb3c68db9b85c731f6d2aa49448da55769666c75511f5e5b32fc33"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/i18n.ts: 927 lines of code: windows/src/core/i18n.ts has 927 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/i18n.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76ff5d010685aa9bdc4c83d6f6952b75437e484419b77142a1786904bf2e672"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/intentExecution.ts: 915 lines of code: windows/src/ui/intentExecution.ts has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d62e02707145e859d0cdd18c896647f07c4d0ba7a17f137029ad8406c04dd2"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/onboardingGuide.ts: 849 lines of code: windows/src/ui/onboardingGuide.ts has 849 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44723ccbc7d45ed7783b3301b0deb06407c65aff7a40ce99a3ec4125669eca1"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/settingsSearch.ts: 842 lines of code: windows/src/ui/settingsSearch.ts has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsSearch.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a39c323f25b50da0c8ce60b0f5c1ff997f1219303bd046bd30fa16e56e84ff6"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/assistant/modelIntentResolver.ts: 750 lines of code: windows/src/core/assistant/modelIntentResolver.ts has 750 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8334d4682530c36d18ffa3f659b140eedce86cba815fcd78800a608b5f6151b"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/client.ts: 687 lines of code: windows/src/core/miCloud/client.ts has 687 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbacb10e1a4e7b090c07375f2f5b807907752707c876fa90c076913080c15da9"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/raycastSnapshot.ts: 681 lines of code: windows/src/core/raycastSnapshot.ts has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/raycastSnapshot.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eabf3089d9ebf8e5095b15f3392d070e4c2528ac72581eecdd82042c8a535b5"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/panelPrefs.ts: 674 lines of code: windows/src/ui/panelPrefs.ts has 674 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeb570d224ac3870ca934083f93ac9008450df99cf16f593bb9ac891c4b305d4"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/energySettingsView.ts: 667 lines of code: windows/src/ui/energySettingsView.ts has 667 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de7ccf8bb2f50b11925a60529802ec5e6d86f5ddcfa3c1161dbe4f519fe87e1e"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/energyHistory.ts: 662 lines of code: windows/src/core/energyHistory.ts has 662 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"652767966a8b765971e0954feb06932a370789e32e28903257711e8fb122641f"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/roomOrderEditor.ts: 632 lines of code: windows/src/ui/roomOrderEditor.ts has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/roomOrderEditor.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a66fe10cd6b4c0a4cb0e8e2a1e8ceac3b8ff286a06c00b34ca44b8de689ae809"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/command.ts: 605 lines of code: windows/src/core/miCloud/command.ts has 605 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"943148e766aa9ee5bf30c9f2739edbcf40cd63d55b7ff8038bd70377925edb6b"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/panelView.ts: 590 lines of code: windows/src/ui/panelView.ts has 590 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelView.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f270d6a28f2e4ada95d47c204bbd0914ceb5ff18b61c9c2b6c5a90ac40a8431b"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/facets.ts: 545 lines of code: windows/src/core/miCloud/facets.ts has 545 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"470d373b3a4d2bc4b2fdde9ab55a6cb1b0a2ea13a556759eaad1027a9d81f181"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/cameraHubs.ts: 534 lines of code: windows/src/core/miCloud/cameraHubs.ts has 534 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa6df9bf281f00abd1b029fed8c7d91e70de19cac02d8920b03e2d550242f596"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/assistant/actionPolicy.ts: 505 lines of code: windows/src/core/assistant/actionPolicy.ts has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bb30670d1bfe28862a6decb3c5453e3a618676d32d122d301a98368f349608"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/commandEffects.ts: 499 lines of code: windows/src/core/commandEffects.ts has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f5c4dcd5e0c2d2a918a5dfb7a1e62c9d164780f78c576e766faa8653320d551"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/assistant/promptContext.ts: 493 lines of code: windows/src/core/assistant/promptContext.ts has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/promptContext.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05e69fdb79cfb9813fe79ca126d48c674c4a2b88373125b49960b89d0ace9b2"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/secureStore.ts: 487 lines of code: windows/src/core/secureStore.ts has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa91a378cf715a9fc772e400057ca3987aae937bf824e582c5d89410318e374"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/panelKeyboard.ts: 468 lines of code: windows/src/ui/panelKeyboard.ts has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelKeyboard.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e30107920989510322fea566f1c6a9c0798604046376c625449d5106d95e04b"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/controlFailure.ts: 446 lines of code: windows/src/core/controlFailure.ts has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/controlFailure.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38fa609e6b86281f6d4929da17843451ee0da666aca5dfa2628b32216bf35a59"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/naturalCommand.ts: 433 lines of code: windows/src/ui/naturalCommand.ts has 433 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7fc10892c535e5fb742f49387aa8b2ad274090f3f74d1a66a19812f1cffe0a"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/ui/demo.ts: 408 lines of code: windows/src/ui/demo.ts has 408 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/demo.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0667349f68ae35dde779e77af842f09d8308476e1885259e436fb34a82cd117"}},{"ruleId":"R3","level":"warning","message":{"text":"windows/src/core/miCloud/spec.ts: 406 lines of code: windows/src/core/miCloud/spec.ts has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/spec.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"189fae48ad64b2a68310d15607e9e7e5924fd71c59554f2dad86e226c8958752"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-devices.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd8d090676a4eaad376662e6275ba386d07976a99a771dd51b183080f7166384"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/snapshot.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b070730194ed18a18425a45811203604bb664f3acd1a13f611f80efff802d906"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-scenes.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50003dd0e36d5f392f6f682aa10c83c3dc2ef529face42b4593f8a17f8e9604"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/url.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d772bd86791ca4b920e8a1f3aeed8f39a8b24e1936a8334fc6143a86bdbb715"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/ask.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd96722aa46defaef5b520055df3a29f4451b2617e69085b6c78add5b50cec69"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/test-file.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac413f431bcf9b30f92f9a4960acc25735f89d78d9e42b90b25cf6bb106c18f"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~234 LoC): no import path from any entry point (39 application, 3 tooling, 64 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-devices.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8c4ac0040b085348db5306e71bf8e4ab61c6e87a991f35fd73dcd12ac796681"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~99 LoC): no import path from any entry point (39 application, 3 tooling, 64 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/search-scenes.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e49851e2d42b23d58eee7fc628bf3f895ba9d6d0919730dd294a02ae7653b694"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~83 LoC): no import path from any entry point (39 application, 3 tooling, 64 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (raycast/src/ask.tsx, raycast/src/search-devices.tsx, raycast/src/search-scenes.tsx) \u2014 every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/url.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5023f0f1ee4b6c4d296b8b871b61275f82bb56ac6b8b764fd8bdd0986354fa21"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~38 LoC): no import path from any entry point (39 application, 3 tooling, 64 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/ask.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f5ea3efe5045b8ef3cca11f75d836d80ff19883d373a88b1f8b03fbbd2cb9c2"}},{"ruleId":"R7","level":"note","message":{"text":"Unused export \u0027HABIT_SEQUENCE_WINDOW_MS\u0027: Nothing ultimately consumes this binding: its only referrer is the re-export in windows/src/core/assistant.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change \u2014 drop the re-export line in windows/src/core/assistant.ts in the same commit, or the barrel will import a name that no longer exists."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/habits.ts"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a13f46f767c7f2446c2c580a3c12566ad6caba03b7a4c753ee99663332d055"}},{"ruleId":"R7","level":"note","message":{"text":"Unused export \u0027claimDoorbellWindowForUser\u0027: Nothing imports this binding \u2014 it is safe to review for removal."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"d966fa39b50da27f37edcbf5caef758da19b04abe631c9128fd9d1ae19c46249"}},{"ruleId":"R7","level":"note","message":{"text":"Unused export \u0027renderUnifiedUpperStack\u0027: Nothing imports this binding \u2014 it is safe to review for removal."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"f40d20b6767b08030163161eb15556d78954fb3e6b522dca9945a17c23a09d32"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (2 files): windows/src/core/miCloud/facets.ts \u2192 windows/src/core/miCloud/feedAction.ts \u2192 windows/src/core/miCloud/facets.ts"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/facets.ts"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e065a56a42195cb15997f32320f857650e2ed2b9d73bfe389422cb412e4da6a"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (2 files): windows/src/ui/activityStackView.ts \u2192 windows/src/ui/automationSettingsView.ts \u2192 windows/src/ui/activityStackView.ts (one verified cycle inside a mutually-dependent group of 12 files)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab12b1c1365ab2155469b6f94621c6b54f9372a98a9e65761c5fb0bdcff8c04"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (3 files): windows/src/ui/appLifecycle.ts \u2192 windows/src/ui/panelKeyboard.ts \u2192 windows/src/ui/settingsEvents.ts \u2192 windows/src/ui/appLifecycle.ts (one verified cycle inside a mutually-dependent group of 4 files)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb4e290437866b835b4fffee80011fc31ec221d626ec605ba91a6a739f8fc6e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!Number.isInteger(value) || value \u003C 0 || value \u003E 255\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/cameraHubs.ts, windows/src/core/miCloud/client.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7fc3a6781991bcde70d12d332bfcd5425b20fb501973ac4861d9987c752efbb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!dual \u0026\u0026 host.settings.connectionMode === \u0022homeAssistant\u0022 \u0026\u0026 Boolean(host.haConnectionError)\u0060 appears character-identically in 2 files \u2014 windows/src/ui/energySettingsView.ts, windows/src/ui/sensorHistoryView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"408881e6a7580f15793271da72610b17fd39624aeb62e39613c5a3266378ebff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!dual \u0026\u0026 host.settings.connectionMode === \u0022xiaomiCloud\u0022 \u0026\u0026 Boolean(host.miSessionExpired)\u0060 appears character-identically in 2 files \u2014 windows/src/ui/energySettingsView.ts, windows/src/ui/sensorHistoryView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/energySettingsView.ts"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fd5ccc094be020924849a64df8876eb5af4a5b1317434f3f467b2db139f8a51"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!item || typeof item !== \u0022object\u0022 || Array.isArray(item)\u0060 appears character-identically in 2 files \u2014 windows/src/core/diagnosticsAndScanner.ts, windows/src/core/miAccountsStore.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"092e3618cea3a7577355c1c8d184a2717730bc4ef72522eecc7ed3a8b6bb62da"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!parsed || typeof parsed !== \u0022object\u0022 || Array.isArray(parsed)\u0060 appears character-identically in 4 files \u2014 windows/src/core/dualSourceProvider.ts, windows/src/core/miAccountsStore.ts, windows/src/core/pollingPolicy.ts, windows/src/ui/automationSettingsView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb33a81ac10a0ad41f835ad77ebd728d28ec9d524cb7ef93667ecdc1db9e4c2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!raw || typeof raw !== \u0022object\u0022 || Array.isArray(raw)\u0060 appears character-identically in 2 files \u2014 windows/src/core/automationEngine.ts, windows/src/core/cameraQuality.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"905091b32f97de0eed21d51471b94a2827868ffca14ddf8af7baf324f2fb8f98"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!seen.has(r.did) \u0026\u0026 (seen.add(r.did), true)\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/cameraHubs.ts, windows/src/core/miCloud/client.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd37062bb8c441fa505bb58306e6033468d0f8928fc0d222960ca60c927735e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!trimmed || (originalName !== undefined \u0026\u0026 trimmed === originalName.trim())\u0060 appears character-identically in 2 files \u2014 windows/src/ui/panelPrefs.ts, windows/src/ui/roomOrderEditor.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/panelPrefs.ts"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc547c69215c5748d8eb5bbb701d8486f1b76280b57e2c4fbbc2d7d58829ad6d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!value || typeof value !== \u0022object\u0022 || Array.isArray(value)\u0060 appears character-identically in 3 files \u2014 windows/src/core/haDomains.ts, windows/src/core/miAccountsStore.ts, windows/src/core/secureStore.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec16470af8733e56a99dc17e426455bf5a701a465b57243ae079d5c723128580"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(k.kind === \u0022speaker\u0022 || k.kind === \u0022tv\u0022) \u0026\u0026 k.mediaEntityId === command.entityId\u0060 appears character-identically in 2 files \u2014 windows/src/core/commandEffects.ts, windows/src/core/optimisticLock.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/commandEffects.ts"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"94606a13407b11e8b1382eda2537cc02f3ba2419861a44cef9a61e86dbfdc621"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060claim === undefined || ownsDeviceWrite(host, claim)\u0060 appears character-identically in 2 files \u2014 windows/src/core/optimisticLock.ts, windows/src/ui/intentExecution.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca6bff09e94ad8378e8a5f15c599a918d6052d01a1b95ff1b0fd150af760236"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060endpoint \u0026\u0026 !/^[a-zA-Z][a-zA-Z0-9\u002B.-]*:\\/\\//.test(endpoint)\u0060 appears character-identically in 2 files \u2014 windows/src/ui/onboardingGuide.ts, windows/src/ui/settingsEvents.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ea4bbea8c78f147638e3bf2b33f6084f5ee537fb5f577535aa8b9f9bed1746"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060endpoint \u0026\u0026 host.settings.assistantCustomKeyEndpoint === endpoint\u0060 appears character-identically in 2 files \u2014 windows/src/ui/onboardingGuide.ts, windows/src/ui/settingsEvents.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"7529da633c1ca9b5fb9715aa26340919404a054e298ec922455a45dbe21d8724"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060err instanceof MiCloudError \u0026\u0026 err.kind === \u0022sessionExpired\u0022\u0060 appears character-identically in 3 files \u2014 windows/src/core/miCloud/client.ts, windows/src/core/miCloud/discovery.ts, windows/src/ui/cloudRefresh.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/client.ts"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ac42b756303dae0cfe33f0af8b6040ff162a0383add10f1b788b9db082818c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error instanceof Error \u0026\u0026 error.message.trim()\u0060 appears character-identically in 3 files \u2014 windows/src/ui/appLifecycle.ts, windows/src/ui/connectionsAndDiagView.ts, windows/src/ui/settingsEvents.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75fcf1a8c13c5bc6c423247d809d43758730981b3ebefa657a2e9b9a175f594"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060health.kind === \u0022offline\u0022 \u0026\u0026 health.recovery === \u0022qr\u0022\u0060 appears character-identically in 2 files \u2014 windows/src/ui/cloudRefresh.ts, windows/src/ui/panelView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e35bf70fefeb750c85fbaf9597e74909afcdc42ad55d6aac338c11d643991e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.cameraLive.activeLiveCameraId !== null \u0026\u0026 !host.cameraLive.liveCameraHidden\u0060 appears character-identically in 3 files \u2014 windows/src/ui/appLifecycle.ts, windows/src/ui/panelKeyboard.ts, windows/src/ui/reconciler.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ce29c8b4809c5210725a4c2d2a030dd9b2bdfb8615a66d40bd4e94df02db0a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.cameraLive.activeLiveCameraId !== null || host.cameraLive.liveCameraKeepAliveTimer !== null\u0060 appears character-identically in 3 files \u2014 windows/src/ui/appLifecycle.ts, windows/src/ui/onboardingGuide.ts, windows/src/ui/settingsEvents.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef0bd769d2b6ebc5ee2ffe05f45671172689028275194362a9b89594c0c8768"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.ctxMenu !== null || host.isHomeMenuOpen\u0060 appears character-identically in 2 files \u2014 windows/src/ui/appLifecycle.ts, windows/src/ui/panelKeyboard.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e622bae331a2f35760c7dbad16ea92daa4a5f1f06bbedc8bf05334d357ef3d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.isSyncingCloud === true \u0026\u0026 busyRetriesLeft \u003E 0\u0060 appears character-identically in 2 files \u2014 windows/src/core/optimisticLock.ts, windows/src/ui/commandDispatch.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"147f536213237e7e4dfec0b6067f2bc4f359eedacbf04d07040f7c5a3768b208"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.replyBanner !== prevBanner \u0026\u0026 host.replyBanner?.isError\u0060 appears character-identically in 2 files \u2014 windows/src/core/optimisticLock.ts, windows/src/ui/intentExecution.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"990f02d66a0ddaccba19ea24ca24d4b0ee9f779ea964cdaadb9b16706a20785d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.settings.assistantBaseURL.trim() || \u0022https://openrouter.ai/api/v1\u0022\u0060 appears character-identically in 2 files \u2014 windows/src/ui/naturalCommand.ts, windows/src/ui/proactive.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/naturalCommand.ts"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bac94c6d0d436416767ef27bd066fdc285e616894598c12a4f8803cf34ff0e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.settings.connectionMode === \u0022xiaomiCloud\u0022 \u0026\u0026 host.settings.miSession\u0060 appears character-identically in 2 files \u2014 windows/src/ui/appLifecycle.ts, windows/src/ui/speechGuard.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"dccb8b132e01b2522f15a87d0966ddcd13c05e84f2d42e5845999dac712a6772"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host.settings.haBaseURL \u0026\u0026 host.settings.haToken\u0060 appears character-identically in 2 files \u2014 windows/src/ui/onboardingGuide.ts, windows/src/ui/settingsEvents.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"382dd93316586722894afb3fb0d6114a0449f66d4d241fbdbd775ed11c8d5fad"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060miotShortName(p.type) === \u0022on\u0022 \u0026\u0026 p.access.includes(\u0022write\u0022)\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/command.ts, windows/src/core/miCloud/synthesis.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb4f08ace43749c8c61d2b7a4ace929254e045a1b4ea143a8ae38e77839c48a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060obj[\u0022has_more\u0022] !== true || !next || next === startDid\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/cameraHubs.ts, windows/src/core/miCloud/client.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da4a406a491b9dc7b3eb60e8835d8ad752bf00970ba4cdb8c3fabd2630e3d19"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060ownerWin !== null \u0026\u0026 typeof ownerWin.setTimeout === \u0022function\u0022 \u0026\u0026 typeof ownerWin.clearTimeout === \u0022function\u0022\u0060 appears character-identically in 2 files \u2014 windows/src/core/optimisticLock.ts, windows/src/ui/commandDispatch.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7f2d195214e428371151a92e7564913b76a358f2106473095d0fa70fe420dee"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060prop.valueList \u0026\u0026 prop.valueList.length \u003E 0\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/command.ts, windows/src/core/miCloud/speakerActions.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0eb98f1ef74cfa445ab6563f98dfafafbba7e679738925b053067c41ec4eb4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060prop.valueRange \u0026\u0026 prop.valueRange.length \u003E= 2\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/command.ts, windows/src/core/miCloud/speakerActions.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4311a2fee0201c0f16cf5cc908bb16aecdeee4dcd68fad77cdfe4feaba76bb8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rawStep !== undefined \u0026\u0026 Number.isFinite(rawStep) \u0026\u0026 rawStep \u003E 0\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/command.ts, windows/src/core/miCloud/facets.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/command.ts"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a670c81949556a26c7eeb05e3fcef881b5686d982e67c4b0cfe57306b89c62"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rec[\u0022disabled_by\u0022] != null || rec[\u0022hidden_by\u0022] != null\u0060 appears character-identically in 2 files \u2014 windows/src/core/diagnosticsAndScanner.ts, windows/src/core/dualSourceProvider.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a247aad722f3d10e5164226cfc743ea43b027d235627c24d859b04590ea446"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rec[\u0022extra\u0022] \u0026\u0026 typeof rec[\u0022extra\u0022] === \u0022object\u0022\u0060 appears character-identically in 2 files \u2014 windows/src/core/miCloud/cameraHubs.ts, windows/src/core/miCloud/client.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miCloud/cameraHubs.ts"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ab222b60c822744d400722767196e99db1617145819c05ea4293bbb3a1dba9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trigger === \u0022wifiNetworkJoined\u0022 || trigger === \u0022wifiNetworkLeft\u0022\u0060 appears character-identically in 2 files \u2014 windows/src/core/automationEngine.ts, windows/src/ui/automationSettingsView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad2efa953382f2fcb460ee19b0736a2c976b08ea10e28e44698c86d12758e7b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmedName === dev.name \u0026\u0026 effectiveRoom === dev.roomName\u0060 appears character-identically in 2 files \u2014 windows/src/ui/automationSettingsView.ts, windows/src/ui/energySettingsView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b633141fab6e92764d471deb597dccf5c5c3d31faa1e7ca3ef0236e5dc81813"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof CSS !== \u0022undefined\u0022 \u0026\u0026 typeof CSS.escape === \u0022function\u0022\u0060 appears character-identically in 3 files \u2014 windows/src/ui/detailDrawers.ts, windows/src/ui/roomOrderEditor.ts, windows/src/ui/speechGuard.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4f7c01a4d5feb2f775ecf082e1421911f4199bc7011c9eec5e73142eedfc28"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof globalThis.localStorage !== \u0022undefined\u0022 \u0026\u0026 globalThis.localStorage !== null\u0060 appears character-identically in 2 files \u2014 windows/src/core/safetyAndHealth.ts, windows/src/core/sensorHistory.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d2eab7724c8b192375d57218c6b720b7bc0fa8ecbdc3b982538ebdee494cc1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof raw === \u0022string\u0022 \u0026\u0026 raw.trim() !== \u0022\u0022\u0060 appears character-identically in 3 files \u2014 windows/src/core/assistant/actionPolicy.ts, windows/src/core/sensorHistory.ts, windows/src/ui/onboardingGuide.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f2d047c93b15bb614045f35e0d0f36b503ddcbeb7197a2f4639a63b2cf34757"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof session.expiresAt === \u0022number\u0022 \u0026\u0026 Number.isFinite(session.expiresAt)\u0060 appears character-identically in 2 files \u2014 windows/src/core/miAccountsStore.ts, windows/src/core/secureStore.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc048dcca42a694518bfd3f61b33f21345fecd8b8f0163ff97c67eebfca5a19"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof v === \u0022number\u0022 \u0026\u0026 Number.isFinite(v)\u0060 appears character-identically in 4 files \u2014 windows/src/core/automationEngine.ts, windows/src/core/miCloud/session.ts, windows/src/core/miCloud/spec.ts, windows/src/core/safetyAndHealth.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"6230d0db5f3de94357f3c97dfbf0f67a9327ab0011d2e9f2886cd9548ddce135"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value !== \u0022number\u0022 || !Number.isFinite(value)\u0060 appears character-identically in 2 files \u2014 windows/src/core/haDomains.ts, windows/src/ui/panelPrefs.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/haDomains.ts"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"84875f1ae4225c60f7eab790098071a39f7e462389e60e9be1f32276f422da5d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value === \u0022number\u0022 \u0026\u0026 Number.isFinite(value)\u0060 appears character-identically in 2 files \u2014 windows/src/core/automationEngine.ts, windows/src/core/scheduledCommands.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b34aabec3ac15e4872b5e02997ecc62b98f7f4f30e6b88c8004866f849aebf9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value === \u0022object\u0022 \u0026\u0026 value !== null \u0026\u0026 !Array.isArray(value)\u0060 appears character-identically in 2 files \u2014 windows/src/core/assistant/modelIntentResolver.ts, windows/src/core/scheduledCommands.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f492de2dd5ab4ad9fc6294ce38d45b2b35baae754d7f847510b2335a9085bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof window !== \u0022undefined\u0022 \u0026\u0026 Array.isArray(window.navigator?.languages)\u0060 appears character-identically in 2 files \u2014 windows/src/ui/automationSettingsView.ts, windows/src/ui/connectionsAndDiagView.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"556cc612e5b51eb571bb272899bbe107c2c76aec49cf358a5c6aef80df6b4aaa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value === null || !Number.isFinite(value)\u0060 appears character-identically in 2 files \u2014 windows/src/core/assistant/actionPolicy.ts, windows/src/ui/proactive.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/actionPolicy.ts"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a624a829104e88a1b1c164f3e7852ebaf5f89c88db1dcef0e631662d1e0edce"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060raw.is_empty() || raw.contains(\u0027\u0022\u0027) || raw.contains(\u0027\\0\u0027) || raw.contains(\u0027\\r\u0027) || raw.contains(\u0027\\n\u0027)\u0060 appears character-identically in 2 files \u2014 windows/src-tauri/src/companion.rs, windows/src-tauri/src/desktop_shell.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3d0fc6209a21f871a737396934bad9944196d48e373b2f5f1df16e44a7aebb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!isEditingLayout \u0026\u0026 store.expandedDeviceId == dev.id\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift, Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"057b474f3d5f290ec18459047349c3ab86ec5da7a8f70bf8056a2f2758b4aa28"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!valuesAreStale \u0026\u0026 device.isOnline \u0026\u0026 spec.isOn \u0026\u0026 spec.hvacMode != \u0022off\u0022\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift, Sources/MenuBarMijiaApp/ClimatePanelModule.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef771d37d33ca9ba245814bac99de5e8cfdd763bce3b3879f9fe4412f9165e8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.hasPrefix(\u0022group.\u0022) \u0026\u0026 seen.insert($0).inserted\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/MiCloud/MiCloudClient.swift, Sources/MijiaCore/MiCloud/MiCloudProvider.swift. 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":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"e824f9a822b134f8be372536976c0c9eb4c4dc2d3e2c16b8d31a8545b7cabda6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.id == $1.id \u0026\u0026 $0.session == $1.session\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/HomeStore\u002BBackend.swift, Sources/MijiaCore/MiCloud/MiAccountsProvider.swift. 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":"Sources/MijiaCore/HomeStore\u002BBackend.swift"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"944a51932019b946d47b9a0b45a121d4aa3e75e9b76e4e6178d6f69a68923b83"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(isSearchFieldFocused || isDrawerHovered) \u0026\u0026 !search.isSearching \u0026\u0026 !speech.isListening\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift, Sources/MenuBarMijiaApp/ControlCenterPanel.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3ebd3b51a0890ffafa0185e0c47e2f113c9114013bd2ecb80ca51ada3a8feb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060abs(translation) \u003E width * dismissDistanceFraction || abs(predictedTranslation) \u003E width * dismissDistanceFraction || abs(velocity) \u003E dismiss\u2026\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift, Sources/MenuBarMijiaApp/StackedCardGeometry.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicStackedCardGeometry.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2978b0a4f2bc836660df247bab140fe3353d4be5b81164ea32fc509c7bc807"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060configuration.isPressed \u0026\u0026 !reduceMotion\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift, Sources/MenuBarMijiaApp/ThemeAndMotion.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5353d90532e5b9cf70a13ccb09680953f521836c30078212423642634b9a2f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060context.systemActive \u0026\u0026 !pollingContext.systemActive\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/MiCloud/MiAccountsProvider.swift, Sources/MijiaCore/MiCloud/MiCloudProvider.swift. 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":"Sources/MijiaCore/MiCloud/MiAccountsProvider.swift"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e0ac5be534071e1fc2b4e1ffc67eb0a77780b45a9bf0264da77a8fa1103636"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060exit == .commit \u0026\u0026 draft?.hasChanges != true \u0026\u0026 kindDraft?.hasChanges != true\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift, Sources/MenuBarMijiaApp/ControlCenterPanelLayout.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelLayout.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6d871686a45b74320927595f907adab00b04140c2586b29c33bcad1d6653f2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060forceExpanded || (!isEditingLayout \u0026\u0026 store.expandedDeviceId == device.id)\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift, Sources/MenuBarMijiaApp/ClimatePanelModule.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97d4de4a8aaccadf6b2874a220c8b0bacc9fdce4dbd5d6b82ec9ef985a1b590"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060instance.locationName.isEmpty || instance.locationName == \u0022Home Assistant\u0022\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift, Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f11038b24d412dd990edbac3e030f21b9df8fa03a85465d6800813143ad5f7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isHovered || isLatest || selectedWindow == .last7Days || observed.count \u003C= 8\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift, Sources/MenuBarMijiaApp/SensorCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"19bcb99a68652d14d8e304bc113cb998bcc76ded0510e2d51646fd1cfdb1fd10"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060model == \u0022hyperDLNA\u0022 || model.hasPrefix(\u0022Apple TV\u0022) || model.hasPrefix(\u0022lumi.gateway\u0022)\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/DeviceSynthesizer.swift, Sources/MijiaCore/UnsupportedDeviceCollector.swift. 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":"Sources/MijiaCore/DeviceSynthesizer.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"1380ff084d272bb2381d9145477da500125384ff557067f72a2d82dd6a400f08"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060quickIndex != nil \u0026\u0026 (store.isOptionKeyPressed || store.focusedDeviceId != nil)\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1e61e6609ad06378600dc40bc105dd0f337c9b3414ce3b40cea45b5fec6f43"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060reduceTransparency || contrast == .increased\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift, Sources/MenuBarMijiaApp/ThemeAndMotion.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicThemeAndMotion.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"7377602d4b6efd836dc5e831dab9d81e80991f932d207738bcfa1abda0c1cb90"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060responder is NSTextView || responder is NSTextField\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/ControlCenterPanel.swift, Sources/MenuBarMijiaApp/HotkeyAndNotificationManager.swift. 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":"Sources/MenuBarMijiaApp/ControlCenterPanel.swift"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"156f6aa5ad855361dbc545ac813bbd0e1bb609a5de6f3853168a5cdaa0f9d5da"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.isOn \u0026\u0026 s.hvacMode != \u0022off\u0022 \u0026\u0026 s.powerWritable\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/HomeStore\u002BUndo.swift, Sources/MijiaCore/RaycastSnapshot.swift. 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":"Sources/MijiaCore/HomeStore\u002BUndo.swift"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7f67973f46f68956b518be1e23371c9cee64acafa82ee4db423334ad3c7d6e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.state != \u0022off\u0022 \u0026\u0026 s.state != \u0022standby\u0022\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/HomeStore\u002BAssistant.swift, Sources/MijiaCore/Models.swift. 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":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdaf4556bf44dc89a2d6311822190b86d159df08b012e149e2fe26664f041e4e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.state == \u0022off\u0022 || s.state == \u0022standby\u0022\u0060 appears character-identically in 3 files \u2014 Sources/MijiaCore/CommandIntent.swift, Sources/MijiaCore/HomeStore\u002BControls.swift, Sources/MijiaCore/SmartDevice\u002BPresentation.swift. 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":"Sources/MijiaCore/CommandIntent.swift"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"562afa5d8671bbce1c3db1aac7e99db9087053c48ad19c37c74542648f0a9e0c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.directiveNotifyEntityId != nil || spec.ttsNotifyEntityId != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8f63ed869c81d482a157ade52ff45b7ce230e1f182f305c873bd16951c03a2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.freezerTargetEntityId != nil \u0026\u0026 spec.freezerTargetPresent\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"b084dfba80200f9ae150dce797e1c30ef9a3acf522aef46c3e41f3eb3879b7d3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.fridgeTargetEntityId != nil \u0026\u0026 spec.fridgeTargetPresent\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddaf330c07b5b0e8235f9870daaab791d76901019b526b98c0bbe92d9bd87822"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.playMusicButtonId != nil || spec.stopAlarmButtonId != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":1299}}}],"partialFingerprints":{"codehealthFindingId/v1":"1774408c92f5409cf06eb52cc74da7eb2c46d8a4ac4c2a97b8d8f92400b27113"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.pm25Density != nil || spec.airQuality != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c18fe040e3456f415658c13d3dd1cd53cf00ba1229483dc90737122c0726c67"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.pm25Density != nil || spec.airQuality != nil || spec.temperature != nil || spec.humidity != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebfb12b7ffe17324a1dd21cb1eec01bdc855a8fdd543979bd478fa1470c1a5b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.pm25Density != nil || spec.airQuality != nil || spec.temperature != nil || spec.humidity != nil || spec.filterLifePercent != nil\u0060 appears character-identically in 3 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift, Sources/MijiaCore/Models.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d789670b00a588f577832069bb98f6cf6ffb166d2eb2d569c2afaa23052896b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.powerWritable || hasAuxiliaryControls\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift, Sources/MenuBarMijiaApp/ClimatePanelModule.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8220388794cde10b5edef00fd915cb8063410da22cdc733c0467a900487dda3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.speedWritable \u0026\u0026 spec.percentage != nil\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/DeviceDeduplicator.swift, Sources/MijiaCore/Models.swift. 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":"Sources/MijiaCore/DeviceDeduplicator.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9eaebe3a7bfdd77579e79ac355350042c0596316475cada6544078054da04b7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.startAction != nil || spec.pauseAction != nil || spec.stopAction != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift, Sources/MijiaCore/DeviceDeduplicator.swift. 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":"Sources/MenuBarMijiaApp/ApplianceDetailDrawer.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b9df22e7f537f3f4a2b17ea7b174c511c68a747c47ebfe342fae54e06c7777"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.temperature != nil || spec.humidity != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3548dc7c8fb05b288e2337f53bb0edb14314f68ebb66ebcc7362179b2a88319"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.temperature == nil \u0026\u0026 spec.humidity != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift, Sources/MenuBarMijiaApp/SensorCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicSensorCardView.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c1a9fe9195ee2e77847f7802e5fd34da10b7b6d4ffd0d7f3e7e4fb7b1a5cf6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060spec.temperatureWritable || !modes.isEmpty || !spec.availableFanModes.isEmpty || !spec.availableSwingModes.isEmpty || !facets.isEmpty\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift, Sources/MenuBarMijiaApp/ClimatePanelModule.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicClimatePanelModule.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"cabdb73d4998d2a253dca2aa23e6b69de5a567e6bf87fd3ca554a2b07f914c17"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060store.connectedBackends.contains(.homeAssistant) \u0026\u0026 store.connectedBackends.contains(.xiaomiCloud)\u0060 appears character-identically in 3 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift, Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift, Sources/MenuBarMijiaApp/MenuBarMijiaApp.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"e588f17d5b064da382e5d517278f1757870f1c2cfa715727749234e652bd5d62"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060store.hasReceivedInitialSnapshot \u0026\u0026 store.devices.isEmpty\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift, Sources/MenuBarMijiaApp/ControlCenterPanelChrome.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanelChrome.swift"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"6018593a0d3c0de5a362fced0d3724bc9100e2a9025ecf2c872ecc56d856a6bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060store.isShowingAssistantBar || speech.errorMessage != nil\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift, Sources/MenuBarMijiaApp/ControlCenterPanel.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicControlCenterPanel.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f8975de7f5fbff4cc013791a846089894a4ea1590ff84d3b4a6738a2fe8af1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060subtitle == off || subtitle == on || subtitle.isEmpty\u0060 appears character-identically in 2 files \u2014 Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift, Sources/MenuBarMijiaApp/DeviceCardView.swift. 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":"Sources/MenuBarMijiaApp/Classic/ClassicDeviceCardView.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d3830806219e40c40ca3792f747e3aa83c4e5b1ee230e11761bb39c1c72c2c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.lowercased().hasPrefix(\u0022http://\u0022) || trimmed.lowercased().hasPrefix(\u0022https://\u0022)\u0060 appears character-identically in 2 files \u2014 Sources/MijiaCore/HomeProvider.swift, Sources/MijiaCore/MiCloud/MiCloudProvider.swift. 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":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cde5cdca82b68fe2f3221d8fe6d22e75537e3c8e2ebe8b4ed748a7109b952fc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5260b760d069365caed19a8c1b18c8be152f2b02553a3fe07c03a9b684acc8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e9f292d1a331f0fe0ccc78f6a028733be0c3f4f94be04a2397d3f954010d2a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1624}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc3df30c4c0d2e0bdc21f11de56a074e007b31f4bc9632783f8887435391aac"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/activityStackView.ts"},"region":{"startLine":1660}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cc9c051281019138e72354f315eba3a4a0754d6ad3678ec403d6f609b6323db"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea47cff3fefbd906de5913a95adc9d7f1bd5ee69b3973a2d01e667b5b0ed721b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f5c9cc53960e60ba9848d7f2fa71156d243075d58d82482f77d81a82717a9fc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7821923629d5f5d064a3499844181afb7d54de40973cbc2551acc4816e94283"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ce8bb0e54c4a4f6b9cc3196fee0b5ad20313b6d839b4785cfd02cbcb8fe2cb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/appLifecycle.ts"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b4de4f10b131f90c9a08d3b3e31c7f6a2cbc7b15f1bbc1337da473942859c7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9f688cafb281cae487808fee8470099ec8b43fdabcae8773db6d5968252e58"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/automationSettingsView.ts"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c96800d97f1e721c338a12966d92c9480a759023959d853cb7c9b6e472c2cb7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/bindEvents.ts"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"45946ac0df2f72bcd3902974775a0684d2959eae8b23fd051ff769e1c393bd83"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef49be9c6fad9bccd3ff7f850c667c373e72e7459c2c9c59af092d1f680c0217"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9c873f120aeb74a6856768066b5e329f3fa486241bd5e8d1e72e9ca1a929e6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1363}}}],"partialFingerprints":{"codehealthFindingId/v1":"70980b864dfbb66d4fc66791b4d5d0f12c18345f587897f61212a62362d31266"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1d491ba14b7bee2523b18d707e4fe683eef1a610cb7b3542604a8bdabe795f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cloudRefresh.ts"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bb754bcd61004d96e799a63c0ff444c9d7e7d99dc5965ad8dc15fcaf6f65de"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/commandDispatch.ts"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0d4a91ff3550e318ce1e2afdcb0b0b97fe220f4f9d45bb7f5bb78de7e53d8a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb599f59f329d2466240cdbd55c451a48dad64eaf024d26b6270a4e38e965d4f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"a922524ea2a85d09c4146737de128592eceeb27cdb2fd6b3e197eed7278e9c39"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f875d94095179c23bf92c0723cfd4aaf95bbf618744e8efddc992781eb95667"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/connectionsAndDiagView.ts"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"c644bd3d9ba22c0d1a003eb154ac16ba196f296341c1cc6892f50875f28fe284"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/detailDrawers.ts"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"4548dd746111215498b63d15e666bb6de2c235bc585dd1d60d1be1028e520a71"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6c9309bf6cb1ec93e3d63cc14e83aee9cd35072ffec99fcfc887548255c0af"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/intentExecution.ts"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"657ba56e89a4c1e85036f73fd2837b9ff3e2b67731065b0f088d34cc222e36e0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/onboardingGuide.ts"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"be739cd6f2fc1f45627f46c581b832d9cda61b946f37f5abdc6582c2b592ceef"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d05a7a8df98d6bcf8f64e7015f8cb4d26955dea4b99fc42b39b76541abbfa2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc6c6ce9b1f1cb7ee7a8ee6bc7f1ae3e1c4179b0c385cdbf70a6f33a7bab69b9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5e36b1b8a3c3eaaddab5740451e5294c6e2cb5c4cd338dc1d91f50f8391867e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c120c7e2de4ec8ef7d2a45b280d2e3886670fe0b5481a32e2ffe2e6d72d9ac4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/reconciler.ts"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"11848b9cf42240fcfb06e4c39c2556fc428a26a9dbd7959ef8c71cae4d8ca9b4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"572ca7d572f7899f082f933b6f1bb356b1b77c3c46f5fc279b12e09dac08cb49"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settings.ts"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1cef3cd5f9c580d82243129b2d640d3d404e96c638ef11350f5f9ab40470174"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c64a4b3424580e729275226130720603b58a456b6ba91b621162e1123d6f6ee"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/settingsEvents.ts"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3be0489fef773e2e2bd4be549943047b2bcc7de102e16b2709ff2142dbaa3da"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa6a3c71b1f5fb046599927af64657d549843d0d1886f0e4e5b0311adaa60759"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"95903cc8a0d10125105b8a04b29751ae919f7318720f23f6126d1759e523b11d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceded2c180ff884c68dbbb5ebab2dd00dd8226de5362f53a0e05ba71ecf9cb75"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/speechGuard.ts"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9c65266d951b331f7426b27ec58b75b8bc9a7fd668f1b9b33c257bd4981420"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d2a78e0d9401b40b5349ec156b0d50e4bb2d3a9cdab000c27958c54bf32002"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"781f20e782134e1f9403b5c953c5a7a081262bb3bf00242ab39c46127293d671"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ab33ef181e9804ce166d16619a3d7fe9b91ad24daa80b87b8fd75a9638a250"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2ddc46cc7a82dc591521176067044555fae1327c1ea1a7208eead324a605a0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ff51d5a2512b1a83a626c78e5e6e5c44bb9b3bb6ba94547661b79886a22bd4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"fddbe87e52b84eadc232cf6b1d5494e74d2e1d8d1a2e2ce334192f990f31a5ee"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"beedfa4165c8d05ef577857fe8fdc6b79b5172766029b576a50134ebd07ff217"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3b0f15e782f0f295887cb0a19935ec4ecf9b2e513eb4016f36fbec482679fa"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/energyHistory.ts"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c4ac498df3844a4a23d28cf87ebe2603a8bb20541421567df3e0622ed1e9e5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"76861e1ef8787a045b20a67c3ce40929a9bd22e59dfd196c7a70b2f774b44efe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"353d1d07363bd1ea7bd57e553540b27dc7090eab308838c31246263e04d73513"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b0f1284f91d73c5ec650e3909618e8c3cb658b38e5c69f7e8a04c700c02951"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"70dd934937f2abe5e43e284c56d6514848c29fad853b0a8a4a6e2382778fc172"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"d279643deaecd8cf9f4599dfcd15bcf785110a784f1461d4445f29caafee6b16"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":862}}}],"partialFingerprints":{"codehealthFindingId/v1":"3851d1fe9ca9e26726ea1e9408a3cfdfe83bc854813c5f2e1f0d22f184dbba14"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): \u0060.catch(() =\u003E {})\u0060 handles the rejection by doing nothing \u2014 the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (\u0060next(error)\u0060, a returned rejection), or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/optimisticLock.ts"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"925b3ee7394fa77dd81ea1d3992df2d257cb1ba55580227b4adeabe2e4c99811"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/pollingPolicy.ts"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7af27d8d1cae5cc205beb0c131894b2a38d874d315ce40eea82589810780bf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/pollingPolicy.ts"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4634624d94bbe4c879707d5237e4d5afdedbf1024c9fdb9385dba704a79ddff"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"33807b10b22cf11fff6ae4515f644db6d89a19a73e4cd474723262dd50e781fd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"f501c04a8d5475efba2f2acbb04a2b997b31ea1ce5e5778fc3ea08e8158d7294"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2342fe5b9a16dc6aa6d8cb518ba12df3fe571c373aa7558de29f1cdf99db119"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"07010205a0b732e15f99d3a6e3ee286d6c81b0abbdb3c6196008d42ae292167c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"597e19c8cf4a3f349769c982155865c9bcb792915950418db23f96e41547e9a2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"3472878a13432de2070a7455d4662f83c8ec721b5ee6b4a498543d784675f031"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"12854c2c0f4ec77a2afc7e16fb5d15c2dc53b1a46d948f1f3b14d87c9b8ed77c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":1478}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3bc391783352054544c91cae924ad1cc6f32d9562d21e158a0dd8bf2985dabc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"808f533ee63da8fa54d14310b913b55d5f0e0b4e64b29f9e5fd244bbcf58f414"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/secureStore.ts"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84e7cd9ffb525d2cf2381e1d756ac5c5f74df2f6ddb192e8f1e80de19929bfe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (\u0060catch (e) { if (!(e instanceof SyntaxError)) throw e; \u2026 }\u0060, or test \u0060e.name\u0060), because a JavaScript catch takes every exception, programming errors included."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"2122312751e3aef786aa7217f31984fe3b35225dd15918399000ccd404cfeacd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/assistant/modelIntentResolver.ts"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff696989c8f3d9fb833a549321944266423b1712ba67ddfdc7c89afbbb3b943a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bdf028c6cc0a2c7c865e2564f77e2e05738e891f7509cd6b3be8917196c8f8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"53738fd28921d5ba01351ac96e51251986597d0711ca567f63361eea318e26b3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"918a9b8dbad218e1b3f4a8e3b31732261314849a6c89aa63e3960510c461b795"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49194b2e9b7c3a594c374d1a163d2e80388584631c495220147ec38b082ea31"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"25287706e6a2c633d14f62506899c2f0917feb636721ebd2a58917e31dd8c236"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d46b071a005f6da40db3fc3636db42b0d1e6ccc7cd8c92d4cb701ee8d7245f2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/scripts/verify-flyout-layout.mjs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2cac431c2a1cb080b578d65d6c39d40db7bad0b681345de958ea83fa192119"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"raycast/src/url.ts"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc9f3ebecd95b22defde63187d1baa4e9d99ab9ff04da1ecbc34fb0a7bcb0756"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/DebouncedResumeCoordinator.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d73cb2d806796004b43f9d4c5fdc87fadc4b99cf8b90eec37f7f95fb133e94"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ac58a3919bbf3bdc938bac75cb0a9ae0e34effc60806a177f166e47ccd67f6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HADiscovery.swift"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"92aa7ac5d60eb23873a4a588f5a11cd9b0f44cab729ecb07b3f598c4edaa1bfb"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeStore\u002BAssistant.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b68f0a2eb47422950b33a964762d0a1548f10fa712f7a82724481339586dc4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGCertificateTrust.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"099a0d58970cc8a70e4cf02eb7446b2a8a43f07e7a075b212e806282a52cd2b8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGCertificateTrust.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9e2a59e34d22a83a5c6601062d5b0670b16c3f11b67d09a51fa680ce15687b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/LGWebOSClient.swift"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b907d97e228e320fb7ed1bbbb5b66c6784cd86370f00d24ad61853ce9f7d8a5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiCloudClient.swift"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28e061610837bcbd7d1eeb2e86a82bf94ce4f9281f7bc6e0e6036c0527782e7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/GrokBallSidecarController.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"b914f18d24254a4c2551477a7daa6bd61a1100d42acf2b23768d251d2d9781b9"}},{"ruleId":"X5","level":"note","message":{"text":"Null assertions (\u0060!\u0060) override strict null checking: ~2.7 \u0060!\u0060 null assertions per 1k TypeScript source lines \u2014 180 assertion(s) across the 67843 source line(s) of the 101 TypeScript file(s) read, which is the only code the operator asserts anything in (a \u0060!\u0060 in a \u0060.js\u0060 file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: windows/src/core/assistant/habits.ts (25), windows/src/core/dualSourceProvider.ts (16), windows/src/ui/sensorHistoryView.ts (14). Each one tells the compiler to trust the author about null, suppressing the very diagnostic \u0060strictNullChecks\u0060 exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1d83a7c69636a6290f63000d5c19b2073be1fa772f51977532af9ca6f745fc2a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060crashReportStamps\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/AppDiagnosticsLog.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb6932e514919b97c796e4bd4908bb3871acf76dfceb7dfb3bb8c29cd9bd407"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encode\u0060 turns every thrown error into \u0060\u0022{}\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"be2012bb33e8cb68d0b9acffeb38e209ef07af185cdeed4fc4ba22a3ca9acf49"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encodeOrder\u0060 turns every thrown error into \u0060\u0022[]\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb8d03fe96e39614c8ffc43412e518b10c12fd35bd65791a5c37bfcd3e046cd"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060groups\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d06db67e5c70d85e806574eb7ea0cd7962d3abcf00c2cfd5e713942ec643c8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encode\u0060 turns every thrown error into \u0060\u0022[]\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b103dcf7eca95b7ca2825acbbf4239837818e0500ce6e3ac30e06558da5345"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060map\u0060 turns every thrown error into \u0060[:]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fcd6cef515a5432c67826860bcf03182b02a158e4ba4524598e22905e17cb40"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encode\u0060 turns every thrown error into \u0060\u0022{}\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"b154e8bf8c6c8ea0abebb4a066818ee45d6446d8ab278fe7ff1c5a687e73baaa"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encode\u0060 turns every thrown error into \u0060\u0022[]\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff1d007bb4e295cf02257fb190fe1fb763aa0549ab7f52558df6aa73703e599"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060decodeAliases\u0060 turns every thrown error into \u0060[:]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd264bc94bd4ca29c38b23c04ef950ba18e41676d705b44641bc75e8d861ee4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encodeAliases\u0060 turns every thrown error into \u0060\u0022{}\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f75d7a652be284732a6ca2ee8755ab1f96598ec168a3eebaa187cdb83dbed97"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060decodeOrder\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f5d4238b37ecd2d17bb430d7b9803e850f13b1c238140ca13fbd4b59dc045e4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060encodeOrder\u0060 turns every thrown error into \u0060\u0022[]\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MenuBarMijiaApp/DeviceLayout.swift"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf891867ed2ed0c00e0f0a80a369854f17e02efdf3eeb69bcd3c9a784345c69"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060receiveJSON\u0060 turns every thrown error into \u0060[:]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/HomeProvider.swift"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"aafd53e788289a2bffc5fd35037cfe4517474b1be6ee117feddebe17e07670b2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadAccounts\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/MijiaCore/MiCloud/MiAccountLogin.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"a042ee06130f13f4c8ec545de3a97c717cbae9e072b9d8160b7c7d9ff9f21fa0"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060drain_pending_open_urls\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/companion.rs"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a684409ce1cc5002c9821e53723e8f5c62712b21ab4fc47daf7de2f6789680"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060read_origin_store\u0060 turns every \u0060Err\u0060 into \u0060HashSet::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/network.rs"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f893ea6054d952d6e15745440624a5020d14f087aeae591dedd4b9767aeae1"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadNumberMap\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a5c73e2ae4bd818ce07acfb8b83bb8a5984857598cb9c0cb9b38cdad4e4f24"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadBooleanMap\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/safetyAndHealth.ts"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0c9cd5b4c7cd4925e33a143261af186e18c3a5ac9048697fe1acd47cbb6414"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060runRoute\u0060 (in \u0060querySingleMiMetricSeries\u0060) swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c2edc84114b3dadc9c021525b9ff278976b84e38e858231bdf4d770da94e6d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060fetchHomeAssistantSensorHistory\u0060 swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/sensorHistory.ts"},"region":{"startLine":1445}}}],"partialFingerprints":{"codehealthFindingId/v1":"174a4e4a01b3ecc33cb9084ee0aa78b0201eb21d4e631332b7e837b5ba7a7e91"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060load\u0060 swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"b094db1fda192dafa31362d1751e42231190fe2b640bbfabf024c06dd5fc7913"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readStamps\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/automationEngine.ts"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59f49b5b80f18c5c4e7d2b8d53e3b961da4c8c1df02d0256fd354062b876f50"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readPersistedAccountExpiryMap\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"8869880a67832efa6e082dc7717de05ea86291d59a8600e826d8dcc0073f6e6e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060readAccountIndex\u0060 swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/miAccountsStore.ts"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c679116e7c86152b21d50d9c60e54bd078ab96a39b65cf46600f85e38a277e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadFromStorage\u0060 swallows every exception into \u0060return []\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/diagnosticsAndScanner.ts"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a61109af81249322376935dbf75b0fb4da9cff9089291a833e95624f153875a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060load\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/core/dualSourceProvider.ts"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"c047d04cc8a85d086ee6e08185a66502022446ceb0fd8878f85f5c84ce5f414a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadRawStorageMap\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src/ui/cameraLive.ts"},"region":{"startLine":1440}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fffcb342eecce56e2207281c867bf840abf8ae9796a4fe12fd183676d4aaf5c"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path_lower.ends_with(\u0022/stream.mjpeg\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path_lower.ends_with(\u0022/stream.mjpeg\u0022)\u0060 also satisfies \u0060path_lower.ends_with(\u0022.mjpeg\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"windows/src-tauri/src/camera.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5de0714e1e3acc1bfb88aadaf3eb76c853381e51e6b61e594f97e38392d6c25"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060line.startswith(\u0022| :--\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060line.startswith(\u0022| :--\u0022)\u0060 also satisfies \u0060line.startswith(\u0022|\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_supported_devices.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a682936c81d9afa375a62e3da7bdc22a41f20829728af726a13dee548cf5f428"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060line.startswith(\u0022| Device\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060line.startswith(\u0022| Device\u0022)\u0060 also satisfies \u0060line.startswith(\u0022|\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_supported_devices.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e61e1fe5278f0a7c437b7709da1282f04acfe93f4a65596dae75afa75eab37a5"}}],"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-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-125","guid":"98717707-96bf-ca5b-9568-8d1d257574c1","name":"CWE-125","shortDescription":{"text":"CWE-125"},"helpUri":"https://cwe.mitre.org/data/definitions/125.html"},{"id":"CWE-1333","guid":"11a336ce-63de-c45c-845e-29ca1e8df13d","name":"CWE-1333","shortDescription":{"text":"CWE-1333"},"helpUri":"https://cwe.mitre.org/data/definitions/1333.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-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-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"Cleartext Transmission of Sensitive Information","shortDescription":{"text":"Cleartext Transmission of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"}]}],"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":20,"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."]}]}