{"$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":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"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":"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":"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":"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":"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":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"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":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"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":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"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":"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":"SessionStore.validateSessionBackupEnvelopeForImport (cyclomatic 293): SessionStore.validateSessionBackupEnvelopeForImport has cyclomatic complexity 293 (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 shape REPEATS in the file: one other method here (SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48099}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a15485978d947d74ba273cd3f4a07f8531a25d62eaeb0887cb554d0e6fe18a2"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.aggregateSleepCandidatesCore (cyclomatic 262): SessionStore.aggregateSleepCandidatesCore has cyclomatic complexity 262 (threshold 15). Of this number, 256 points are the body\u0027s own statements and 6 belong to one function item 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":50025}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c535db8936a7306d225d4aa555c1d05b6a5502e3a78f9d590577f97b69d2833"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded (cyclomatic 177): AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded has cyclomatic complexity 177 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13289}}}],"partialFingerprints":{"codehealthFindingId/v1":"f619c1b2fe804b102ec35d90a366f2b99057f2b48a12d7623e55408bd3fcbc66"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logGateStatusFromLaunchIfRequested (cyclomatic 143): SessionStore.logGateStatusFromLaunchIfRequested has cyclomatic complexity 143 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31247}}}],"partialFingerprints":{"codehealthFindingId/v1":"028329966b7d056bbdec6f0bb6d79e803f9b4cc6ac664b0a00f84a6be826a53c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.applyLaunchAutomation (cyclomatic 139): AtriaBLEManager.applyLaunchAutomation has cyclomatic complexity 139 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24590}}}],"partialFingerprints":{"codehealthFindingId/v1":"77de48d631197dec6f48f1bed5487e120e3d9f38b17d0285b9296c4f1d952f31"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armHistoryOnlyProbe (cyclomatic 132): AtriaBLEManager.armHistoryOnlyProbe has cyclomatic complexity 132 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40410}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffaca844f9f0ebc4e2905ef4ae90af284a29ac2a9aa3fd70b3c12dc390c46243"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cyclomatic 126): AtriaBLEManager.peripheral has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55594}}}],"partialFingerprints":{"codehealthFindingId/v1":"1add9599e4a576a0084234229952bf617f3343163411c59639b4bcaff22bce4e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4SacrificialFastDrainReceiptVerifier.verify (cyclomatic 126): AtriaWhoop4SacrificialFastDrainReceiptVerifier.verify has cyclomatic complexity 126 (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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6613d9dc3c68a044a3ec72899598ebd1ac66eaeb3d1953f95ac2a6946fa0e626"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logBoundedLargeStoreGateStatus (cyclomatic 124): SessionStore.logBoundedLargeStoreGateStatus has cyclomatic complexity 124 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31571}}}],"partialFingerprints":{"codehealthFindingId/v1":"47bc830d8f998bafa326bd16b371f15fdcde937f5c843747f849bc59ed8b9947"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cyclomatic 123): AtriaBLEManager.peripheral has cyclomatic complexity 123 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56686}}}],"partialFingerprints":{"codehealthFindingId/v1":"febb6ad8695c7b5ad7ddf5dafeee98bd50672f9433cb7df2d92e5191e5d851c3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.validate (cyclomatic 121): AtriaHistoricalFullDrainCoverageStore.validate has cyclomatic complexity 121 (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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e55a268a2008ae90fd82d535e17fa380146a312c1f84e4495133fbe19ea3c4"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cyclomatic 115): AtriaBLEManager.centralManager has cyclomatic complexity 115 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54164}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a36b860e7a7a5eaeb937aa6d7637909ad929df3cc293444583242e96559b37"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.runRecoveredHeartRateProjection (cyclomatic 108): SessionStore.runRecoveredHeartRateProjection has cyclomatic complexity 108 (threshold 15). Of this number, 97 points are the body\u0027s own statements and 11 belong to 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15199}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55fad416fbe1fa68b6a2a62ea810f39469aa87c2399abffd7155bbfe4bb2135"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startOfflineHistoricalSync (cyclomatic 105): AtriaBLEManager.startOfflineHistoricalSync has cyclomatic complexity 105 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16963}}}],"partialFingerprints":{"codehealthFindingId/v1":"c87080ec05e793b9f5619df73400a847bf9de3a4078092ac9ce76f88ed121454"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleFullDrainConsumerMaterialization (cyclomatic 104): AtriaBLEManager.scheduleFullDrainConsumerMaterialization has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46608}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a047aeb6f3697eaae33078f24585ae7f332f0ca2f84e49b71c07938e666f43"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.finishOfflineHistoricalSync (cyclomatic 103): AtriaBLEManager.finishOfflineHistoricalSync has cyclomatic complexity 103 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19222}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7e09162ade8533a735e9211cf13448bc02f5c113471057787e9385f1ad4e551"}},{"ruleId":"D1","level":"warning","message":{"text":"validate_hrv.main (cyclomatic 101): validate_hrv.main has cyclomatic complexity 101 (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":"validate_hrv.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84db712ec4513740a3209068fd6d657c9765a647b60799e836051b8ae3da547"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded (cyclomatic 100): AtriaBLEManager.resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded has cyclomatic complexity 100 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38001}}}],"partialFingerprints":{"codehealthFindingId/v1":"8400f10dfb859972b2997da5e7957f1f41080ed09f4aa1bad2681382ec5cd777"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.compactArchive (cyclomatic 95): HistoricalArchive.compactArchive has cyclomatic complexity 95 (threshold 15). Of this number, 93 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9722}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc6109b8fa672e708ab352143ceaceec26fba17e862fc14c156360987a2a5460"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutActivityType.resolved (cyclomatic 92): AtriaWorkoutActivityType.resolved has cyclomatic complexity 92 (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":"Atria/Atria/AtriaExerciseCatalog.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6ecf81608bc2a21795bd0e7630e5e06ef56d4d1ac464d2dc3a86523893e548"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.resumedSleepReviewCandidatesCore (cyclomatic 87): SessionStore.resumedSleepReviewCandidatesCore has cyclomatic complexity 87 (threshold 15). Of this number, 85 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51622}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f26885ae712977365d51e9f74f40b688e498ba2d1656895604d851f1e17966c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDailyStepPresentation.resolve (cyclomatic 83): AtriaDailyStepPresentation.resolve has cyclomatic complexity 83 (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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e1b5f42d75a2746b33d9f60de2ea4655841c7cb61c88d4b06414b68f480bff9"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSnapshotPublisher.publish (cyclomatic 81): WidgetSnapshotPublisher.publish has cyclomatic complexity 81 (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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b1da63bd07d619b7d2f52053bbc579f6f24d0705989401618acf17bc28b582"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDiagnosisReport.discrepancies (cyclomatic 78): AtriaDiagnosisReport.discrepancies has cyclomatic complexity 78 (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":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1f169b46a5b5b79a98724864fd048875e589ae3f277ab6646ef76ba970357e"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSnapshotPublisher.durableStepPatchedSnapshot (cyclomatic 76): WidgetSnapshotPublisher.durableStepPatchedSnapshot has cyclomatic complexity 76 (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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"628f1f05bf972f976658cc9c579299a1ee1fe22b597441fafe8c1f6dcf8041e0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.init (cyclomatic 74): AtriaBLEManager.init 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6959}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d28f45d662c372e3738ab20ac0db21980341290dff61de9a100cb703561d9ff"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.processHistoricalDrainEffects (cyclomatic 73): AtriaBLEManager.processHistoricalDrainEffects 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45898}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e103f57a6e0ddbd2e4eca1c9931446eecd42dc373c9731cc39985ff7e7d5fdb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.runForegroundKeepaliveTick (cyclomatic 71): AtriaBLEManager.runForegroundKeepaliveTick has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10681}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f9da17d30aec09bbde2dd35deaaf0b8a5dc387d7630fb63a61eaca610d7e86"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTopStatusProjection.presentation (cyclomatic 70): AtriaTopStatusProjection.presentation 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14203}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e1a43a9ad06101c65d045816a21ff4ef34ab8bc51de364235c6f8472b86b896"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightMotionRead (cyclomatic 69): AtriaWhoop4MotionTickCompactStore.latestNightMotionRead has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b2401ff2d1150761dc431ac013c292a1d482d3abc12a860e4cf71389d2fc11"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSnapshotPublisher.snapshotPreservingFresherStepAuthority (cyclomatic 69): WidgetSnapshotPublisher.snapshotPreservingFresherStepAuthority has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fdbb2593ea01e88a7a01b299f3ee8dba7cef1e1cac89fb430751c4999ff4076"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.publishAndVerifyHistoricalConsumerCutover (cyclomatic 68): HistoricalArchive.publishAndVerifyHistoricalConsumerCutover has cyclomatic complexity 68 (threshold 15). Of this number, 67 points are the body\u0027s own statements and 1 belongs to one function item 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2721}}}],"partialFingerprints":{"codehealthFindingId/v1":"349fe188f781f7c7db11bb8882cd8f7aaa33e438b5e25adc564e841090cad641"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.makeRecoveredDataSnapshot (cyclomatic 65): HistoricalArchive.makeRecoveredDataSnapshot has cyclomatic complexity 65 (threshold 15). Of this number, 49 points are the body\u0027s own statements and 16 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6298}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1cab6374075e948d2ba13340dc6e56a79669355fffc18e087e5b842e3a5a4d"}},{"ruleId":"D1","level":"warning","message":{"text":"SleepHistorySnapshot.init (cyclomatic 64): SleepHistorySnapshot.init 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60294}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d04776867e9fa29806bf70ab5911f81565b5038d6a9894c18b5af3232f98b6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow (cyclomatic 63): AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow has cyclomatic complexity 63 (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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8497d72e244330630e2f3298792580fb804e0ec7ea89474d093f266f9391f7d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.qualifiedOrdinaryBandPowerShare (cyclomatic 63): AtriaWhoop4GravityCadenceStepModel.qualifiedOrdinaryBandPowerShare 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83de6962c07bfaedcdf13231a9f2631159c7e083d37cc2d01e3222156ce9860"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPhysiologicalCycle.canonicalMainSleepsCancellable (cyclomatic 63): AtriaPhysiologicalCycle.canonicalMainSleepsCancellable has cyclomatic complexity 63 (threshold 15). Of this number, 48 points are the body\u0027s own statements and 15 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc65cf7cdf9cc5faa5d67fe4f3b512d11fabbbbfc0d69ef867ff1b8c5e68eb19"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.autoConfirmSleepOnForegroundIfUseful (cyclomatic 63): SessionStore.autoConfirmSleepOnForegroundIfUseful 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":39229}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be698162a6a819d683aed672561bbba4da8be695f19e705255b5eb05d0d726e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startReadOnlyHistoryCaptureIfNeeded (cyclomatic 62): AtriaBLEManager.startReadOnlyHistoryCaptureIfNeeded has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41909}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c54b5e4d4d6e0fcb2d9a68f3a4211c43ddfa55bd38d6e49885ed2972f9ca714"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cyclomatic 62): AtriaBLEManager.peripheral has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56373}}}],"partialFingerprints":{"codehealthFindingId/v1":"e76e0540836f239419ef328f7f2bde18c9fddd4d62e7e994e880da555dd9af51"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cyclomatic 60): AtriaBLEManager.peripheral 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56116}}}],"partialFingerprints":{"codehealthFindingId/v1":"da44a106609d12d43853197b3b3b7641a77de4d861ab1a7a4e862a6147d84265"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLiveWorkoutTRIMPAccumulator.metrics (cyclomatic 60): AtriaLiveWorkoutTRIMPAccumulator.metrics 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"2633a7451c83fccffca3c00f75fb39794b320aca19b76611e05b6c633e495817"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scheduleConfirmedWorkoutArchiveRehydration (cyclomatic 59): SessionStore.scheduleConfirmedWorkoutArchiveRehydration 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19830}}}],"partialFingerprints":{"codehealthFindingId/v1":"6992e4fb5780f77094c43c01a4774472b1009757cf7abf274ecbdac41cc66c71"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.awakeSplitSubClusters (cyclomatic 59): SessionStore.awakeSplitSubClusters has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":51200}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7c98d47d71e33a2e1e54f3f04baae60002a27d13517ae186ac9dd02e914f72"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightEpochFeature (cyclomatic 58): AtriaWhoop4MotionTickCompactStore.latestNightEpochFeature has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81cf2c1e4fe81e87d4582e5c0f6330d1890748264d530b5d03c1e35837b5ac9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.archiveOnlyHeartRateSegmentsCancellable (cyclomatic 56): SessionStore.archiveOnlyHeartRateSegmentsCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27378}}}],"partialFingerprints":{"codehealthFindingId/v1":"881af09e4324f9f8d3b539f6842e7e791d3a24ba47ccb7d4c235da3abf1da015"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.compactLatestNightSessionSlice (cyclomatic 55): SessionStore.compactLatestNightSessionSlice has cyclomatic complexity 55 (threshold 15). Of this number, 51 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38605}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e73ce7fd9c7d0dadb875fb863426f943d77d4937ef4a0d17d8b1c682300011"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.streamedWholeArchiveDigest (cyclomatic 54): AtriaHistoricalAggregateReader.streamedWholeArchiveDigest 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"1035e0a9f8e810dfafd401f6b890b64984a232268cd82b8f6a5fca1e85c0c7a1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cyclomatic 53): AtriaBLEManager.centralManager 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53660}}}],"partialFingerprints":{"codehealthFindingId/v1":"5919661395c77316996d0980889c3c157f06cba0fb3cd25b3e6bcbb45fd1b58e"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence (cyclomatic 53): SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence has cyclomatic complexity 53 (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 shape REPEATS in the file: one other method here (SessionStore.validateSessionBackupEnvelopeForImport) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df1b03b3b9f3d31f2f2e4026885430cc7e2687f0344f3b1565f4a742a3fe437"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWidgetMetric.statusText (cyclomatic 53): AtriaWidgetMetric.statusText 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3653}}}],"partialFingerprints":{"codehealthFindingId/v1":"055cdae3ecbe76ccc31c3b8dac28bb176982992763085660de82122fc3e8c136"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEHistoryTerminalPublicationStore.validate (cyclomatic 52): AtriaBLEHistoryTerminalPublicationStore.validate has cyclomatic complexity 52 (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":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0222d3ed99f08270bb71753a598294d8515867cbb9168fb3f057f213bfbb7a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cyclomatic 52): AtriaHistoricalLongTermRollup.validate has cyclomatic complexity 52 (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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"0869200e0b6260fea26161efb789c5ae731d51204b55a940ce6bd76e7bb86f30"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeBehaviorCorrelationSummariesCancellable (cyclomatic 52): SessionStore.makeBehaviorCorrelationSummariesCancellable has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":47378}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6356b17d25ee6b071ebf0502dffc6a222b58d90b21798822c1e0ea0c7a4222"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.finalizeOfflineHistoricalSyncAfterLiveRestoration (cyclomatic 51): AtriaBLEManager.finalizeOfflineHistoricalSyncAfterLiveRestoration has cyclomatic complexity 51 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19797}}}],"partialFingerprints":{"codehealthFindingId/v1":"567921ee4b6c06fdbb802d98a33928413671bb3aebb3e580a677947bb3ffc7c5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalRawRetirementExecutor.retire (cyclomatic 51): AtriaHistoricalRawRetirementExecutor.retire has cyclomatic complexity 51 (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":"Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f606f4ff9c4d4de34a3255f33d08aa06ba4b37134de924d4e8c0f7a634b5bb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepWakeResearch.stage (cyclomatic 51): AtriaSleepWakeResearch.stage 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"bba224c17f3c1e7763740552f747492c5619d00fa11c1a0b42247da50fa3cbec"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeMorningFrozenDailyMetric (cyclomatic 51): SessionStore.makeMorningFrozenDailyMetric has cyclomatic complexity 51 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24454}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45a3d05aa49563a0817a068d69d894c1d26fe58c321dbe0bf6b9bd7a1914b07"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmWorkoutWindow (cyclomatic 50): SessionStore.confirmWorkoutWindow 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34270}}}],"partialFingerprints":{"codehealthFindingId/v1":"6642cedc9e0fc1c927417823e88868ee990590012f2d7bba7a1b1dc324bd413a"}},{"ruleId":"D1","level":"warning","message":{"text":"SleepHistorySnapshot.combiningResumedSleepSegments (cyclomatic 50): SleepHistorySnapshot.combiningResumedSleepSegments has cyclomatic complexity 50 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 14 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60565}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f629a59131ef2b1005ee5a94dc976f1ca4ed28cbfd63f0da2729e1a03bc76c"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.motionTickDayEvidenceReadImpl (cyclomatic 49): HistoricalArchive.motionTickDayEvidenceReadImpl has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent 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 (HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine) 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3744}}}],"partialFingerprints":{"codehealthFindingId/v1":"901ec38379c1c9adabf18726628705d12d0cd9b06cef53de8a276c2662dbae28"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cyclomatic 48): AtriaBLEManager.peripheral has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55342}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e9e59c0a619e08193bc0abe69c05631c25c16415c9e9f15c83818a276592c5"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.attachRecoveredSkinTemperatureCancellable (cyclomatic 48): SessionStore.attachRecoveredSkinTemperatureCancellable has cyclomatic complexity 48 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22768}}}],"partialFingerprints":{"codehealthFindingId/v1":"507457f72d9829935ae1268518f4197196190a02957b90e80850c131bd8b7fc8"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.motionQuiescenceRefinedBounds (cyclomatic 48): SessionStore.motionQuiescenceRefinedBounds has cyclomatic complexity 48 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 31 belong to 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49726}}}],"partialFingerprints":{"codehealthFindingId/v1":"73d4368b85b4f12f9e9fe44f6118dee150eb474325ac680a888b5ebc8babafdf"}},{"ruleId":"D1","level":"warning","message":{"text":"Recovery.estimate (cyclomatic 47): Recovery.estimate has cyclomatic complexity 47 (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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"476d2854a27e8821be2890b3e9a21b9565dc46f22d749b0f63719e88c71deee3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaApp.scheduleLaunchExportsIfRequested (cyclomatic 47): AtriaApp.scheduleLaunchExportsIfRequested has cyclomatic complexity 47 (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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eef231616a0be4c0476dfcddc4fff19bc6ab78810f50f49a556dd15279777ba"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleLongWearSupervisor (cyclomatic 47): AtriaBLEManager.scheduleLongWearSupervisor 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25154}}}],"partialFingerprints":{"codehealthFindingId/v1":"561d4d6073cdcc72c8ca5e3b0f1a5ca42104829dd8869051d7a378b8c57f9383"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry (cyclomatic 47): AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry has cyclomatic complexity 47 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 21 belong to 4 function items 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1651}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e082133aef376873345fe2204595b2367fe14a91cd01bbd0a046f15e0b72368"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.materialize (cyclomatic 47): AtriaHistoricalStressReplay.materialize 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"d61c62f13c9b097ce2d3788aef8789ad38d9a53ef8ff04ae896759a497bb0b81"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.backfillConfirmedSleepStagesFromSessions (cyclomatic 47): SessionStore.backfillConfirmedSleepStagesFromSessions 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46346}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b08b931ded2745cf56d2b54ccf937fcaea33cb9d00119c2e6caba079d1f3e5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaApp.handleDeferredLaunchWork (cyclomatic 46): AtriaApp.handleDeferredLaunchWork has cyclomatic complexity 46 (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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cc9b96c6d5bbf1d46fe0902549bee68f06f83836614b9619969a080e195017"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armWorkoutHistoricalMotionBankIfPossible (cyclomatic 46): AtriaBLEManager.armWorkoutHistoricalMotionBankIfPossible has cyclomatic complexity 46 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36012}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a182d041cc23041703bb0e0813d7a935ec6705c331998df16b4f755250edcd7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.evaluate (cyclomatic 46): AtriaHistoricalStressReplay.evaluate 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2125}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3548037bae59506235d5083ac81903abdf3c4340fa5651fbdd18b3c8c06024"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressMonitorStore.update (cyclomatic 46): AtriaStressMonitorStore.update has cyclomatic complexity 46 (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":4275}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc37d341829bac0457938cf1c114c15be578d670bc1cbb6479712f46e0c156c"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.handleRecoveredDataRecomputeEffects (cyclomatic 46): SessionStore.handleRecoveredDataRecomputeEffects 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":18410}}}],"partialFingerprints":{"codehealthFindingId/v1":"01397953d527b872430e0fc496060c869b45325a657b30eb1214aa7fbbbc3eb6"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.recoveredSkinTemperatureProjectionCancellable (cyclomatic 46): SessionStore.recoveredSkinTemperatureProjectionCancellable has cyclomatic complexity 46 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23037}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc94ae2b7471d138fc21807f0486db7edf4b0d6dc55c76d3fc2c8ad917ac5e8"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeSleepReviewNightForCacheCore (cyclomatic 46): SessionStore.makeSleepReviewNightForCacheCore has cyclomatic complexity 46 (threshold 15). Of this number, 35 points are the body\u0027s own statements and 11 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37221}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49d3db239893a561e8f0aacf911c38e177dc76280874075fb6adcd7b7bb8b34"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.physiologicalSleepReviewNightDraftCore (cyclomatic 46): SessionStore.physiologicalSleepReviewNightDraftCore 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37821}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1653e7473889526a06867fa828fb850f7d2becb234a5610d5c3f0bc5f17b770"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.persistActiveSessionJournalIfNeeded (cyclomatic 45): AtriaBLEManager.persistActiveSessionJournalIfNeeded has cyclomatic complexity 45 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23292}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb99e98606d7a183d3b50c89a1ae4a52028ed57b775e87bfaf68d31ea90fd89"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.snapshotSession (cyclomatic 45): AtriaBLEManager.snapshotSession has cyclomatic complexity 45 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51508}}}],"partialFingerprints":{"codehealthFindingId/v1":"399e0ca6614d184f332b5f7f3e947eeffc75ac47fbb9151254f308189bf787d9"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredMotionProjection.projectCancellable (cyclomatic 45): AtriaRecoveredMotionProjection.projectCancellable has cyclomatic complexity 45 (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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"687ca07a28658fadc7c648e98718bc49e5a83f40d44e683e101e68c997a3af3b"}},{"ruleId":"D1","level":"warning","message":{"text":"HealthKitExporter.export (cyclomatic 45): HealthKitExporter.export has cyclomatic complexity 45 (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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f91aa7857beebf1c59d7242e96531a0a8add49c80072ac17fbba15df6fcb09"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logExecutionPriority (cyclomatic 45): SessionStore.logExecutionPriority has cyclomatic complexity 45 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31979}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b5598fc7542a28949aff81d14970093385f85263aaa69ec5aa92064e6d5c7f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.applyDebugUIScreenLaunchArgumentIfNeeded (cyclomatic 44): AtriaHomeView.applyDebugUIScreenLaunchArgumentIfNeeded has cyclomatic complexity 44 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3067}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c906b7b85d330bae83510ffb0b6364bb5ade7f1f578726f1d74f412e918e26"}},{"ruleId":"D1","level":"warning","message":{"text":"HeroSnapshot.== (cyclomatic 44): HeroSnapshot.== 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9506}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d62270c74f1f25ea81d0c64339d5b6b415a8d62228992a6e2aa553ee3dd7ac6"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.prepareRecoveredProjectionInstall (cyclomatic 44): SessionStore.prepareRecoveredProjectionInstall 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14991}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b25b1d422c2aa1698e5605f3846a473e80ab42a8c1067de4d087ca53155ab18"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.applyEarlyHistoricalLaunchConfiguration (cyclomatic 43): AtriaBLEManager.applyEarlyHistoricalLaunchConfiguration has cyclomatic complexity 43 (threshold 15). Of this number, 39 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7773}}}],"partialFingerprints":{"codehealthFindingId/v1":"90f6b9bed6ab336d74c24ec51c0807dd16b56cdb8c2310c6fb637fbfd4816a4e"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.readAutomaticRecoveredDataBootstrapCheckpoint (cyclomatic 43): HistoricalArchive.readAutomaticRecoveredDataBootstrapCheckpoint 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4725}}}],"partialFingerprints":{"codehealthFindingId/v1":"51842a5c39df506fbac1b6c4748352ce670308617429bc94878be8c136245a20"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.performAutomaticRecoveredDataBootstrapStep (cyclomatic 43): HistoricalArchive.performAutomaticRecoveredDataBootstrapStep has cyclomatic complexity 43 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5478}}}],"partialFingerprints":{"codehealthFindingId/v1":"75abb8e9f0cbf0077d6de2b79c19ce48832970d92fd57e97c98ba917229d0901"}},{"ruleId":"D1","level":"warning","message":{"text":"Night.reconciledHROnlyDisplaySegments (cyclomatic 43): Night.reconciledHROnlyDisplaySegments has cyclomatic complexity 43 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 14 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59825}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d5de208701af2336c53ca5fdfbcb530e13d306bf062ad5c86d6d0ace89f239"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cyclomatic 42): AtriaBLEManager.centralManager 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53285}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82718a165a2b9a191926ce92711ba9f74c0dd5ca3ac16a1d84d0ad9e8836fba"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaMetricDetailSheet.detailTemplate (cyclomatic 42): AtriaMetricDetailSheet.detailTemplate 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":4783}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2f3de098d4e186b83e4626ebacd0eb1281e960a37972d00fc8d9e9453d6522"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.mergeDailyMetricHistoryCancellable (cyclomatic 42): SessionStore.mergeDailyMetricHistoryCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23768}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d546e8d70db4b0eefe7ee048a9256c6650f172cd7e436b15e4fdca122357b1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.evaluateWorkoutMotionLease (cyclomatic 41): AtriaBLEManager.evaluateWorkoutMotionLease 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39514}}}],"partialFingerprints":{"codehealthFindingId/v1":"69989a2f344bcffe7a3073b2fe0d46a8919043ab37cca67787c4b3e12adc6cd6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.centralManagerDidUpdateState (cyclomatic 41): AtriaBLEManager.centralManagerDidUpdateState 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53006}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f10999af95a21f439360fba6736656bf5474f9d89bdfc79b0c7a794f4a46e04"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.loadPage (cyclomatic 41): AtriaHistoricalAggregateReader.loadPage 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c3d51df859cd4f0e626305e3549e6f4b39b0433c6ca16071d0cc543df0d263"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaScanRecordParser.parseISO8601 (cyclomatic 41): AtriaScanRecordParser.parseISO8601 has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e280bc038a35d27b3e5cddc925339f92e6e1718ae37277e57299167e344302f0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.saveConfirmedSleeps (cyclomatic 41): SessionStore.saveConfirmedSleeps has cyclomatic complexity 41 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45543}}}],"partialFingerprints":{"codehealthFindingId/v1":"2325e4773d42f50f670c9183ec1b1961a2585351595720f9ecbd5fe2daf48828"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleInterruptedFullDrainReacquisitionIfNeeded (cyclomatic 40): AtriaBLEManager.scheduleInterruptedFullDrainReacquisitionIfNeeded has cyclomatic complexity 40 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11723}}}],"partialFingerprints":{"codehealthFindingId/v1":"2360f6a58000c6d15b4eb4ed692c8afeceb40934f37b463a5103f41c5bff6d81"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.observeProductionHistoryCursorRange (cyclomatic 40): AtriaBLEManager.observeProductionHistoryCursorRange 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42566}}}],"partialFingerprints":{"codehealthFindingId/v1":"122b1ee5c0b462e4c8fd5479e1857392dda01d42349ca981936f78837a4b620e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.validatesInternalShape (cyclomatic 40): AtriaHistoricalActivityProjection.validatesInternalShape has cyclomatic complexity 40 (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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ef967352e0277d0ca1d6da92213dbeeb741a8d08e20958508e963e1807e703"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.bind (cyclomatic 40): AtriaHomeModel.bind has cyclomatic complexity 40 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":10396}}}],"partialFingerprints":{"codehealthFindingId/v1":"aedf3606bbcbaebfef223e84a44983817b1dacc3a7fbdbbe4dab73ddd6ebf493"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaNightTimelineAnalyzer.analyze (cyclomatic 40): AtriaNightTimelineAnalyzer.analyze has cyclomatic complexity 40 (threshold 15). Of this number, 37 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":"Atria/Atria/AtriaNightTimelineAnalyzer.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fe261eea308d52038f21c109c3baea64361b47f3db17a5d2e45ff276d31aa93"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logGateReadinessFromLaunchIfRequested (cyclomatic 40): SessionStore.logGateReadinessFromLaunchIfRequested has cyclomatic complexity 40 (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 is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31142}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d09e90ca9189257cc31bc77c6745afdec75be78840eb98c527822f1a51ca54"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.commitPreparedWorkoutWindowConfirmation (cyclomatic 40): SessionStore.commitPreparedWorkoutWindowConfirmation 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33980}}}],"partialFingerprints":{"codehealthFindingId/v1":"0732f0d1aea535060b045ffebe925e20f680a04fa902e79fb89f53986380f095"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.runSacrificialFastDrainSlices (cyclomatic 39): AtriaBLEManager.runSacrificialFastDrainSlices 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41105}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b74c125e1a903e523d7dc6ea552c1c02d913134356ebc588299edfc98b5566"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.load (cyclomatic 39): AtriaHistoricalAggregateReader.load 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"49adc11d4600048beb4f052354c3728b5d38273a7413cfea8752100d43069f92"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSnapshotPublisher.liveWorkoutPatchedSnapshot (cyclomatic 39): WidgetSnapshotPublisher.liveWorkoutPatchedSnapshot has cyclomatic complexity 39 (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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"463af7207ac704f7b376e15c1be0d71f1085fc5bf489b8e118148e7c1b5bd3b2"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.archiveOrphanHistoricalIngressIfNeeded (cyclomatic 38): AtriaBLEManager.archiveOrphanHistoricalIngressIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":17830}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a9b9ee104121024a25ffd04e356f0784f1ea4d8d50aa14dc05ab1508d9837f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendWorkoutMotionActivationPair (cyclomatic 38): AtriaBLEManager.sendWorkoutMotionActivationPair 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39764}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7edbc514eb2e9b9918cbf2cf35b663a8b8254d32053980eb9e7a4b30a024c86"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.resumePendingFullDrainPublicationIfNeeded (cyclomatic 38): AtriaBLEManager.resumePendingFullDrainPublicationIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":48363}}}],"partialFingerprints":{"codehealthFindingId/v1":"11dc5f0dc9256f90b4b75d51e26cade970cf521d4da32207fe79a1e0549dffb7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.detectCandidates (cyclomatic 38): AtriaHistoricalActivityProjection.detectCandidates 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66c044c9d2ae9c8496ef82443fd85e62ee1251c79ef219c954923865552711a"}},{"ruleId":"D1","level":"warning","message":{"text":"RespRateRsa.estimateCancellable (cyclomatic 37): RespRateRsa.estimateCancellable 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cd8520f4e2794a796b16b7b30c718168e7f9b939661e0f04014261355b09c72"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded (cyclomatic 37): AtriaBLEManager.attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded has cyclomatic complexity 37 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21878}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce64f7cefd5dc867f7af133a05ae292d2f168947cf6d423deaa764495ce6625"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleSacrificialFastDrainPayload (cyclomatic 37): AtriaBLEManager.handleSacrificialFastDrainPayload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43423}}}],"partialFingerprints":{"codehealthFindingId/v1":"afa175d1d15e26573ef00af4b4290e465d867f72375791625582fd9d09807b31"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredHeartRateProjection.recoveredSessionsCancellable (cyclomatic 37): AtriaRecoveredHeartRateProjection.recoveredSessionsCancellable has cyclomatic complexity 37 (threshold 15). Of this number, 35 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"0629a72e0ebf9bdd6fd389fee3be6a8c62ef040a918973ba7a8964126b1db5eb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaScanRecordParser.storeValue (cyclomatic 37): AtriaScanRecordParser.storeValue has cyclomatic complexity 37 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11002}}}],"partialFingerprints":{"codehealthFindingId/v1":"d866694ceec264248419159672c2497aeb5e99c5d3b79140122c586e7ede0bca"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.prepareProtectedR10CleanOwnerAtLaunch (cyclomatic 36): AtriaBLEManager.prepareProtectedR10CleanOwnerAtLaunch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5076}}}],"partialFingerprints":{"codehealthFindingId/v1":"51fe7d2bfc0546a9d4e27c07815bed9d316543898c74b42b5a7cf269e89d2410"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.refreshProtectedBoundedRawCaptureIfNeeded (cyclomatic 36): AtriaBLEManager.refreshProtectedBoundedRawCaptureIfNeeded has cyclomatic complexity 36 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34442}}}],"partialFingerprints":{"codehealthFindingId/v1":"b845b3a46118b1bee1da69ddaf1cb0633934a47ab786307024bb9103986275d6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.drainNextHistoricalTransportEventBurst (cyclomatic 36): AtriaBLEManager.drainNextHistoricalTransportEventBurst 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88d8cd0930c9c572ded10639deb4a98bb6c411c3a9e0da7ffa4dca76ec4df21"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.validateTransportAuthority (cyclomatic 36): AtriaHistoricalFullDrainCoveragePolicy.validateTransportAuthority has cyclomatic complexity 36 (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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5017a18e48cc042028d8f53ab671c3569b1d7f9d36620946348414eedc2e3e6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLiveActivityCoordinator.shouldSendActivityUpdateImmediately (cyclomatic 36): AtriaLiveActivityCoordinator.shouldSendActivityUpdateImmediately has cyclomatic complexity 36 (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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"6215b6cbd5bee1d68822da70969cd83c3767ea9a2189051a9d5c2be1764e370d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStrapSetup.evaluate (cyclomatic 36): AtriaStrapSetup.evaluate has cyclomatic complexity 36 (threshold 15). Of this number, 33 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":"Atria/Atria/AtriaStrapSetup.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"984fb9bc44426c05389a60c65a29bf90f83c9ec2bd62e59f3d5cb91abe45e7d1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutRouteStore.recoverPendingTransaction (cyclomatic 36): AtriaWorkoutRouteStore.recoverPendingTransaction 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"1219832fec41d241604bc44f45e6b89e9020bc8ff7c3606d77351aaf8819b8cb"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.motionTickWindowRead (cyclomatic 36): HistoricalArchive.motionTickWindowRead has cyclomatic complexity 36 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3488}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b4ff785f74971f532aa039c388b53ad496ac57629630f5ba5a38fef73ac43df"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmedSleepRespiratoryRateCore (cyclomatic 36): SessionStore.confirmedSleepRespiratoryRateCore has cyclomatic complexity 36 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 16 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43488}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2346ec20622f5e1b140d0b0a4f32cc7bfe1ddf2d1cbbe9376917fc87bd1fc4"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.sleepStageResearchSegmentsCore (cyclomatic 36): SessionStore.sleepStageResearchSegmentsCore 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43794}}}],"partialFingerprints":{"codehealthFindingId/v1":"b755b186311d4a6e2b312cbe7ccf029d2552aa4652649863847fac0ee0cd7b17"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logSleepValidation (cyclomatic 36): SessionStore.logSleepValidation has cyclomatic complexity 36 (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 is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53559}}}],"partialFingerprints":{"codehealthFindingId/v1":"6be2724b16ba2b1968ec1278575819dc6044db7244a8e224b33ded123138f0ed"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.performHRContinuityWatchdogAction (cyclomatic 35): AtriaBLEManager.performHRContinuityWatchdogAction 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25889}}}],"partialFingerprints":{"codehealthFindingId/v1":"842c7068dcfa8221f40cde92b8be7e6374674cae7eefc7986fd819c0ff70dd45"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cyclomatic 35): AtriaBLEManager.centralManager 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55084}}}],"partialFingerprints":{"codehealthFindingId/v1":"869ef07f1013e3b6fd90f3c0c60d57f8bfd8b7ba98115b30110cf40ab18d6650"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaColdSessionFact.validate (cyclomatic 35): AtriaColdSessionFact.validate has cyclomatic complexity 35 (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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd06bcd6d7829f4f322b2d017c4c3a046efa7375dbed1c2e32977d5b6abb631"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredRRProjection.verify (cyclomatic 35): AtriaRecoveredRRProjection.verify has cyclomatic complexity 35 (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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ad3dabb0f0bd54a8bc1de6a8c6500bcf58407dcaa5de770a86a18d5647c89dc"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoryDrainState.receiveFrame (cyclomatic 35): AtriaWhoop4HistoryDrainState.receiveFrame 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":"Atria/Atria/AtriaWhoop4HistoryDrainState.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"94431b3ff3cf5bddd6dba63e5838f88dfc48de1f8511858d50781da9709193c1"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.legacyCompactArchiveDisabled (cyclomatic 35): HistoricalArchive.legacyCompactArchiveDisabled has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 12 belong to 2 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10644}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d48d26818d9c99a21db0e3acec0769871f9b7a587f876bd77168f83cc86df1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleRangeLossBackfillIfNeeded (cyclomatic 34): AtriaBLEManager.scheduleRangeLossBackfillIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b581eb4aed863196780f844d03955ab53d6bebe2f5a6e46d98ae02261908d47b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaColdSessionMigration.migrate (cyclomatic 34): AtriaColdSessionMigration.migrate 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cebf0425b43dddda1c4285bb7b48d5bf16a340c2e252d736f8fcad89cc9db80"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaColdSessionSourceScanner.scanFrames (cyclomatic 34): AtriaColdSessionSourceScanner.scanFrames 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":"Atria/Atria/AtriaColdSessionSourceScanner.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"204d45e0f81634ea579ccea49cb0b87938c5321f971b4c9a0eb8bc336ff0fd9c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaFullFidelityColdSessionStore.persistLocked (cyclomatic 34): AtriaFullFidelityColdSessionStore.persistLocked 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"34785367698f58b7211d9a6949aea7066d91ed60e1e9c39dcc964e4f3bafe170"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.validateTerminalGapReconciliations (cyclomatic 34): AtriaHistoricalFullDrainCoverageStore.validateTerminalGapReconciliations has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"293f5ef78cc01325e2e896a05aa7ddbf99c9fc98734e31cd54eeb8705c13937d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalRetentionTransaction.commit (cyclomatic 34): AtriaHistoricalRetentionTransaction.commit 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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d3a62a3cb169a83e13910a59b84338a242f7ec4f554749469c3fe50a5ad700"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.makeHeroSnapshot (cyclomatic 34): AtriaHomeModel.makeHeroSnapshot has cyclomatic complexity 34 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12877}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b1e84abe3cf9fad6f2a3f589059132332c4d5bc5499a48fe5e90902c00224d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible (cyclomatic 34): AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible 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":"Atria/Atria/AtriaOnboardingHistoryBootstrap.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8a736b491468c1f062cd9adeea0c5ee4fa41e11111a6b4f556db24d689e595"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPhysiologicalStressModel.evaluate (cyclomatic 34): AtriaPhysiologicalStressModel.evaluate 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb5ab915db796616188c1db47c3fdd9731a3ec9f1c9de132f17fed51883ca802"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepWakeResearch.motionContext (cyclomatic 34): AtriaSleepWakeResearch.motionContext 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe00f58aad003a972027cdbfd0603bcb2de4b9f321db3d6631e14fedb9fb498"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.resumeTerminalConsumerProjectionsAfterCrash (cyclomatic 34): HistoricalArchive.resumeTerminalConsumerProjectionsAfterCrash has cyclomatic complexity 34 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"1979f79bfabee3adedadb4bfd17568d59eeb2b8e857d81a5d581d9e9c979b418"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.autoConfirmStrongSleepCandidates (cyclomatic 34): SessionStore.autoConfirmStrongSleepCandidates 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40769}}}],"partialFingerprints":{"codehealthFindingId/v1":"7528d42cd77e0baba6e9f3e3dacfa7123763566805643501b0eac0b73c6bdb9d"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.compactRespiratoryRateEstimate (cyclomatic 34): SessionStore.compactRespiratoryRateEstimate 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43323}}}],"partialFingerprints":{"codehealthFindingId/v1":"1551c11f2804f593ceda68627bacf29fee58e89329a942e38bf1adaeebd68432"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.prepareConfirmedSleepSave (cyclomatic 34): SessionStore.prepareConfirmedSleepSave 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45283}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f8f85bb56bd9a0205ea997a12bf1a6865810c4a641c03b3d85fdf778d7ea32c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.leftoverFlushLines (cyclomatic 33): AtriaBLEManager.leftoverFlushLines has cyclomatic complexity 33 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9071}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b18f2bab23074d510e518100384b05e53cea674177fe17d97937635566d43e8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ResponseEventDataSequenceIfReady (cyclomatic 33): AtriaBLEManager.sendProtectedR10ResponseEventDataSequenceIfReady has cyclomatic complexity 33 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15640}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc5c4317b9c84c7dabf8536e31f6f94e1b1406f2d286590c3f1cc9a4f34f028"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.resumeProtectedR10FromRestoredCache (cyclomatic 33): AtriaBLEManager.resumeProtectedR10FromRestoredCache 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16487}}}],"partialFingerprints":{"codehealthFindingId/v1":"099061dfd1fe450be41a8e2cbe325cde464f732570ef01c3835169337fb23eae"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleProprietary (cyclomatic 33): AtriaBLEManager.handleProprietary 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43176}}}],"partialFingerprints":{"codehealthFindingId/v1":"01f8600e70f3080b87fba87719e01366b42b2de2d552f2d6947114522bc7ee96"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTodayScreen.glanceItem (cyclomatic 33): AtriaTodayScreen.glanceItem has cyclomatic complexity 33 (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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2960}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce4a6f6e20ae924c0ba6e0265ccf5592928f424825d53aaad31459a48d4b3f6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4DailyMotionBankRearmPolicy.evaluate (cyclomatic 33): AtriaWhoop4DailyMotionBankRearmPolicy.evaluate has cyclomatic complexity 33 (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":"Atria/Atria/AtriaWhoop4DailyMotionBankRearmPolicy.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2b6420ac983a407ab18e59f15e47e1fbb34afb362f90b4c2525c93a1dd9212"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickSequenceReducer.reduce (cyclomatic 33): AtriaWhoop4MotionTickSequenceReducer.reduce 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":"Atria/Atria/AtriaWhoop4MotionTickSequenceReducer.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c50fe0be4df0b3e0b66596d1adbe9181fc1de8a2c6e75f15afe1f3de3a9d491e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.updateStrapStreamState (cyclomatic 32): AtriaBLEManager.updateStrapStreamState has cyclomatic complexity 32 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c09512b80fcfd085cb4024b933275c2f437b2d6c55659fe22c51dfbe0e198e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.acceptHeartRate (cyclomatic 32): AtriaBLEManager.acceptHeartRate has cyclomatic complexity 32 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3a7125efa334f23ef8cac427e94dee28baf4e16865e05af93c795e0ea8ad18c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armRealtime (cyclomatic 32): AtriaBLEManager.armRealtime 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40087}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfa96839091d8240df702291a2aac8f1e8257be04c9b474dfa93d67580474a6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.validate (cyclomatic 32): AtriaHistoricalFullDrainCoveragePolicy.validate has cyclomatic complexity 32 (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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"02455c74fd999b279df04c411f9c51751c903d737bc8c3b62c6b88365df2109a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredMotionAnalytics.sleepProvenance (cyclomatic 32): AtriaRecoveredMotionAnalytics.sleepProvenance 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0aa51ec39982dedc58bac60c2b542d0669e1b6204811b0a6d3f316c0660ac22"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutPromptEvaluator.evaluate (cyclomatic 32): AtriaWorkoutPromptEvaluator.evaluate has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 2 belong to one function item 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":"Atria/Atria/AtriaWorkoutPromptEvaluator.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"582b0f7607af096e040b286641bfe9fc37c528bc4c82088e0129a26f8eb519a7"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.resumeFullDrainConsumerProjectionsAfterCrash (cyclomatic 32): HistoricalArchive.resumeFullDrainConsumerProjectionsAfterCrash has cyclomatic complexity 32 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2437}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5912f0bb27400cd951dfc204781fbc15e8f44158ae307719b5bdeddd18dfe5d"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.settleConfirmedMorningAuthority (cyclomatic 32): SessionStore.settleConfirmedMorningAuthority has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 11 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57826}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb2c630f247edb915b9a1e45d9749be38217506616e4be5d081ac33fe0b1ba7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ActivationNowIfReady (cyclomatic 31): AtriaBLEManager.sendProtectedR10ActivationNowIfReady 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15948}}}],"partialFingerprints":{"codehealthFindingId/v1":"82713128e3771f0be009dc41eb3a0b0ba56432739b485bdbbfebaf4971a5c16e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendCommand (cyclomatic 31): AtriaBLEManager.sendCommand 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33373}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa1712e6b81823f22db016ac431359e056389d1e97b1b8602915cfe5e2855e8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.connectedRawHistoryCatchUpRequestAuthorityIsValid (cyclomatic 31): AtriaBLEManager.connectedRawHistoryCatchUpRequestAuthorityIsValid 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37212}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dba9933c88522ec52174c74ba3fdaf613146fc5bf867beacfa954a278fc4ee8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startOneShotHistoryTrimIfNeeded (cyclomatic 31): AtriaBLEManager.startOneShotHistoryTrimIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41546}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d63a4854b824ae51348ae86001f3a3bfa631ee3da2e107134e1a94a1431cb1c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBehaviorImpact.summariesCancellable (cyclomatic 31): AtriaBehaviorImpact.summariesCancellable 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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"c31e6e69cf383be87fa775a4180ac2945de46e11bdfa73703958580a16ef2862"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.recordCompressedStorage (cyclomatic 31): AtriaHistoricalArchiveCatalogStore.recordCompressedStorage 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"39f4524dc4ddc7822b6c19a838ee396ec759f9320e3e961ecab11a6907b0fb9c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSyncProgressFooterPresentation.footer (cyclomatic 31): AtriaSyncProgressFooterPresentation.footer 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":7283}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8181dc3557a0525774e2f478df845c03bbee05f7e8cff7de0a31c3db2be736"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepWakeResearch.stageSegmentsCore (cyclomatic 31): AtriaSleepWakeResearch.stageSegmentsCore 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df9a22a7a327c1c2d4780b9019a6118a3728b7ea25a9ff36411ad3930994ad8"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.quickMetricReadinessProbe (cyclomatic 31): HistoricalArchive.quickMetricReadinessProbe 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3248}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54e001f1524ef8d7c06960ccd0e642deaaf382ff6aadbcd4db4b7a760b1e4a1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaScanRecordParser.parseRecord (cyclomatic 31): AtriaScanRecordParser.parseRecord 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10937}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd7f36e65e48687e9388f1dfc8f1f7736daf8a6fbc26c77af7113707d10f5a8"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.qualifiedLnRMSSDWindowsCore (cyclomatic 31): SavedSession.qualifiedLnRMSSDWindowsCore 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e419bd4127b00c64d31e044c4c765df0b6c2c96b5775c7f84097a234541c940"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.detectedActivity (cyclomatic 31): SavedSession.detectedActivity 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7806}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f97ed03345315215d03abd193cb166147abebbfdf76bafb66b42123c0aca629"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.reducedConfidenceUnconfirmedRecoveryInput (cyclomatic 31): SessionStore.reducedConfidenceUnconfirmedRecoveryInput 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24261}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68bf9a12105c63409e3b218f665e7ac9f166530b77149c0841bae4280ecefe0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.observedHeartRateUnionSecondsCancellable (cyclomatic 31): SessionStore.observedHeartRateUnionSecondsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24381}}}],"partialFingerprints":{"codehealthFindingId/v1":"c12eacfd845e80c2a6a99eedc9c3c9b5b05d5f9150d9dcdf38eb33108dfb76f1"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.homeSavedAggregateCancellable (cyclomatic 31): SessionStore.homeSavedAggregateCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27053}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b33a338b999d2624b2c166b42ebbfa80944fda0fba68e62e32e15c7185c67a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.rearmPersistedInterruptedFullDrainAfterFreshHRIfNeeded (cyclomatic 30): AtriaBLEManager.rearmPersistedInterruptedFullDrainAfterFreshHRIfNeeded has cyclomatic complexity 30 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11876}}}],"partialFingerprints":{"codehealthFindingId/v1":"d334a1ab58245cc19e327b112bff8b9323efe471fa1166284df0a34540310b54"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recordHeartRateMeasurement (cyclomatic 30): AtriaBLEManager.recordHeartRateMeasurement 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31545}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc657b722950b44b822343332ad92a5c0d27ecbadb286d49be1a6e9b47b8148c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalVerifiedConsumerReader.readSource (cyclomatic 30): AtriaHistoricalVerifiedConsumerReader.readSource 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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cfee8d6ad52d15fe4234ea14c8180b306a4663d38e3333175d1f51e0ea7199"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.makeDeferredDetails (cyclomatic 30): AtriaHomeModel.makeDeferredDetails 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13627}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8356334f116333f1fde74f9fe369f4df0ef4ed40a7c10b0a659869d3e52f245"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaR10MotionPipeline.accept (cyclomatic 30): AtriaR10MotionPipeline.accept 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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb803333ad7a7f1e66c7958ccdcbe50b0886f749717a724bad741643ece409e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightEpochFeatures (cyclomatic 30): AtriaWhoop4MotionTickCompactStore.latestNightEpochFeatures 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d76fe1b6ecb6145da56dbd71d0e1a866d1256e94aa439f05608f8aea7187b70"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.verify (cyclomatic 30): AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.verify has cyclomatic complexity 30 (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":"Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f61ceefa78f540c8e864ba5c5f49a44cbfcfd09392ea4a3b2dc8665554ccaa"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataBootstrapSourceImage (cyclomatic 30): HistoricalArchive.automaticRecoveredDataBootstrapSourceImage has cyclomatic complexity 30 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4594}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c87bb59404b8e62c6453834e3ddfc7702daf2ab46e16d4fee59f26b17ada81b"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.loadPointsCancellable (cyclomatic 30): SavedSession.loadPointsCancellable has cyclomatic complexity 30 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 10 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2628}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98a528a571a6bb0429421e9d0edb96f0996817c1c8cada2608e78de8bf76336"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeOverviewTrendPointsCancellable (cyclomatic 30): SessionStore.makeOverviewTrendPointsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20568}}}],"partialFingerprints":{"codehealthFindingId/v1":"74eaffc4fb7d0b1ec4ad6c75e8273f1fede77532c371fe087e0b7d663229d4b2"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.editConfirmedWorkout (cyclomatic 30): SessionStore.editConfirmedWorkout 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35971}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc0f182e15378a726854b4eca541345690ec06a3ee19e6a84c159183ecb8dd4"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.freezingAdaptiveSleepNeed (cyclomatic 30): SessionStore.freezingAdaptiveSleepNeed 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44447}}}],"partialFingerprints":{"codehealthFindingId/v1":"c226c7bb9fe0fff60b3a6cc95dacd9b9d6d447d13a697d9f0b8dd56cd64d3d3d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.evaluatePendingWorkoutHistoricalMotionBankOffload (cyclomatic 29): AtriaBLEManager.evaluatePendingWorkoutHistoricalMotionBankOffload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38805}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb3cb95e2f2b877252cd6207087549d2aab2160928388e91b765dfa925282148"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.completeHistoricalACKAcceptance (cyclomatic 29): AtriaBLEManager.completeHistoricalACKAcceptance 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49388}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12c35a8857ffa4d3a1130bbf07ad6431a798d2a9d00fc64a178a88aef745c6a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.evaluate (cyclomatic 29): AtriaHistoricalFullDrainCoveragePolicy.evaluate has cyclomatic complexity 29 (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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30d60d5db306f7f6e7039ebd2a54075d00d3309e7b5698a9f31f676d60c4a66"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cyclomatic 29): AtriaHistoricalLongTermRollup.validate has cyclomatic complexity 29 (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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"16890826b86643fb80a34d7db0cf09685d9ca8515853b1d500750a76ab2c45db"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressMonitorStore.mergeHistoricalMinuteFacts (cyclomatic 29): AtriaStressMonitorStore.mergeHistoricalMinuteFacts has cyclomatic complexity 29 (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":4030}}}],"partialFingerprints":{"codehealthFindingId/v1":"920e431c6a344769bb89cc4195398f1ce787a868f4c4b5be971e295a51e88aaf"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4ExactRangeTrialHarness.validateStored (cyclomatic 29): AtriaWhoop4ExactRangeTrialHarness.validateStored has cyclomatic complexity 29 (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":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded7d11ca77c7fcb294d645a1f2506d28b7a9d6600280000c84c3be242b6f1cd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoryArchivePipeline.prepare (cyclomatic 29): AtriaWhoop4HistoryArchivePipeline.prepare 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":"Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c76ce3def98b7fa2f9614a2874b75ba436158132f6935daeacaeb1259a4ca3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutRouteStore.reconcile (cyclomatic 29): AtriaWorkoutRouteStore.reconcile 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1346}}}],"partialFingerprints":{"codehealthFindingId/v1":"59911438e3e5b4bb28b8a58654ef451be806bf8bfa1ce324769f24e8980bd7a5"}},{"ruleId":"D1","level":"warning","message":{"text":"HRVAnalyzer.analyze (cyclomatic 29): HRVAnalyzer.analyze 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":"Atria/Atria/HRV.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f6c58118c701c2a507b1b31778e73470d8936357ac87ff69933ec37d2846fa"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.commitPreparedWakeBoundarySleepIfUseful (cyclomatic 29): SessionStore.commitPreparedWakeBoundarySleepIfUseful 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41734}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf90ae12aa329a26d2bfa10bfdb3a124cfed873bd81c0f5cc6274ba26b75f4d9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.rebasedRecoveredConfirmedSleepsCancellable (cyclomatic 29): SessionStore.rebasedRecoveredConfirmedSleepsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44982}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d051bce6a50b2155e4b1ae0578d51f4ed0f73de72b3df83d3945e100be74a39"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaActivityWorkoutDetailSheet.body (cyclomatic 28): AtriaActivityWorkoutDetailSheet.body has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4025}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa6c061deae876330bb433306e965ed82182f2e28d9ec78e09bf49b6d76ce767"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.applyPersistedInterruptedFullDrainAuthority (cyclomatic 28): AtriaBLEManager.applyPersistedInterruptedFullDrainAuthority 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":12023}}}],"partialFingerprints":{"codehealthFindingId/v1":"821183191c8c164de453cc17a8c09220a3a18dc35af7b2459a6b9e359e3bbee6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.beginIdleWindowHistoryTransportWithoutHeartRateRediscovery (cyclomatic 28): AtriaBLEManager.beginIdleWindowHistoryTransportWithoutHeartRateRediscovery 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":12782}}}],"partialFingerprints":{"codehealthFindingId/v1":"6826d07b5e9220801288e0b43338f94b9e7f279f47e1e47865e45b2fd2b97a20"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleConnectedRawHistoryCatchUpContinuation (cyclomatic 28): AtriaBLEManager.scheduleConnectedRawHistoryCatchUpContinuation has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":20076}}}],"partialFingerprints":{"codehealthFindingId/v1":"568b7694da903555d1a050727dbc37123ff500e7648440672955a84a6919cf6c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaFullFidelityColdSessionStore.adoptStreamingSourcesLocked (cyclomatic 28): AtriaFullFidelityColdSessionStore.adoptStreamingSourcesLocked has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 13 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfcdee0ffcce07818ebf636804fcb6443a28c68db5cb6ae84514da6719764c17"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.updateWorkoutDetectionPrompt (cyclomatic 28): AtriaHomeView.updateWorkoutDetectionPrompt has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3949}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e302b3235bc706d7af48fd1e874a0aa3b74c4f85296fb2a3b2190d5e210a702"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.notifyDecision (cyclomatic 28): AtriaIMUDiagnosticTransport.notifyDecision 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"18aa7beebf23819caa9ad55798591223e5a4cbdd9d7f9d9b616bcc612a3e5c55"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPreparedMetricHistory.init (cyclomatic 28): AtriaPreparedMetricHistory.init 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9109}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fbd51e61c1cddc015aad71d530944d565184be91615450e78e5270084a2ef2f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredHeartRateProjection.projectCancellable (cyclomatic 28): AtriaRecoveredHeartRateProjection.projectCancellable has cyclomatic complexity 28 (threshold 15). Of this number, 21 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f63fb539ba4ebf53c107a3e11b1221a4b7a3eaad68702dd582bb87022563ccf"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStrapStepLedger.isValid (cyclomatic 28): AtriaStrapStepLedger.isValid 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0e63fd0b015bf66144093d3d99e54e75ac762b4acffb649dcb0456aa39ef50"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.autonomousGaitBouts (cyclomatic 28): AtriaWhoop4GravityCadenceStepModel.autonomousGaitBouts has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 8 belong to one function item inside it that branches. 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca05cd8e9c51fa47a106def9fd4814061f1ab71ce70f2c3aae9bb6aebd13912"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.detectedSleepOrRestActivityCancellable (cyclomatic 28): SavedSession.detectedSleepOrRestActivityCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7894}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41beb73fb53c611534f7419791cbde408a53c13d0badeb9d1b1c6f9b67681a9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.physiologicalCycleStrainByDisplayDayCancellable (cyclomatic 28): SessionStore.physiologicalCycleStrainByDisplayDayCancellable has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 5 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13686}}}],"partialFingerprints":{"codehealthFindingId/v1":"c89b94e0c97ec29f4d9105a69e7954ce358bb1b5fcf6f4181bf673e888173a46"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeTodayHRZoneMinutesCancellable (cyclomatic 28): SessionStore.makeTodayHRZoneMinutesCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20805}}}],"partialFingerprints":{"codehealthFindingId/v1":"e44ad8921ea1bb5a8f60f9aab43b89cc87a1c2ba225d7de2999ea5f863e30ce8"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeIncrementalRecoveredHistorySnapshots (cyclomatic 28): SessionStore.makeIncrementalRecoveredHistorySnapshots 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21143}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c83310b47ba6ec60f144faf0a9731f0e782feb659471e7147746e58e1069b44"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scheduleSleepReviewCacheRefresh (cyclomatic 28): SessionStore.scheduleSleepReviewCacheRefresh 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":36749}}}],"partialFingerprints":{"codehealthFindingId/v1":"73f563464dce2f6319e11d140452664a594c18435d85a45a131ce61a308cfd52"}},{"ruleId":"D1","level":"warning","message":{"text":"ActiveSessionJournal.saveIncremental (cyclomatic 27): ActiveSessionJournal.saveIncremental 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce243d71929b4c0b7407a0149b99449250d4281203bed6ef535dc038ed1877c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaApp.body (cyclomatic 27): AtriaApp.body 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7409b51b100bebdfd7adb0ba91a92757ab5492315a736b7f0dcf0559283fbe"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaApp.handleBackgroundTask (cyclomatic 27): AtriaApp.handleBackgroundTask 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b70cbfa18e05a4c109844f03c85fa8362a72a235abd895851abe2bf740f0c7a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recoverAcceptedHRWatchdog (cyclomatic 27): AtriaBLEManager.recoverAcceptedHRWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26490}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d63df815dc401c76904ddfee3454e59f9b2359f581a40bba81243fcd8af48a0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armConnectedRealtimePreservingHistoryBudget (cyclomatic 27): AtriaBLEManager.armConnectedRealtimePreservingHistoryBudget 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37410}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e16f01ac262e4dd32347e1e0f4cc1174fde89b52e6708136e17db014825904a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleTerminalConsumerMaterializationIfAuthorized (cyclomatic 27): AtriaBLEManager.scheduleTerminalConsumerMaterializationIfAuthorized 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49004}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c9f39978da3a4b505232459c0feeac0b11a46c39b0714793f647b6b95a0d42"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.resilientHistoryDrainSeekUnix (cyclomatic 27): AtriaBLEManager.resilientHistoryDrainSeekUnix 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2820}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5802103b0521e15d0453e097b784ed16ad736cde8263fb85f3b42b2647e37c0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerDestinationStore.verify (cyclomatic 27): AtriaHistoricalCanonicalConsumerDestinationStore.verify 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd215514c90abf3dc60e61c34fac05b89999ebdc1e03f0ed557a7a422381908c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalJSONLRecentScanner.scan (cyclomatic 27): AtriaHistoricalJSONLRecentScanner.scan has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 7 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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"87836ee6ffd09784628171eccdcf8c04b75282098290312236be7173f6f00321"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalReplayIdentityShard.verifyRetainedReceipt (cyclomatic 27): AtriaHistoricalReplayIdentityShard.verifyRetainedReceipt 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":"Atria/Atria/AtriaHistoricalReplayIdentityShard.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f82e7fca573e7e4e49e8c0072dd2b2fa95d92133a55bc8b8351fca92863e9c3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalWorkoutProjection.detectCandidates (cyclomatic 27): AtriaHistoricalWorkoutProjection.detectCandidates has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"da88fa7ae86ec8daffb7f094758cf9b5c5d80a7ede06a11056d17d915e6c32a7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.updateLiveActivity (cyclomatic 27): AtriaHomeView.updateLiveActivity 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3533}}}],"partialFingerprints":{"codehealthFindingId/v1":"4491945f1bdd77efe146aec665ef6002118b54f16c568571cb80314c27623ade"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLiveWorkoutView.workoutActionsCard (cyclomatic 27): AtriaLiveWorkoutView.workoutActionsCard 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2845}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6e9ba82fb615b6c67df39b1a5f0ffab060ff63bebed69dd11d34e06055cfae8"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.canonicalizeAutomaticRecoveredDataBootstrapEvidence (cyclomatic 27): HistoricalArchive.canonicalizeAutomaticRecoveredDataBootstrapEvidence 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5198}}}],"partialFingerprints":{"codehealthFindingId/v1":"df49147373db8dc3395ff742638c5953ce97363978086b4b8a2120bfe467a6d1"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.gravitySample (cyclomatic 27): HistoricalArchive.gravitySample 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9273}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd4259f33ba492fed30d126fca7f22108c729f28c8d7382d9947020a62d1277"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.sleepRespiratoryRateCancellable (cyclomatic 27): SavedSession.sleepRespiratoryRateCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc90165f090a9c3080f6ad3c983b659bb506c25d832918e37489e967caacac48"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scheduleConfirmedWorkoutStepEvidencePublication (cyclomatic 27): SessionStore.scheduleConfirmedWorkoutStepEvidencePublication 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20190}}}],"partialFingerprints":{"codehealthFindingId/v1":"02270385d389c5d50d417c80fb4dbdb52ac23850cf3bc90538e6b96c7b10e7e3"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeHistorySnapshotsCancellable (cyclomatic 27): SessionStore.makeHistorySnapshotsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20953}}}],"partialFingerprints":{"codehealthFindingId/v1":"251030db70980348d16d236578d02ae708f848ce8fb02d4ae76e97e18d7e00ac"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeSavedDailyMetricsCancellable (cyclomatic 27): SessionStore.makeSavedDailyMetricsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23333}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e83f3871d59aa887ecc2e7643621dd8d959a915e90a14a9e81886cc418bef6"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.compactHistoricalArchiveIfUseful (cyclomatic 27): SessionStore.compactHistoricalArchiveIfUseful 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28569}}}],"partialFingerprints":{"codehealthFindingId/v1":"94567d7753633a806431aaeebf06da1eb618491f9bf64eb259d4eb15e9efc037"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.rebasedConfirmedSleepsCancellable (cyclomatic 27): SessionStore.rebasedConfirmedSleepsCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44908}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7adf149d17cedcd910ae58d657ee1a0e6a4b32a1da65f3def69e7838a2a8f22"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.deferredLaunchCardSettlementMatches (cyclomatic 27): SessionStore.deferredLaunchCardSettlementMatches has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57511}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20c5973a4e93bee00f11fc3ea5922635929c476de543144d216263b44622020"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.noteLeftoverFlushNotifyState (cyclomatic 26): AtriaBLEManager.noteLeftoverFlushNotifyState 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8952}}}],"partialFingerprints":{"codehealthFindingId/v1":"8940883b176efc36c7e5c035e573bf4fd0b692f337c400f7349b9c7cd388788a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.requestOnboardingPairingPreflightIfNeeded (cyclomatic 26): AtriaBLEManager.requestOnboardingPairingPreflightIfNeeded has cyclomatic complexity 26 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14783}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af8459268d9c83c51f33c069229dd9da0251c87e6f3071fe334c1a2064a0644"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleOfficialGen4CompactOnStream5LinkUp (cyclomatic 26): AtriaBLEManager.scheduleOfficialGen4CompactOnStream5LinkUp 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24356}}}],"partialFingerprints":{"codehealthFindingId/v1":"f28fcc00d980ad06118bf44d2e5d8aacfacef35ed8437d8b3e98eaf62d228b87"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.retryProtectedR10ShortBurstIfEligible (cyclomatic 26): AtriaBLEManager.retryProtectedR10ShortBurstIfEligible has cyclomatic complexity 26 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34777}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2817437ae90555792f21c3e5b0a66f876de9331f1cdf9cd8daedda475d624c8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.gate4DailyBankRearmPolicyInput (cyclomatic 26): AtriaBLEManager.gate4DailyBankRearmPolicyInput has cyclomatic complexity 26 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36640}}}],"partialFingerprints":{"codehealthFindingId/v1":"555168ee6699712006fa9e7a51e2f6a90755ddb8514041cf4f320c885e61e507"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleUnknownProtocolPayload (cyclomatic 26): AtriaBLEManager.handleUnknownProtocolPayload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43712}}}],"partialFingerprints":{"codehealthFindingId/v1":"282d057aeb16c23becc3997e5a1183ce8ff5fe956b8953b3349e0d2a05fb45d1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalLongTermStore.verifiedRetirementCandidates (cyclomatic 26): AtriaHistoricalLongTermStore.verifiedRetirementCandidates has cyclomatic complexity 26 (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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"13449673369968d28eb243e620d1a75038cbf80f124a322bbe23a83d8939fd72"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaIrregularRhythmAssessment.evaluate (cyclomatic 26): AtriaIrregularRhythmAssessment.evaluate 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":"Atria/Atria/AtriaIrregularRhythm.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce8b153ed185b399dfe1956d2d1a1bbb971f5d5a12900916e7c5cbb4bd72d5f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.qualifiedActivityContexts (cyclomatic 26): AtriaHistoricalStressReplay.qualifiedActivityContexts 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2382}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac46d144821226c27dff3a18bc052aa0d74863e53903a499ea63c3f983b98377"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.appendRecoveredRecord (cyclomatic 26): HistoricalArchive.appendRecoveredRecord 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6765}}}],"partialFingerprints":{"codehealthFindingId/v1":"728a644a4fa53bc4fea6e2041e306107e94541eb171034d03c147f2a69098a2f"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.exactMetricHeartRatePoints (cyclomatic 26): HistoricalArchive.exactMetricHeartRatePoints has cyclomatic complexity 26 (threshold 15). Of this number, 19 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7564}}}],"partialFingerprints":{"codehealthFindingId/v1":"b33b48c39c6e7501e646f194039d2cdb369f3882cfd4eed6e963cc186d1f070c"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.stressReplaySessionInputShrank (cyclomatic 26): SessionStore.stressReplaySessionInputShrank has cyclomatic complexity 26 (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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":9063}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5cf729eeb72cdfb4b536fa18a71ae332a4486eefe3f6215559cb184a6bf991"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.stressReplaySessionInputGrew (cyclomatic 26): SessionStore.stressReplaySessionInputGrew has cyclomatic complexity 26 (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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":9102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52c4e6da88d70ccb278ff3fd9c56201e7004c7ceea49fd14f7519c71b88f9a4"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.refreshHistorySnapshotCache (cyclomatic 26): SessionStore.refreshHistorySnapshotCache 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":11739}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ac9c0f76a9423e61f6b05f5eb7897fc82d6639d92329e80f8bdf5df8702859"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe (cyclomatic 26): SessionStore.scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":12099}}}],"partialFingerprints":{"codehealthFindingId/v1":"b598dde3ea223a2974cfcc237563d67301a1c95c278db97530671948a2007af5"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.mergeCanonicalHistoricalDetectionsCancellable (cyclomatic 26): SessionStore.mergeCanonicalHistoricalDetectionsCancellable has cyclomatic complexity 26 (threshold 15). Of this number, 24 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21391}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57f54edc026479398cb3c5296c55e072eb302b3afe3dad0ad2d84fd4ad4b633"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.mergeDailyMetricHistory (cyclomatic 26): SessionStore.mergeDailyMetricHistory 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23591}}}],"partialFingerprints":{"codehealthFindingId/v1":"9188e75b367f73c21fa5b17f0dd3e7992d93b19237d6607eb8f774f8035735a0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.deriveInsightsCancellable (cyclomatic 26): SessionStore.deriveInsightsCancellable has cyclomatic complexity 26 (threshold 15). Of this number, 23 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":25028}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e74ab98e02168b2a640b6b111bd4be838116361b550ade5c6ab335f344759ea"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.pendingSleepRecoveryEstimate (cyclomatic 26): SessionStore.pendingSleepRecoveryEstimate has cyclomatic complexity 26 (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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26094}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96b30496e911a6720956971e36034ce61db289e4fb2776eb5d17efbffb303a0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.biologicalAgeSummary (cyclomatic 26): SessionStore.biologicalAgeSummary has cyclomatic complexity 26 (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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52456}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad68d70a0d65fca549f0e4bf5ddd1787f1444f0e17c09ea4d9a8d6016c46c1c8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.requestStrapStatusRead (cyclomatic 25): AtriaBLEManager.requestStrapStatusRead 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10451}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebfb9f0fde6806be88bfc1216a1272d3f6fa0f85f39014c9c89687f71acdecf"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.logClockCommandResponse (cyclomatic 25): AtriaBLEManager.logClockCommandResponse 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32138}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3dc59751a770d66165ee82a748d7e1accb8d16ca57b1d08e5c62713d440e9d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDailyStepPresentation.detailText (cyclomatic 25): AtriaDailyStepPresentation.detailText 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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3cb63d73c2140210affc357883590f179343b4ccc78d43f75b5d84a7a1cfe4"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDaytimeQuiescentSleepDetector.detect (cyclomatic 25): AtriaDaytimeQuiescentSleepDetector.detect 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":"Atria/Atria/AtriaDaytimeQuiescentSleepDetector.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"c253079bb432b0af6f0d6aae9d2209328b117621c6f4f5e8c1fa6f786bf94229"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.loadValidatedDerivedIndex (cyclomatic 25): AtriaHistoricalArchiveDurableStore.loadValidatedDerivedIndex 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"80dd37f2ebb03ec382bafb6dea5b62ec3fffd03ffe1c8e05ddef8c8488637872"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordCommittedConsumers (cyclomatic 25): AtriaHistoricalFullDrainCoverageStore.recordCommittedConsumers 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1129a10635bf9fabb8f1dd7a052f462528772aed48ad5d54ac1e2c10e615a2"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cyclomatic 25): AtriaHistoricalLongTermRollup.validate 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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa4003c77fa783245e13dd59dd71db1bfc6dbc5c2e7e7adca9a15dec2670836"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.writeDecision (cyclomatic 25): AtriaIMUDiagnosticTransport.writeDecision 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be7a73e0a5dd4324bebc2e1fecac0ce4bfc2cbbb63726161406b12e4737a720"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStrapStepLedger.reconciledCheckpoint (cyclomatic 25): AtriaStrapStepLedger.reconciledCheckpoint 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3c47469e8a7f1491478e1c8597f96e595849de1f672f1cda6fc0c4be1b82b1b"}},{"ruleId":"D1","level":"warning","message":{"text":"HealthKitExporter.plannedCounts (cyclomatic 25): HealthKitExporter.plannedCounts 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a23e463aaad1a4c14e4f3a8f20ed922d49806370d0bfbf72a5843cdca0b783"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine (cyclomatic 25): HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine 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 shape REPEATS in the file: one other method here (HistoricalArchive.motionTickDayEvidenceReadImpl) 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3813}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbffb87ce252095c12e418768fa0fa122a41535e8c2f660f25dbc8809ec59714"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataCacheAuthorityRestorationPlan (cyclomatic 25): HistoricalArchive.automaticRecoveredDataCacheAuthorityRestorationPlan 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4394}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b244e625604763375937775fc82edc4d9cde5e816bfdc564cd40cf76ff9a5be"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeHistoryTrendSummariesCancellable (cyclomatic 25): SessionStore.makeHistoryTrendSummariesCancellable 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22456}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa796f6cbfbdff1fe8d5e43c19bf6f3a2fa01dc001ff5346d155ee02382ec82a"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmSleepHistoryNight (cyclomatic 25): SessionStore.confirmSleepHistoryNight has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38198}}}],"partialFingerprints":{"codehealthFindingId/v1":"440dbce2e1d180877ab9467cf4150376a5cec01e72b054c137c7ce05ffd24c82"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.beginFreshHistoryOwnerCutover (cyclomatic 24): AtriaBLEManager.beginFreshHistoryOwnerCutover 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14590}}}],"partialFingerprints":{"codehealthFindingId/v1":"7253203734835d59b5a3ab13ccd3089e59669503202de848c3a2be9a87085295"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startScan (cyclomatic 24): AtriaBLEManager.startScan 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27296}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf6cb9a882397ca16a00cd26c585c5bc0a6b9b3c2947b0af8c7874c5a537ba7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armFullDrainAuthorityAfterHistoryStart (cyclomatic 24): AtriaBLEManager.armFullDrainAuthorityAfterHistoryStart has cyclomatic complexity 24 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44911}}}],"partialFingerprints":{"codehealthFindingId/v1":"959e10a2de81d615b0855ecc1cffe4331b5ecc0284945438f7ba3684f60aac1b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaManifestedColdSessionCompaction.compactAndRetire (cyclomatic 24): AtriaManifestedColdSessionCompaction.compactAndRetire 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0baaa7797b881b6fcc627a8572c45bdb62aa0f9b8e49e3a2905d077434ee04"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.validatedInspectionEvidence (cyclomatic 24): AtriaHistoricalActivityProjection.validatedInspectionEvidence 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfe9f347211a4c6d29673505afcab749fc18e7eac448795ba3e2cc607721698"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.validatedCurrentSet (cyclomatic 24): AtriaHistoricalConsumerReceiptLedger.validatedCurrentSet has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"2124f46eb3b690527d2624cb7ecf6a253973ed3de72cd25490dbedec0bcf10a6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGeneratedArtifactGC.planReceiptDirectory (cyclomatic 24): AtriaHistoricalGeneratedArtifactGC.planReceiptDirectory 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":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c2245660a7e27cf42dbf2c7abe6873d3546db96ac9205872c07a2d16e1eb5f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalSealedJSONLCompression.commit (cyclomatic 24): AtriaHistoricalSealedJSONLCompression.commit 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b0138de3ef0a8161f750e7f15860fd86b7d445bbf1b7c0917a0c69bfd801ca"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalSleepProjection.detectCandidates (cyclomatic 24): AtriaHistoricalSleepProjection.detectCandidates has cyclomatic complexity 24 (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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"b78b7b4363da7cdccbb4e48b44a9022337f9e54503737e2ec913fe0c84d5ca4a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.scheduleLiveSensorWidgetPatch (cyclomatic 24): AtriaHomeView.scheduleLiveSensorWidgetPatch 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3860}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9cb3c97eaa84bd863afbed64f55961ad3af83f336be5dedb30f6bb619dbe423"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaConnectionDiagnosis.derive (cyclomatic 24): AtriaConnectionDiagnosis.derive 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14794}}}],"partialFingerprints":{"codehealthFindingId/v1":"46560bb0b4ec3b3c9bb1a85b235286b44c2f40740aa3f900185abd793ffe7018"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaNightMinuteBuilder.build (cyclomatic 24): AtriaNightMinuteBuilder.build 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":"Atria/Atria/AtriaNightMinuteBuilder.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01b02c21cc0fef06818cfc596c8b62e1448bd6a53fc62d235e3281cf16effd5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.fillingHeartRateHoles (cyclomatic 24): AtriaHistoricalStressReplay.fillingHeartRateHoles has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 11 belong to 2 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1813}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4f48ff66a8f2b732ea6ffe8194ad5916edcbdaec64a5f0e65fc85304047db3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaShortWindowRMSSD.value (cyclomatic 24): AtriaShortWindowRMSSD.value 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":"Atria/Atria/HRV.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c29863b59ee94c08692943f73796a4197bff8e6f2cd1d8ab18b95679844951c"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.motionWindowReadableFileURLs (cyclomatic 24): HistoricalArchive.motionWindowReadableFileURLs has cyclomatic complexity 24 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8014}}}],"partialFingerprints":{"codehealthFindingId/v1":"c22324251796bdecddc17dbe20264f196dced910ea2dfccbd066693a7399b49a"}},{"ruleId":"D1","level":"warning","message":{"text":"AutomaticRecoveredDataBootstrapCheckpoint.init (cyclomatic 24): AutomaticRecoveredDataBootstrapCheckpoint.init 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67cf234f815217de58a916bf330fa866b3ca032ef64bc86e5b824b40f63f17e"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalNotificationScheduler.schedule (cyclomatic 24): LocalNotificationScheduler.schedule 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"34cfacf21ab896319013911f727f4606a2e6093c256625c68e6e939d66735c91"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.qualifiedLnRMSSDCore (cyclomatic 24): SavedSession.qualifiedLnRMSSDCore 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1978}}}],"partialFingerprints":{"codehealthFindingId/v1":"247cdfe8e834b8ddf3a7c1d56cc4a4796dd5f707deb98705ffad7d4e5c9962d1"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.dailyLoadTRIMPCancellable (cyclomatic 24): SavedSession.dailyLoadTRIMPCancellable 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2481}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d1a4747c8f2f1e8046bd879b1e6b22d22b788e8c286cf5c60c9c3b8985d8f24"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepStageIntegrity.validatesCancellable (cyclomatic 24): AtriaSleepStageIntegrity.validatesCancellable 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4203}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c7a7879f5a6b1cbf5b2b98b6d477de65d7afde56dcb2c06a45dfdb3d604ee7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.protectedR10RecoveryDecision (cyclomatic 23): AtriaBLEManager.protectedR10RecoveryDecision 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4063}}}],"partialFingerprints":{"codehealthFindingId/v1":"68e5a308fe3be2716b5172eecfd274f28107c9b1dfe68ccfa0432a28fef496a7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.allDayPassiveInProcessRequalifyShouldAttempt (cyclomatic 23): AtriaBLEManager.allDayPassiveInProcessRequalifyShouldAttempt has cyclomatic complexity 23 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4747}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc1671c1b81c50d8b5ddc0cce7bb22bc42631db11aae9a1ebda0738f882c92d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.updateDutyCycleState (cyclomatic 23): AtriaBLEManager.updateDutyCycleState has cyclomatic complexity 23 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10326}}}],"partialFingerprints":{"codehealthFindingId/v1":"34e1c443e17269c827269f4ce22555862e67f30c123b0bb6bfcf134dce8bf90a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.median (cyclomatic 23): AtriaBLEManager.median 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31761}}}],"partialFingerprints":{"codehealthFindingId/v1":"4217dbd7b6f2b97e13b46a5fd0920f5406e646ef7e0c6e9e152b675e8c65f2e7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recordResearchProbeCandidate (cyclomatic 23): AtriaBLEManager.recordResearchProbeCandidate 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44592}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c5514faf73196746604771044c15961b8e72bb8f19d1f1f71991826b813bb0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleHistorySequenceConfirmationRetry (cyclomatic 23): AtriaBLEManager.scheduleHistorySequenceConfirmationRetry 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46370}}}],"partialFingerprints":{"codehealthFindingId/v1":"a90519d008dc6abe79011f3cff7a0a75cb9ea0bdc734bbd24343d42ed940b1a8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.batteryBoundaryEventIsIndependentlyCorroborated (cyclomatic 23): AtriaBLEManager.batteryBoundaryEventIsIndependentlyCorroborated has cyclomatic complexity 23 (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":"Atria/Atria/AtriaStrapPowerPolicy.swift"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd975be91c7e316d39fc1fb501e3251696fa3c31b6447c9e15c9d718a3671d0c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBehaviorImpactPresentation.model (cyclomatic 23): AtriaBehaviorImpactPresentation.model 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":"Atria/Atria/AtriaBehaviorImpactPresentation.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b211a27c8dd9e2e405115de55ab4b54ce2bd3828308cb6f83bab417f9e9b219"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalog.validate (cyclomatic 23): AtriaHistoricalArchiveCatalog.validate has cyclomatic complexity 23 (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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e72f773ad36fae34e9de13560ac58800e44a842d916171208e1555c9057fc3e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decoratedIdentity (cyclomatic 23): AtriaHistoricalArchiveDurableStore.decoratedIdentity has cyclomatic complexity 23 (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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":2362}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b3fcc01b4819946693f357e6eb2036c923dfbfa7ce5a2b41dfc841c52aafce"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.stepDays (cyclomatic 23): AtriaHistoricalDailyConsumerProjection.stepDays has cyclomatic complexity 23 (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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b7f349ad3546ebded9c9480d853c280c3fe076859619bc37fce2b25390cd298"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalSessionInspectionProof.validatedEvidence (cyclomatic 23): AtriaHistoricalSessionInspectionProof.validatedEvidence 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"c850d5d4be2a65422c4f46de9cee8a747125ed473688ea2819d460d67a88842b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaJournalInsights.insightsCancellable (cyclomatic 23): AtriaJournalInsights.insightsCancellable 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":"Atria/Atria/AtriaJournalInsights.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"03caa2f6317c2acf919a89c087958bb2376fa50d916234711d85a0bdb43a7dbc"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLearnedInsight.emphasisLabel (cyclomatic 23): AtriaLearnedInsight.emphasisLabel has cyclomatic complexity 23 (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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"0505d90fe366905fe2d64c5e75cf0ac71417be1571c4588636f111867b37df95"}},{"ruleId":"D1","level":"warning","message":{"text":"MinuteFact.isStructurallyValid (cyclomatic 23): MinuteFact.isStructurallyValid has cyclomatic complexity 23 (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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0d0473a23d10d7364d4c85f9f3456065f6ec1a7ed17b8be657ed1eaee8fdef"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.observe (cyclomatic 23): Tracker.observe 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":"Atria/Atria/AtriaStrapSetup.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"e098dc2048dc992d498a7eb049c5c5c4994ca544e831b923c89d277d56d5ebbe"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightReceiptIsCurrentLocked (cyclomatic 23): AtriaWhoop4MotionTickCompactStore.latestNightReceiptIsCurrentLocked has cyclomatic complexity 23 (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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"067ab561be293c1d7bc80143ae6c128bb732812665d6384f784afd576c0f0067"}},{"ruleId":"D1","level":"warning","message":{"text":"HealthKitExporter.queryHeartRateExportReadback (cyclomatic 23): HealthKitExporter.queryHeartRateExportReadback 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4abe8182ae5420419ad5d34533938076468ab584dcff61dbfb086dd4e377f67"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.readVerifiedCanonicalConsumerSourcePage (cyclomatic 23): HistoricalArchive.readVerifiedCanonicalConsumerSourcePage 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6122}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd428f2eac12fba0213cac830d278e6f7e3a5213b33916c99ba5e7e0a2e37ce"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.runRecoveredVerifiedActivityShadowStep (cyclomatic 23): SessionStore.runRecoveredVerifiedActivityShadowStep 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19241}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8a057e695bdd4d55b61327886a014240e71c5cada1daf1397bb2d72a4ee1d73"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeDailyRollupStoreEntriesCancellable (cyclomatic 23): SessionStore.makeDailyRollupStoreEntriesCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24073}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7bfe3b0b7b821f6f629fe2dc23c908d64def03003878a915e17f423c63957e"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.archiveOnlyHeartRateSegments (cyclomatic 23): SessionStore.archiveOnlyHeartRateSegments 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27526}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e12dfbb897249e69a92903cdac0beaf6f0e7d95468b906c84f14a993613400"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmBestWorkoutCandidate (cyclomatic 23): SessionStore.confirmBestWorkoutCandidate 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33666}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea5ab67eb47f91c5e8dc3c0a61a67e4c61052bc0d0a9b5beb35fb861c08d03e"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.boundedSleepReviewAuthorities (cyclomatic 23): SessionStore.boundedSleepReviewAuthorities 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37118}}}],"partialFingerprints":{"codehealthFindingId/v1":"b29526885cfd786be0092a91d31f288aa5409763953ab39c0eb777fc31bf1bc4"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.sustainedWakeOnsetCore (cyclomatic 23): SessionStore.sustainedWakeOnsetCore has cyclomatic complexity 23 (threshold 15). Of this number, 18 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41289}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc86fc91b50f28f43facf06ccc6718c5847602cb78be6967e644c04a9d91de7f"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmedSleepWindowMetricsCore (cyclomatic 23): SessionStore.confirmedSleepWindowMetricsCore 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43185}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6ca22b7dfe7fd23aaef31830f5822cc6c5fabf82bdd901a106e6aca40c2867"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.windowedWorkoutCandidates (cyclomatic 23): SessionStore.windowedWorkoutCandidates 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49467}}}],"partialFingerprints":{"codehealthFindingId/v1":"68eaf79ca2d83af9811f64d90e79bd590f6db4302a14e41e773926aa35edec28"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.cooperativeRecoveredMotionSleepProvenance (cyclomatic 23): SessionStore.cooperativeRecoveredMotionSleepProvenance 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51405}}}],"partialFingerprints":{"codehealthFindingId/v1":"0025762c491a6c4a15cd155ebf5337ff1217a4c3af5c7048dc0efffae556d1f7"}},{"ruleId":"D1","level":"warning","message":{"text":"Strain.contiguousSegments (cyclomatic 22): Strain.contiguousSegments has cyclomatic complexity 22 (threshold 15). Of this number, 21 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b57d373da363de63f060f6a5b9a22419d3b67dd8ae654722e91341a63af626"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.allDayCompactIMURecoveryStep (cyclomatic 22): AtriaBLEManager.allDayCompactIMURecoveryStep 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33023}}}],"partialFingerprints":{"codehealthFindingId/v1":"45984aa664836d42936057eea8cfd18b595e9624b16cef0c0b5cfe41b4693b2b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldAllowProtectedTransportCommand (cyclomatic 22): AtriaBLEManager.shouldAllowProtectedTransportCommand 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33336}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7baea41aed581fe190c725e2b05d56abd1cb3a5698555da1f1f141f4393ec15"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendHistoryCommandAwaitingWriteConfirmation (cyclomatic 22): AtriaBLEManager.sendHistoryCommandAwaitingWriteConfirmation has cyclomatic complexity 22 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33671}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceb27f51b9618ea6310079a74cefd58bcaba2fbce3625c17f4601e5056bfc092"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.reconcileAdditionalTerminalFullDrainGaps (cyclomatic 22): AtriaBLEManager.reconcileAdditionalTerminalFullDrainGaps 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47774}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec28652ca887fab5ce57380d6ca6cbee005e7bef6a7357e5d7e6d53951fe956d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.parseProprietaryUpdate (cyclomatic 22): AtriaBLEManager.parseProprietaryUpdate 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57667}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa74a773e56c0834a1ae412a0d52f1c0ca915f18b82b1811f2da9e01f73447c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalActivityInspectionProofFactory.prepareVerified (cyclomatic 22): AtriaHistoricalActivityInspectionProofFactory.prepareVerified 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b053f414e962d2a4accdfc8c195850b4bf61caa08986df359eabd97421d110"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalAggregateChunk.validateForCommit (cyclomatic 22): AtriaHistoricalAggregateChunk.validateForCommit 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":"Atria/Atria/AtriaHistoricalAggregateChunk.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"09bbf0ad398ea3e37bc315955159fcf94aab7364542e41d02546327d8c03136d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.flush (cyclomatic 22): AtriaHistoricalArchiveDurableStore.flush 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"578bc44f3bd82c22fbabb79fcec3117df92123f954d1c23dc9e3874b4cea7864"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerApplicationStore.loadCurrentLocked (cyclomatic 22): AtriaHistoricalCanonicalConsumerApplicationStore.loadCurrentLocked 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d63aeb4ae0f1be51afdff9d564370008a059bff8d465572759279f2138260c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.validatedInspectionEvidence (cyclomatic 22): AtriaHistoricalDailyConsumerProjection.validatedInspectionEvidence 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"8225ccdb58d9cf5496f5c62702089a910787f8a7db989d4183a698d286f72f16"}},{"ruleId":"D1","level":"warning","message":{"text":"TransportAuthority.isValid (cyclomatic 22): TransportAuthority.isValid 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"421de7e5a94f3f6c84b63a646d6d8df5de57a105fedaf8f3017fd87a3800c2b7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordHistoryEndFsynced (cyclomatic 22): AtriaHistoricalFullDrainCoverageStore.recordHistoryEndFsynced 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e5d931f44a2c773b9bebed6f98ddc537e86052d422a0aab47f5244136332da"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.overviewContent (cyclomatic 22): AtriaHomeView.overviewContent 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6066}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ddcf60b668dde2018a704e921cd232638034852c2453b285b581c180c1382a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaShareSheet.canvasButtonLabel (cyclomatic 22): AtriaShareSheet.canvasButtonLabel 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"409217b9140092cbd103d63b27bb1bafb2f9c6803c213af204e45173abda134c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTodayScreen.body (cyclomatic 22): AtriaTodayScreen.body 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f53447e010402708814717efa5bd6fcfd54950b4d09f031bdac534342518ae5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection (cyclomatic 22): AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection has cyclomatic complexity 22 (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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2252}}}],"partialFingerprints":{"codehealthFindingId/v1":"44cc65c01ded7089a25e1e81a514dfe7ec3e746a286f2f363ba101156285411e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutRuntime.applyPendingActions (cyclomatic 22): AtriaWorkoutRuntime.applyPendingActions 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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed9ec492a7f62e50031028bbb36e41630bc91270c8a4a889d681d8c530dce6f7"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.makeAutomaticRecoveredDataBootstrapCheckpoint (cyclomatic 22): HistoricalArchive.makeAutomaticRecoveredDataBootstrapCheckpoint 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5027}}}],"partialFingerprints":{"codehealthFindingId/v1":"7009b78742a4d648401612cdd2b2d11954448f39bae1ebb40831c127a62b17b1"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.loadHeartRateSamples (cyclomatic 22): HistoricalArchive.loadHeartRateSamples 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9346}}}],"partialFingerprints":{"codehealthFindingId/v1":"9356ab1ad24d1679f76f7d4b3c2ab301016780fd2dfce9e96a2a2b74c40c32ea"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalNotificationScheduler.makeActionableConnectionDecisions (cyclomatic 22): LocalNotificationScheduler.makeActionableConnectionDecisions 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dda20ab2b2ad5c15e8a9c87f5b4018a84d1d78debf0d4378f234764e9899b8a"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.workoutReadinessCore (cyclomatic 22): SavedSession.workoutReadinessCore 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7665}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a845c82f15ef2674bc7837f96cf84d5cb263d68120b6321b2de0c413772cae5"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeHistoryDailyRollups (cyclomatic 22): SessionStore.makeHistoryDailyRollups 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21843}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b6d0c0f8e109bb895299631dabc0a638bed174c3e5af669271b7e3a2adc9e0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.loadCachedResidentJournalSessionForSleepReview (cyclomatic 22): SessionStore.loadCachedResidentJournalSessionForSleepReview 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29813}}}],"partialFingerprints":{"codehealthFindingId/v1":"03eb2f3883dc80ce04c0501ced723f7ac9e36244815970f562e25ec235ae3243"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.rebuildConfirmedSleepRecoveredMotionProvenance (cyclomatic 22): SessionStore.rebuildConfirmedSleepRecoveredMotionProvenance 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46965}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b11d816c9e28487c934a2718e080e8fd028b5e8026eef6f0389ac6eccd5ec5"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.aggregateWorkoutCandidatesUnshared (cyclomatic 22): SessionStore.aggregateWorkoutCandidatesUnshared 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49141}}}],"partialFingerprints":{"codehealthFindingId/v1":"286b8dc48b524eb24eaa49ce1498e06bfd2793f2f123ba97adbabe585a0ab001"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.rebuildBaselineCancellable (cyclomatic 22): SessionStore.rebuildBaselineCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58511}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2360a3f533189a1470cbe6ab031de4454e47605b4e15a9c6e31094fdb56fe92"}},{"ruleId":"D1","level":"warning","message":{"text":"Night.init (cyclomatic 22): Night.init 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59556}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d7bbdcaefa9227813368570ec5f3da97c37686e3fab7f52158504de39daddd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.kickZombieProprietaryStreamIfNeeded (cyclomatic 21): AtriaBLEManager.kickZombieProprietaryStreamIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9973}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d28fc4be70e4e37de3a54c4e07a5b75aaf20f774674163507f72a66019d7ed"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ActivationIfReady (cyclomatic 21): AtriaBLEManager.sendProtectedR10ActivationIfReady 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15889}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f829f6512945ae0eb1fc30db652875815a119851cd8d99a9f7f5932a13e8cea"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.evaluateR10Liveness (cyclomatic 21): AtriaBLEManager.evaluateR10Liveness 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34931}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0d550f900c8dc1b10d608e4ff94cf244235945ef731a6ff06c3064ab3745a9"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.stopWorkoutHistoricalMotionBankIfPossible (cyclomatic 21): AtriaBLEManager.stopWorkoutHistoricalMotionBankIfPossible 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36884}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1d9db53c99d982e25432cf13249e372830341ebf1ef083e6e9214c5e8dc2c9b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.publishRRContinuityQuality (cyclomatic 21): AtriaBLEManager.publishRRContinuityQuality 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43010}}}],"partialFingerprints":{"codehealthFindingId/v1":"0879397c4cc2618e2136341f1142cd89d275f29f156f81a896c4d390608ff359"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.applyHistoricalArchivePersistenceResult (cyclomatic 21): AtriaBLEManager.applyHistoricalArchivePersistenceResult 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45661}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa71d03b5aaeb1b34b3d845ea91441df4661e9b64b61bc37717208d1a29077a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.presentConnectionGuideIfNeeded (cyclomatic 21): AtriaHomeView.presentConnectionGuideIfNeeded 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6635}}}],"partialFingerprints":{"codehealthFindingId/v1":"701ae142ca1a5d7b82af2385861e52d5787ee5be5885d57928f3e76ce7c9c2bd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaGyroCadenceResearchPedometer.windowVerdict (cyclomatic 21): AtriaGyroCadenceResearchPedometer.windowVerdict has cyclomatic complexity 21 (threshold 15). Of this number, 20 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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"3658f41fdaab03c59c2cb391bd2e2774327c0c1508e779db729b8c702efade7e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaResearchBundleBuilder.makePayload (cyclomatic 21): AtriaResearchBundleBuilder.makePayload 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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"085b66612108dcd9b5531902475d709bbb1127c1c1bb9752e69c6c1398a74d1b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepMotionQuiescence.quiescentWindows (cyclomatic 21): AtriaSleepMotionQuiescence.quiescentWindows 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":"Atria/Atria/AtriaSleepMotionQuiescence.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"848f1f02caeb71a3888749b5400037bb94bcd1e2efa3a29632e274129cc514cb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.classifyGapMinutes (cyclomatic 21): AtriaHistoricalStressReplay.classifyGapMinutes 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1957}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5e8f93b0fc6219252e3283eb426f6d2d836bfbba82f6c3f7f0e4ca89f2d319"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressMonitorStore.replayMayReplace (cyclomatic 21): AtriaStressMonitorStore.replayMayReplace 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3484}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae014ff8d1e8bc79e805abc7c96dd943a03bf21991570879b7e6834ac97d89ca"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateAlignedWindow (cyclomatic 21): AtriaWhoop4GravityCadenceStepModel.estimateAlignedWindow 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"feda169e8596fbad97a0da884938ab170d8e7a581ef47a6db8c8931b912f8e41"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivity (cyclomatic 21): AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivity 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"d12d8537b8af44dfe58c7e735df0fd5c7590946b0ba1e0321feebc95d3051cf6"}},{"ruleId":"D1","level":"warning","message":{"text":"HealthKitExporter.healthSamples (cyclomatic 21): HealthKitExporter.healthSamples 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb8faee458e322a47360703949864c58dd3d07e9b57a4404aa94be7412512c3"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.verifiedMetricTimestamps (cyclomatic 21): HistoricalArchive.verifiedMetricTimestamps 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1679}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fed3d1f5c4d083c259be3a8416ff5e78210243aa94fc678d60363835e530d81"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.workoutPrimaryBlocker (cyclomatic 21): SavedSession.workoutPrimaryBlocker 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8238}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a332db29ad58a2a68bc724ab6ac32cadb0eea31b210f23e14c0cbd6590e339"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.refreshHistoricalArchiveStatus (cyclomatic 21): SessionStore.refreshHistoricalArchiveStatus 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14711}}}],"partialFingerprints":{"codehealthFindingId/v1":"37682d6e0cca40261c090eee9ca87244a67783bad00d455315db0cfec301a66b"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.persistRecoveredCurrentCheckpoint (cyclomatic 21): SessionStore.persistRecoveredCurrentCheckpoint 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16682}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b879865ac8e655e4688ef2a2794f7788927b123a4e38af7f894daa58828748"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.completeRecoveredDataComponent (cyclomatic 21): SessionStore.completeRecoveredDataComponent 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19685}}}],"partialFingerprints":{"codehealthFindingId/v1":"4387dd25c51e10db9b80b52e7c8b5124e9f4406f8129fedd944583c7cbf1adc5"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.logCollectionHealthFromLaunchIfRequested (cyclomatic 21): SessionStore.logCollectionHealthFromLaunchIfRequested 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31079}}}],"partialFingerprints":{"codehealthFindingId/v1":"910ff61226ebe4fb5b57a3340c4eb982288a8fdeb817b6444d4b6a2cd52d5adc"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.recoveredWorkoutEvidenceIsStronger (cyclomatic 21): SessionStore.recoveredWorkoutEvidenceIsStronger 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35939}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c939de807d105c6e9c64b951f53c7a47ed2560d1128b6fd5126f8a33b2703c"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.sleepReviewAdmissionDiagnosis (cyclomatic 21): SessionStore.sleepReviewAdmissionDiagnosis 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e195418e1534e7965b958a0aa2d394bccdea463ff2c46f1bcbc6ced6f0c22627"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaCoachPayload.serializedNumbers (cyclomatic 20): AtriaCoachPayload.serializedNumbers 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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"a531a08401b6ef95ce1dbd301430ed7238eb6f756f7eb9afab61fce30b1ef500"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaActivitySelectedDaySleeps.overlapping (cyclomatic 20): AtriaActivitySelectedDaySleeps.overlapping 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"1959a4275ad66bb02c3bca7dba9183c487bb5b6c3482ffb4d89c86edb7a7a648"}},{"ruleId":"D1","level":"warning","message":{"text":"RespRateRsa.estimate (cyclomatic 20): RespRateRsa.estimate 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb489ffdc14e0ff22c24711a709d2037be3d3cb170b3ec68d7bc3f71b02ba9e4"}},{"ruleId":"D1","level":"warning","message":{"text":"Strain.maxHeartRateZoneSeconds (cyclomatic 20): Strain.maxHeartRateZoneSeconds 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"75937ae56ddaa98757223bb149390a55b96250d77682b39a6cb1a6a7a1efb4c6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.resumePendingForcedHistoricalSyncAfterLivePersistenceIfNeeded (cyclomatic 20): AtriaBLEManager.resumePendingForcedHistoricalSyncAfterLivePersistenceIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11463}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d42ee8708a2842083ee7136ae04fa5004df44024ac01cbfae108910765019a2"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.evaluateIdleWindowHistoryDrainIfNeeded (cyclomatic 20): AtriaBLEManager.evaluateIdleWindowHistoryDrainIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13144}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b8413a20606d153d72667db31e1701e15ded0da3fa9674f0b7b7570005cabd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendMotionHandshakeR10IMUSequenceIfReady (cyclomatic 20): AtriaBLEManager.sendMotionHandshakeR10IMUSequenceIfReady 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15393}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3019428285f2efe9b5fac52c94a2c37b89b064dc5f1b8d64fb0bc77942f0230"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.requestProtectedR10InitialProfileNotificationIfAllowed (cyclomatic 20): AtriaBLEManager.requestProtectedR10InitialProfileNotificationIfAllowed 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16350}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ac8e0ac7a52666a6519301637df9bf954c208f36594efe123db9d98af7ced1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.liveR10EligibilityBlockers (cyclomatic 20): AtriaBLEManager.liveR10EligibilityBlockers 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32739}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3ff1a823d2e454d543a2312f0163cead916a8d01f46429df1b5d13899bb4ed"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startSacrificialFastDrainIfNeeded (cyclomatic 20): AtriaBLEManager.startSacrificialFastDrainIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40992}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe4ddba5a3562f1faf837a8ca4f8a3b5840ab4e7a84b443c491c83687493bbd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.performProductionHistoryReadPreflight (cyclomatic 20): AtriaBLEManager.performProductionHistoryReadPreflight 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42781}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ea60aae2cf90f711dd5859dd9030c8fb0fff172a59754742a352128b87f830"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldRequestProprietaryBatteryRefresh (cyclomatic 20): AtriaBLEManager.shouldRequestProprietaryBatteryRefresh 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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"49655bbed6770dd1a3fbafd95b6eeede3bf4aedcb3af19b156b30f8462834e78"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBackupCompression.transform (cyclomatic 20): AtriaBackupCompression.transform 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":"Atria/Atria/AtriaBackupCompression.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d79ce5c0992a771c7705be8e7a2da5a4ea30e26c974f44d86a86c6fcac65b2"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.validatedReceipt (cyclomatic 20): AtriaHistoricalConsumerReceiptLedger.validatedReceipt 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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"5396aa3722d2e763e0f36c45a6f841d26d5cbb337088a2dd1578636b0f08494f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullScanCompletionStore.validate (cyclomatic 20): AtriaHistoricalFullScanCompletionStore.validate 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":"Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b390afa3b7b697fa76d15b771aa58c7b8c1a1f80105344419e4baf5f6c01546"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGapLedger.commitResolvedWindow (cyclomatic 20): AtriaHistoricalGapLedger.commitResolvedWindow 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2befb220a0b28d35bdd7827d5feff28d68fa7f51af10ca4bcd5d87faee7519c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.endWorkoutSession (cyclomatic 20): AtriaHomeView.endWorkoutSession 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":4210}}}],"partialFingerprints":{"codehealthFindingId/v1":"254461c24e5fbfce869bb639e31ca5e749adba1e0844414a18fe4bf37e046c35"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.publishFrozenSceneIdleLiveActivityIfNeeded (cyclomatic 20): AtriaHomeModel.publishFrozenSceneIdleLiveActivityIfNeeded 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12648}}}],"partialFingerprints":{"codehealthFindingId/v1":"d760d8412708aa544492f5fc9347b150dea2cd1266efd8638a8bf2b3279254fc"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPendingWorkoutIntentStore.persistTerminalLocked (cyclomatic 20): AtriaPendingWorkoutIntentStore.persistTerminalLocked 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"111e87001b6e6c47ab3ff9a9f301d0469b0c8fdd8750963f5f194fc6dce88cb0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutZoneHapticTransition.accept (cyclomatic 20): AtriaWorkoutZoneHapticTransition.accept 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1566}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4285acaf36c8e1f5651b67cdcee653bf9b4ffc0cda4dc771b33d611efdac498"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaNightBaseline.sentence (cyclomatic 20): AtriaNightBaseline.sentence has cyclomatic complexity 20 (threshold 15). Of this number, 19 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":"Atria/Atria/AtriaNightBaseline.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"409ef18b1bb6457ebb1748db63bda5753ee35b056572929b270fd8f2e0c5c466"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepWakeResearch.epochFeatures (cyclomatic 20): AtriaSleepWakeResearch.epochFeatures 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e64280e97f2af2309983bf42397498c4cde1f301b5b2c60ec87725e6a8fe5e"}},{"ruleId":"D1","level":"warning","message":{"text":"Point.isValid (cyclomatic 20): Point.isValid 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c806c94ce74a2ef062efbcb1b9174b1dc7a179ec2dae6923b03aa6741cabbfa"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressMonitorStore.checkpointHistory (cyclomatic 20): AtriaStressMonitorStore.checkpointHistory 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3738}}}],"partialFingerprints":{"codehealthFindingId/v1":"de7ca2e1029c8f534e12c635cba8a5585ef06e49848798830b57e1249e97efeb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.enumerateDurableFrames (cyclomatic 20): AtriaWhoop4HistoryAdmissionLedger.enumerateDurableFrames 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab489b763e9140bee708eb1f780c582f26555a77377419bf60286823250707d7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.append (cyclomatic 20): AtriaWhoop4MotionTickCompactStore.append 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9410daefd5bde154555fd6a0d5ae3b73dce67a14ce30adc1d67501ceca0caf"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.read (cyclomatic 20): AtriaWhoop4MotionTickCompactStore.read 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2516}}}],"partialFingerprints":{"codehealthFindingId/v1":"131cb1c6ffca2b7cee09f6b9a6fbb108fe0499fa4fb0f614f8e4c4f35aa1261d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.dominantMotionWindow (cyclomatic 20): AtriaWhoop4GravityCadenceStepModel.dominantMotionWindow 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1917}}}],"partialFingerprints":{"codehealthFindingId/v1":"3379f9ff017e7584417b70f749f5f81326eb5444948e9c2b1ebfd8b19cdc0de6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDailyStrainTargetStore.resolve (cyclomatic 20): AtriaDailyStrainTargetStore.resolve 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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"30d3413e97a8799c7c5bf5dd0cef84f189229a1380cfd2ad4feeda734891c31f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhiteboardCoachSentence.rewrite (cyclomatic 20): AtriaWhiteboardCoachSentence.rewrite 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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a115c4b1f6cf6aacc6be826d9b9c71d4510c27ccfe69749cc61f165c779b07e"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.motionBankTransportCoverage (cyclomatic 20): HistoricalArchive.motionBankTransportCoverage 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4166}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce890bbbf8ac93caf7091889ba173c8d9b7c74d4d3f844569073983acc856bb"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.sealedCatalogBoundIsDurablyTrusted (cyclomatic 20): HistoricalArchive.sealedCatalogBoundIsDurablyTrusted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8572}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f343af98bc4a3e7717ee3cf7ac7e853d6d061740478e129eaae3f3837ad431"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeDailyMetricRollupPreparationCancellable (cyclomatic 20): SessionStore.makeDailyMetricRollupPreparationCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14105}}}],"partialFingerprints":{"codehealthFindingId/v1":"94dd605261c94ffd576a667316d0b0af54a3d504f20415d77d9968fecda52c96"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.recoveredDailyPreparationSessions (cyclomatic 20): SessionStore.recoveredDailyPreparationSessions 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21261}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb75df069684b44d40f65ca872a405665c3bb995475beca2170a051d86b2e29"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.finalizedSkinTemperatureDeviationByMorningDayCancellable (cyclomatic 20): SessionStore.finalizedSkinTemperatureDeviationByMorningDayCancellable 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22956}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5ba7fbf1949f5bef9aaa672951f551aab521293075f48f7d3708e9934fe106"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.bestSavedRRReferenceWindow (cyclomatic 20): SessionStore.bestSavedRRReferenceWindow 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":32250}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb95883f4df436d99374e20a262ae86837c2114ebc39287588cc5c47f95a89d0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.motionEvidenceMonotonicConfirmedSleeps (cyclomatic 20): SessionStore.motionEvidenceMonotonicConfirmedSleeps 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45209}}}],"partialFingerprints":{"codehealthFindingId/v1":"104ed4f99c201a992efe655e060666df865f6ebf1c2d319342128d644c8f5620"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scoreExternalRR (cyclomatic 20): SessionStore.scoreExternalRR 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 is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54781}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd500b2859b041c54c2825ea917d58f0c59bd425d68c62e1c720942e14d1ba2d"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.restoreSessionBackup (cyclomatic 20): SessionStore.restoreSessionBackup 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55587}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b23b14ad18f3dcad24a51de6701043c360f810f4c35e3de9bd255f960357196"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.requestDeferredLaunchCardSettlement (cyclomatic 20): SessionStore.requestDeferredLaunchCardSettlement 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57572}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefa71b934bf97f4d0828a9f62c3c833aebe8bc87be42f8135b588ccc5f826da"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaAboutMetricTrend.make (cyclomatic 19): AtriaAboutMetricTrend.make has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (value). 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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac3bd456f6c39cebf58ac4080ae741361d801ffe29cef37ffbe1edaff924192"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaActivityMonitorMemo.timelineSpans (cyclomatic 19): AtriaActivityMonitorMemo.timelineSpans 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3469}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f635b02e401340b4a03c4dc7f576a89e3e9f0109f7fa58dde0b235b12aac93a"}},{"ruleId":"D1","level":"warning","message":{"text":"TargetZones.restingHeartRate (cyclomatic 19): TargetZones.restingHeartRate 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"497dd0f0960c1bc1d1a8e08f5cc28231694674936c676c11863208955e8a2d24"}},{"ruleId":"D1","level":"warning","message":{"text":"Recovery.sleepMissingEstimate (cyclomatic 19): Recovery.sleepMissingEstimate 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1756}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fab81c878b975e0783a410881e9ab03f65364791479c8b8979b7b31be992b8d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.flushLeftoverMotion (cyclomatic 19): AtriaBLEManager.flushLeftoverMotion 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8693}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fdc75298d1fbff357085126365bc58aed4b34ee8fcad0e89934e83aa836d4c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.reconnectToSavedPeripheralIfPossible (cyclomatic 19): AtriaBLEManager.reconnectToSavedPeripheralIfPossible 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27965}}}],"partialFingerprints":{"codehealthFindingId/v1":"727010f2309f8cd5fa305bcc4c35af7ca7ddec9e2941c9e44fa7d67d1a0c8cc8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.beginPostReconnectStreamLeaseIfNeeded (cyclomatic 19): AtriaBLEManager.beginPostReconnectStreamLeaseIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd1e91b6020903fa624f669d44ed1d5f8c3990c0e7c8d4261db8e972b6bd2cd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.reconcileCentralUnavailableRecovery (cyclomatic 19): AtriaBLEManager.reconcileCentralUnavailableRecovery 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29982}}}],"partialFingerprints":{"codehealthFindingId/v1":"5484467c1b215cb96868f552c1bf5269bb9feea4045ff705d429df77b5342e3a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recordAcceptedHRSample (cyclomatic 19): AtriaBLEManager.recordAcceptedHRSample 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30927}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7d6383ca215cfb72692d97d41f67177ebee12e8f407b34b1a92badc2cd4dbd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendGate4OfficialGen4CompactMotionSequenceIfRequested (cyclomatic 19): AtriaBLEManager.sendGate4OfficialGen4CompactMotionSequenceIfRequested 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39304}}}],"partialFingerprints":{"codehealthFindingId/v1":"a22fb590fcac40cd122b400e668578fcc26a297530dcba6cbeaadffc1fbe6653"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendReadOnlyHistoryCommandAwaitingConfirmation (cyclomatic 19): AtriaBLEManager.sendReadOnlyHistoryCommandAwaitingConfirmation 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42190}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9de7b6310f18ad6fda81957e67b45e801c5d8a9533c84b447f229a56575cc7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleReadOnlyHistoricalPayload (cyclomatic 19): AtriaBLEManager.handleReadOnlyHistoricalPayload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43310}}}],"partialFingerprints":{"codehealthFindingId/v1":"15127d74b77998653066382911688a36b0bd87c517924965c6057672f9c384dd"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleParsedRealtimePacket (cyclomatic 19): AtriaBLEManager.handleParsedRealtimePacket 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51284}}}],"partialFingerprints":{"codehealthFindingId/v1":"773b4536cb196631376ec85765131b71ba5a08a1e527607d79fcdc0572374eed"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.restoreStrapStepLedgerAtLaunch (cyclomatic 19): AtriaBLEManager.restoreStrapStepLedgerAtLaunch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51728}}}],"partialFingerprints":{"codehealthFindingId/v1":"37636746581fc62dd73af3c1a3147289f91d82f7beafe56527b9f7c1c30b5df5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.connectedRawHistoryCatchUpContinuationDisposition (cyclomatic 19): AtriaBLEManager.connectedRawHistoryCatchUpContinuationDisposition 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2590}}}],"partialFingerprints":{"codehealthFindingId/v1":"95712b3fa4e3594a2efe9a436cc1132642619cb695f5ab5441fb2c656d01a297"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBreathworkSession.finishArtifacts (cyclomatic 19): AtriaBreathworkSession.finishArtifacts 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":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b71a933da930c64e1edce0717516ed230f1289d6c7c401c5fbb63a6bbc403d4"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.verifyCompressedStorage (cyclomatic 19): AtriaHistoricalArchiveCatalogStore.verifyCompressedStorage 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"8faa04dbefb77a8b73bf1ca7aacf917b606601dd1f66f46a17e52359f925083f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGapLedger.recordMetricUsableRows (cyclomatic 19): AtriaHistoricalGapLedger.recordMetricUsableRows 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ecd84e4aa7c1a39bb374b0fbdfe0cff49ce539c99876df8960f1d294d8d1ee"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalLiveIdentityLookup.lookup (cyclomatic 19): AtriaHistoricalLiveIdentityLookup.lookup 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffd3d50ff2df2d79ee91850ef65f9e00e58d6689cc17db5a3dd6226adc385a0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalJSONLInput.decodeRawDeflate (cyclomatic 19): AtriaHistoricalJSONLInput.decodeRawDeflate 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10eb8ca525a47b8edb07c88007965f90e91e9f95edbf3b802f572bc905c8f77"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.handleDeepLink (cyclomatic 19): AtriaHomeView.handleDeepLink 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":1877}}}],"partialFingerprints":{"codehealthFindingId/v1":"f66f6a5f43e34663265470883fef920721a4541b0221fcdb3bf00593ca0cb461"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.consumePendingIntentCommandIfNeeded (cyclomatic 19): AtriaHomeView.consumePendingIntentCommandIfNeeded has cyclomatic complexity 19 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3013}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b7d38715bd1f7f4a6c8ffbfd378c0a66d24d485de12c9736cc3b3bf298783ac"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.publishFrozenSceneWidgetPatchIfNeeded (cyclomatic 19): AtriaHomeModel.publishFrozenSceneWidgetPatchIfNeeded 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12584}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dfc92784ca97bc4d2186686acbfc15d3eb36581d03877abaaefc2ac055dd38"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaJournalInsights.thresholdSplitInsightCancellable (cyclomatic 19): AtriaJournalInsights.thresholdSplitInsightCancellable 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":"Atria/Atria/AtriaJournalInsights.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"f73477e5e4a85cae8e859a0fd7d071bed567a0483a7360f54042b29c7f97933d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLearnedInsights.insights (cyclomatic 19): AtriaLearnedInsights.insights 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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6322cbbac4df36070906f6c76277cf8248522d72559368cc64afe2e38a9d53"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLiveActivityCoordinator.update (cyclomatic 19): AtriaLiveActivityCoordinator.update 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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca9bbe89fee287063014ca8551f1fb5b116efc240ed3edaf044239de1e8ffc1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTodayMorningWhiteboardModel.make (cyclomatic 19): AtriaTodayMorningWhiteboardModel.make 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":"Atria/Atria/AtriaMorningWhiteboardModel.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bee104b218d0b7d67fdfab2346072469b64603aea2968841d9eb340eda1eada"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTodaySleepReviewProjectionState.preferredReview (cyclomatic 19): AtriaTodaySleepReviewProjectionState.preferredReview 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: AtriaTodayMetric.label (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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"be13320f551de0095aa2a3aff4ebfebfb9613bf7bb9066ac64cda1c3c49a50a7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPersistedWorkoutStrainRescorer.matchingVerifiedAudit (cyclomatic 19): AtriaPersistedWorkoutStrainRescorer.matchingVerifiedAudit 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":"Atria/Atria/AtriaPersistedWorkoutStrainRescorer.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"798941f51d9e11d7a01ba2d1f74b2d706faad1ab75d699c9a2e9f26ce92d2034"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSettingsView.dataSection (cyclomatic 19): AtriaSettingsView.dataSection 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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a58cdb06c122dba8243e1d409757db0f3e1236c2b9a03967946a1552ab5a906"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressMonitorStore.timeAlignedRRIntervals (cyclomatic 19): AtriaStressMonitorStore.timeAlignedRRIntervals 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3230}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4fa499e5d6cff44679a0745adbe211b6666224ef759cb2b4eac23bbc5c36443"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTodaySessionState.== (cyclomatic 19): AtriaTodaySessionState.== 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"326910ede33eb4c6a146fa3e085ead3ab277ef015f6206b48e49f30a1d87b9be"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt (cyclomatic 19): AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"0736b7a491cc520cde53945105e0aac699d1d1c7eecb8c3451e8ada69dc953b7"}},{"ruleId":"D1","level":"warning","message":{"text":"DailyRecoveryResolver.summary (cyclomatic 19): DailyRecoveryResolver.summary 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c14f04ceaa81f0f54c970235b6d3e0b94f8e07e9a95ddeb752abee7a1f14471"}},{"ruleId":"D1","level":"warning","message":{"text":"DailyRecoveryResolver.limitedFallbackMetricIsStructurallyAuthoritative (cyclomatic 19): DailyRecoveryResolver.limitedFallbackMetricIsStructurallyAuthoritative 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c540055c5d172f7283b421a609a1f0ca12950bf998a2238df1b95673b617ba6"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.diagnostics (cyclomatic 19): HistoricalArchive.diagnostics 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3123}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb455d561712b3af28e50ff80cb9c54c130a89ddf521ae8238ffa4ef4875d617"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.sealedCatalogBoundIsDurablyTrustedOutsideWindow (cyclomatic 19): HistoricalArchive.sealedCatalogBoundIsDurablyTrustedOutsideWindow 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8539}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8e2d36e1c42b2adb700262c003ce805dfb9515bd86274dcffda410c719b34b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaScanRecordParser.unescape (cyclomatic 19): AtriaScanRecordParser.unescape 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11169}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb1e2b3f226063fb05d76cc2ad60c1ff9ca627d4c45fddc95fdb69638ec71c2d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaScanRecordParser.skipValue (cyclomatic 19): AtriaScanRecordParser.skipValue 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11352}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d47089c1b75174507d702cdbdc091cf275d0296a4fce6e1f5526358d78a8e7"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalNotificationScheduler.makeSleepReviewDecision (cyclomatic 19): LocalNotificationScheduler.makeSleepReviewDecision 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a6fc27f884f771c49a5323d77c75f7d1f1e968785facadcfb4020de4a8e2aa0"}},{"ruleId":"D1","level":"warning","message":{"text":"StrainPresentation.resolve (cyclomatic 19): StrainPresentation.resolve 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":"Atria/Atria/Metrics.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1e2c22e27e3d7cc62a02203f5ad8ae5eb9dbfa8fe06912f74eb5d7067f1f16"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.appendingRecoveredExecutionDiagnosticEvent (cyclomatic 19): SessionStore.appendingRecoveredExecutionDiagnosticEvent 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":11009}}}],"partialFingerprints":{"codehealthFindingId/v1":"dddc4698f1fcd5b6fb10b40eecc67cd157aab27afc68b2920e6ae84137ec4a03"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.dumpSleepCandidateDiagnostics (cyclomatic 19): SessionStore.dumpSleepCandidateDiagnostics 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13216}}}],"partialFingerprints":{"codehealthFindingId/v1":"70224384548d6826b2eede168b3f56faf21b79a840ee57225c1e2e53e587d029"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeWorkoutReviewCandidateForCache (cyclomatic 19): SessionStore.makeWorkoutReviewCandidateForCache 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33001}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c2901a47c660282b6c3b3781cbe640053941f8ab2c7aeef2399c21b73a5a71"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.activityCalibrationEvidence (cyclomatic 19): SessionStore.activityCalibrationEvidence 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33282}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1631528a43663a429995292128a692202629dd25304fac5f308a97169b3373"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.scheduleCurrentCycleSleepReviewAdmission (cyclomatic 19): SessionStore.scheduleCurrentCycleSleepReviewAdmission 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40167}}}],"partialFingerprints":{"codehealthFindingId/v1":"37843f0c5bf5634255e11fe12bff65c0d9286f7e3ce1ccc280c7ba13fa26ec9f"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.sleepStageResearchSampleCount (cyclomatic 19): SessionStore.sleepStageResearchSampleCount 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44008}}}],"partialFingerprints":{"codehealthFindingId/v1":"85419385f91d6806af570378427476d79f4f3519996943b9451d2ef6c1e71427"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.shouldSplitPostWakeNap (cyclomatic 19): SessionStore.shouldSplitPostWakeNap 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56608}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d080edf178ab26f0adcf6c83c4365e1d06875e8eb38fad9f8dccfe00f09d23a"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.continueDeferredLoadFollowUp (cyclomatic 19): SessionStore.continueDeferredLoadFollowUp 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57128}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ee943e29c333a1caf0416c7452b4a57df0d2ec031e1dd9b7d5bbf65296945c"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.requalifyPersistedConfirmedSleepHRVFromSessionsIfNeeded (cyclomatic 19): SessionStore.requalifyPersistedConfirmedSleepHRVFromSessionsIfNeeded 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58076}}}],"partialFingerprints":{"codehealthFindingId/v1":"163d90d81dcdad797298b9d85f07c03c0efa175e2b5de1c83d8187ab7effe753"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoryView.debugFixtureHistorySnapshot (cyclomatic 19): HistoryView.debugFixtureHistorySnapshot 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59138}}}],"partialFingerprints":{"codehealthFindingId/v1":"6906b769c0ceab27ab9aa5fb2b2225efa21a54df4b36e693c69a3c669cf5f1a4"}},{"ruleId":"D1","level":"warning","message":{"text":"ActiveSessionJournal.applying (cyclomatic 18): ActiveSessionJournal.applying 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a74050396da2e431a2b91fc550c2b6ad1dd470769030dd273c7573be72c05d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaActivityMonitorTab.debugWorkoutDetailFixture (cyclomatic 18): AtriaActivityMonitorTab.debugWorkoutDetailFixture 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1854}}}],"partialFingerprints":{"codehealthFindingId/v1":"c554024bb55f0331bf8eba377c4fa90ae3d0d310fad78c434661d67d067860ea"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaActivityWorkoutDetailSheet.saveAllAsync (cyclomatic 18): AtriaActivityWorkoutDetailSheet.saveAllAsync 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4336}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff183e942ca9cc5994f3cb8da6951e24796bca289d5bbf696880633134bba25"}},{"ruleId":"D1","level":"warning","message":{"text":"TargetZones.hrv (cyclomatic 18): TargetZones.hrv has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccbee7619c11da754e0b3f604596edbc4ee3d1afe6196a0b89827ce42fd3e1a3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.discoveryServicesForCurrentMode (cyclomatic 18): AtriaBLEManager.discoveryServicesForCurrentMode 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5565}}}],"partialFingerprints":{"codehealthFindingId/v1":"794dce9eb7018ab62294ab7f5ae693a9bd139d693b16b81b4bdebc039729450e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recoverNoDataWatchdog (cyclomatic 18): AtriaBLEManager.recoverNoDataWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25601}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6006b676d0e1d4696eee3d03133f4d5264ad5bde5e2104c69b72b45f01e916"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.pruneRRWindow (cyclomatic 18): AtriaBLEManager.pruneRRWindow 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f73343c5fb72e584a721e64183216f1e59368a668e7694e18a44eeaea436e9"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.checkpointFromLiveEventIfNeeded (cyclomatic 18): AtriaBLEManager.checkpointFromLiveEventIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30679}}}],"partialFingerprints":{"codehealthFindingId/v1":"93684dc8b3679acfbd3a0b68101aa1a92d2f070b0247672a063309198cd9a453"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleProprietaryArmFallbackIfNeeded (cyclomatic 18): AtriaBLEManager.scheduleProprietaryArmFallbackIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33772}}}],"partialFingerprints":{"codehealthFindingId/v1":"202458158acfd3cbe931f9aed43125d187d4e66f7cb51a8d6aee0dada33c7ebe"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.workoutMotionLeaseAction (cyclomatic 18): AtriaBLEManager.workoutMotionLeaseAction 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":35149}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74ce67ee9cb020adc617973c4e132e05a9195e9ccf9c9651081bccc43313e9b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendOneShotHistoryTrimCommand (cyclomatic 18): AtriaBLEManager.sendOneShotHistoryTrimCommand 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41754}}}],"partialFingerprints":{"codehealthFindingId/v1":"7329997132d2944582d0340c2d3dd357569fde916733cc468d4fcfab9b115a27"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startReadOnlyClockProbeIfNeeded (cyclomatic 18): AtriaBLEManager.startReadOnlyClockProbeIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42460}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df7f067b60b4ffe9a6a25d01279d75982c0a3db19666e2dcdf6364361aefd03"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.maybeRequestProprietaryBatteryRefresh (cyclomatic 18): AtriaBLEManager.maybeRequestProprietaryBatteryRefresh 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44191}}}],"partialFingerprints":{"codehealthFindingId/v1":"010df8e5e26938e82e8cda1fd4f24a1e60a9d5db41d6f64fb09ce63ff714ec36"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleHistoricalData (cyclomatic 18): AtriaBLEManager.handleHistoricalData 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45084}}}],"partialFingerprints":{"codehealthFindingId/v1":"58504542fd8236fa40a70c1aa1d8971ae861f863a6128d91d75e2d85a4e58382"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.processAdmittedHistoricalFrame (cyclomatic 18): AtriaBLEManager.processAdmittedHistoricalFrame 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45443}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8f882be07c57badf778351634f0cefaac4587ba61aa97665bf173351e58a2c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.armHistoricalPageContinuationAfterACK (cyclomatic 18): AtriaBLEManager.armHistoricalPageContinuationAfterACK 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49660}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b43da1f1ef68a85dabd4ab2f58538ea948fe09371575cf7a4f67417fc30b48"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.heartRateContinuityRecoveryDisposition (cyclomatic 18): AtriaBLEManager.heartRateContinuityRecoveryDisposition 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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"63698ba2d134961f73462900bf46933efe10058af347b53aeb6f2695546a35de"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBackgroundProjectionThrottle.checkpointShouldAbort (cyclomatic 18): AtriaBackgroundProjectionThrottle.checkpointShouldAbort 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":"Atria/Atria/AtriaBackgroundProjectionThrottle.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c5cb6aef4efe7f346b63ac27cad08d58a5a4c4e6a7f440bf365761a9cf62c0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaDeviceUseJournal.sustainedUseIntervals (cyclomatic 18): AtriaDeviceUseJournal.sustainedUseIntervals 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":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"200fe3b9be1c801fdcd1840859197753e2747b0af172dba80ea29936bf7e7e7e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.recordSealedMetadata (cyclomatic 18): AtriaHistoricalArchiveCatalogStore.recordSealedMetadata 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccbf165a25f1f378fd17642305f7839bf304992aaadcedaae278ba185952a4c9"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceipts (cyclomatic 18): AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceipts has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ce6fd29de84e24663cc0820c14cf5cf54ca9611632bde8561db7b3d608b512"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.validCommon (cyclomatic 18): AtriaHistoricalDailyConsumerProjection.validCommon 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"532e45f7420d1ce44c32ea5f124ad31b4c31c6d39b69209e84b049b9515f3afe"}},{"ruleId":"D1","level":"warning","message":{"text":"DurableStorePair.isValid (cyclomatic 18): DurableStorePair.isValid 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2064fc14ff9c2b6a10bf3a26838afab12ae7c3ba5fd5fcc933486a36dc5aa5f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordMatchingACK (cyclomatic 18): AtriaHistoricalFullDrainCoverageStore.recordMatchingACK 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed975ce717c95e16954aed3e7f9f21670ac9b07cafa556a670de34a82eed647f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalJSONLRecentScanner.unsignedInteger (cyclomatic 18): AtriaHistoricalJSONLRecentScanner.unsignedInteger 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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d01f9585ccd0cd597f3984273cc55d4e0856334f8eaf3010d70215b162b1f32"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeView.updateConnectionDiagnosisVisibility (cyclomatic 18): AtriaHomeView.updateConnectionDiagnosisVisibility 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6310}}}],"partialFingerprints":{"codehealthFindingId/v1":"02bb50d64297ccde852d9c1f556f261f9edf2f0012c8a8bdc670e4e9871e71e7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaMissedDataBannerPresentation.copy (cyclomatic 18): AtriaMissedDataBannerPresentation.copy 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":7754}}}],"partialFingerprints":{"codehealthFindingId/v1":"2211ae807dfdc6bc52b60f1fffd9b7de00cf266a5103c37bfd661384873cd31f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.nextLiveSessionDerived (cyclomatic 18): AtriaHomeModel.nextLiveSessionDerived 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13816}}}],"partialFingerprints":{"codehealthFindingId/v1":"765821c7027ef9418eeb6506c0f875ea29b2ff2e6d49106d108ef190a6101b12"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaNightBaseline.comparison (cyclomatic 18): AtriaNightBaseline.comparison 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":"Atria/Atria/AtriaNightBaseline.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a0339e9f6c8e5304ef130465b415281fb02fc2fb74b0f569c8e080f69ace625"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaGlanceTargetEditorSheet.editorContent (cyclomatic 18): AtriaGlanceTargetEditorSheet.editorContent 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. This is NOT this file\u0027s highest cyclomatic complexity: AtriaTodayMetric.label (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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3229}}}],"partialFingerprints":{"codehealthFindingId/v1":"a550da8d6e04f7ee0d7110331b6caf56c7177d332e2f4c7657a2d1a2cf2753ce"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredDataRecomputeCoordinator.request (cyclomatic 18): AtriaRecoveredDataRecomputeCoordinator.request 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":"Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d27fb3629b90da7ed8a6bf41480881569221e6ebcfdf95f57f61f80722778c7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4LiveFlushPlanner.tick (cyclomatic 18): AtriaWhoop4LiveFlushPlanner.tick 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":"Atria/Atria/AtriaWhoop4LiveFlushPlanner.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf1a986e115c5679a878b3a1d1531fd617f2af32c6469808e8c82964c26547b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutRouteRecorder.locationManager (cyclomatic 18): AtriaWorkoutRouteRecorder.locationManager 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d49b729fb09be7b515e8a90743c1554b7c0a806ac8923719293e25486138570"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutCommandTransaction.applying (cyclomatic 18): AtriaWorkoutCommandTransaction.applying 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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"43733c3dc1439bf84d236fd5f64a82c4de25853d2fae25639caf56134b7b08b5"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalNotificationScheduler.add (cyclomatic 18): LocalNotificationScheduler.add 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":2188}}}],"partialFingerprints":{"codehealthFindingId/v1":"433750bae2435ec8b156b0f381764e2223fca1ae1fcb17091da2ef6ee47fb205"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.requestRecoveredDataRecomputation (cyclomatic 18): SessionStore.requestRecoveredDataRecomputation 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16845}}}],"partialFingerprints":{"codehealthFindingId/v1":"409fa8dca1acb5b5f1b21ae79629a00131cf1fadd073d398f8dcee24a163b7ab"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.mergeCanonicalHistoricalRollups (cyclomatic 18): SessionStore.mergeCanonicalHistoricalRollups 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21512}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dbadae184705a4edd7e8691c4b165a52f6fd66557741bc0d363f884c1dd8fc8"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeSavedDailyMetrics (cyclomatic 18): SessionStore.makeSavedDailyMetrics 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23194}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4f230d568f3ba511231ab66d8dcde42d7233e6220b196bdeebea7d7c9009b0"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeCompactLatestNightSettlementPreparation (cyclomatic 18): SessionStore.makeCompactLatestNightSettlementPreparation 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38919}}}],"partialFingerprints":{"codehealthFindingId/v1":"08047de3655bd8c607458e6385652f2e2d0d5c101e49a875779b3b780b921561"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.isDegradedHROnlyOvernightSleepCandidate (cyclomatic 18): SessionStore.isDegradedHROnlyOvernightSleepCandidate 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42126}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f5b1e1349026faa3d52bbe24b899e25a8a7d148e1d88de33eef25e25e4c8629"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.autoSleepClassification (cyclomatic 18): SessionStore.autoSleepClassification 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42286}}}],"partialFingerprints":{"codehealthFindingId/v1":"d730e2876a6d67449983501b93b2d12824aba21f61b77b4216de2d2457520a57"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmSleepWindow (cyclomatic 18): SessionStore.confirmSleepWindow 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42634}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5adf6d21277868b93769b2e776ae8184656edb3e6e4799809cc9eb612962757"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.makeBehaviorCorrelationSummaries (cyclomatic 18): SessionStore.makeBehaviorCorrelationSummaries 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47272}}}],"partialFingerprints":{"codehealthFindingId/v1":"d11959f7518c71414fc254e37918f1c5b210fc84cccf0b301dd860c553e88869"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.aggregateSleepDiagnostics (cyclomatic 18): SessionStore.aggregateSleepDiagnostics 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52339}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5f2d264b4eacb9f0b62f65e49189c585732f5ffa6842dd95b0e996448efee3"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.validateRRReferenceFromDocuments (cyclomatic 18): SessionStore.validateRRReferenceFromDocuments 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54247}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ab4a7a6f3e4009cbf59a527abda8aa82fee72726c3f13b5a1aacfe6cbfacd7"}},{"ruleId":"D1","level":"warning","message":{"text":"probe.on_notify (cyclomatic 18): probe.on_notify 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":"probe.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"1599a089568f5e201f5990f7996a4cbed5b5e193015c21e0d992c44cdc0c78b6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaAddWorkoutSheet.body (cyclomatic 17): AtriaAddWorkoutSheet.body 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. This is NOT this file\u0027s highest cyclomatic complexity: AtriaActivityMonitorTab.activityTint (cyclomatic 18) 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5063}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ee98668c531cde766612ddadf2a92abd8e8a20e069dde3644d208808f1cab5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaAppDependencies.init (cyclomatic 17): AtriaAppDependencies.init 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"be895ae9a6360ee754ae2d6f1e8b28a992d00fa4d0abcee0532520029250bfbc"}},{"ruleId":"D1","level":"warning","message":{"text":"SurfaceCoverage.isComplete (cyclomatic 17): SurfaceCoverage.isComplete 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":"Atria/Atria/AtriaAppReviewDemo.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79522073aaffe78aff6a8f2aaef6935e9e2afefd8856069c64c1cec2b4962e6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.beginProtectedR10BringUpForCurrentEpoch (cyclomatic 17): AtriaBLEManager.beginProtectedR10BringUpForCurrentEpoch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05810a24a60b8dbc87f74c89ea76496804d57e95bdf4d5276736fb3b780a960"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.noteLeftoverFlushInbound (cyclomatic 17): AtriaBLEManager.noteLeftoverFlushInbound 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8902}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb6447177616b4800e903b912c3f51b46ecc1972b9a6efb6c83e607633d5c47c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleIdleWindowHistoryPipeRetryIfNeeded (cyclomatic 17): AtriaBLEManager.scheduleIdleWindowHistoryPipeRetryIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13034}}}],"partialFingerprints":{"codehealthFindingId/v1":"31a157c88e9e27d42a92e62f72fa3c616a90f547be3ed2a86c25fff8a6712de1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendOnboardingPairingPreflightRange (cyclomatic 17): AtriaBLEManager.sendOnboardingPairingPreflightRange 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14889}}}],"partialFingerprints":{"codehealthFindingId/v1":"8541cf2f13d395a2721cfcd4bc1eebfa30bb20a154fcd043f0d6eeef5f6aef8c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.maintenanceTickRangeLossBackfillReArmIfDue (cyclomatic 17): AtriaBLEManager.maintenanceTickRangeLossBackfillReArmIfDue 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21418}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05f880e5b105f9ad9d705b73bd159d416fd157067fa563f30f04d78d08503f9"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.requestFreshScanReconnect (cyclomatic 17): AtriaBLEManager.requestFreshScanReconnect 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23996}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9855fcc5caa5f1075a94227ea636f6e088449c3fdc2bbac396fe6e1d452acb0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.recoverRRPresenceWatchdog (cyclomatic 17): AtriaBLEManager.recoverRRPresenceWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26243}}}],"partialFingerprints":{"codehealthFindingId/v1":"755fce7414f0d08bdcaff8a54f9ead112592f1a4b73841cf7cde3bbd4416aa55"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.startReconnectWatchdog (cyclomatic 17): AtriaBLEManager.startReconnectWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28655}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b9a543adb208fbd029548f2b937c56d42ec27ff878ee7860992995b3e9c0ccc"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.logDataRangeCommandResponse (cyclomatic 17): AtriaBLEManager.logDataRangeCommandResponse 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31946}}}],"partialFingerprints":{"codehealthFindingId/v1":"32530dfc51cf05233ea20cf96144a0c686a92b4cc1054f8d8e8643f10e4e774e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendCoverLiveBoundedRawCaptureIfNeeded (cyclomatic 17): AtriaBLEManager.sendCoverLiveBoundedRawCaptureIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34206}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4c64104d8bb7ff07c3fe6f7b41c679e84f9bcae5cc3ceabc661c479d0aedb1"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.scheduleGate4DailyBankRearmAfterHistoryStart (cyclomatic 17): AtriaBLEManager.scheduleGate4DailyBankRearmAfterHistoryStart 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36548}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd777bca8f6e9f14e5eff8ca20721eb7dd646816f9a87520aa59da4decf16d19"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.schedulePendingConsumerFollowupScanMaterialization (cyclomatic 17): AtriaBLEManager.schedulePendingConsumerFollowupScanMaterialization 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47672}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa88de9457be0c587e530da9993a88ec147b8aad954b72b2ef2d9a5d292487f3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.activeCaloriesForSnapshot (cyclomatic 17): AtriaBLEManager.activeCaloriesForSnapshot 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50097}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4cbb7774d544d8925a8d6b716677e95ff7ad4dcb31b24a96cfad8e7d0a3079b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldAttemptAutomaticConnectedHistoricalHandoff (cyclomatic 17): AtriaBLEManager.shouldAttemptAutomaticConnectedHistoricalHandoff 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":3062}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd94e6fbc4834d26442f2a6d94f21a409dce28ec0b5cb7c9eb17f176698b212"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaGeneratedArtifactRetention.prune (cyclomatic 17): AtriaGeneratedArtifactRetention.prune 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":"Atria/Atria/AtriaGeneratedArtifactRetention.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"644d33fee1f679f5ce54cc6b95c819f939af03077b1880e6a105c3942e77f125"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepStressCard.body (cyclomatic 17): AtriaSleepStressCard.body 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":3284}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88e824fe8c9157d97670d33c29948c846f65f96030943f35f24e0d30f625d9e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decodedIndexEntriesAndDigest (cyclomatic 17): AtriaHistoricalArchiveDurableStore.decodedIndexEntriesAndDigest 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab42e54b4b2f6029e57ad27125fdd4e21d09ebde0476df043386ba954a5a94be"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerApplicationStore.valid (cyclomatic 17): AtriaHistoricalCanonicalConsumerApplicationStore.valid 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"073e5352220ab3ee8b8b17746b41e00be4bb0cdbd5bb583ca80c39b3b229602c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerDestinationStore.retireReplayPayload (cyclomatic 17): AtriaHistoricalCanonicalConsumerDestinationStore.retireReplayPayload 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab405f3aeec0293ddb3417d3d0279ff38c57bc98919f1a2d5d14ec22a6fbcca"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGapLedger.stageMetricUsableRows (cyclomatic 17): AtriaHistoricalGapLedger.stageMetricUsableRows 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f4e3e165b1da3ed73db7abc11b69a0c2ecd4790f3da74d9aa14f07840fd5b0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGeneratedArtifactGC.prune (cyclomatic 17): AtriaHistoricalGeneratedArtifactGC.prune 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":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b1e12e2404d7604f65ef4c88b8e8f0bed8aae61d83c1bce15ffd7f315b3d110"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalRawRetirementExecutor.loadAuthority (cyclomatic 17): AtriaHistoricalRawRetirementExecutor.loadAuthority 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":"Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0588921a9403c75d2aaa58499a590d46584ad3d0252122e6cb75c14a0f0c46"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalRetiredReplayIndex.importAndVerify (cyclomatic 17): AtriaHistoricalRetiredReplayIndex.importAndVerify has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdce62faca37a7ce8dc2c24555922c3592c85816ebd828aee694cea530c3800c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalVerifiedActivityConsumerApplicationStore.loadCurrent (cyclomatic 17): AtriaHistoricalVerifiedActivityConsumerApplicationStore.loadCurrent 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":"Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"c661963bad5386fde14a0c19b6fce6b9a3251df4e7abfe88e36616cbc3456c84"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHomeModel.publishDiagnosisReport (cyclomatic 17): AtriaHomeModel.publishDiagnosisReport has cyclomatic complexity 17 (threshold 15). 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: 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":10952}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c248f66847a3b862f4fc091157ea96881ed364752af60ccafc2b8d2f39921d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaOnDeviceModel.dataBlock (cyclomatic 17): AtriaOnDeviceModel.dataBlock 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":"Atria/Atria/AtriaOnDeviceCoach.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2efd134656c0bb4a4229f6cf479ff5e1ab995707969093bd53603e237ab5bfe"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPreparedMetricChart.chartContent (cyclomatic 17): AtriaPreparedMetricChart.chartContent 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. This is NOT this file\u0027s highest cyclomatic complexity: AtriaTodayMetric.label (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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":7364}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3d1ddc8f4e6b3e09264f7536334e99c37b8aa05749157e9295de28a98bf035"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaPhysiologicalStressModel.qualifiedRMSSD (cyclomatic 17): AtriaPhysiologicalStressModel.qualifiedRMSSD 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f687ba1b2aa9a12caa5becc119ee07ab7c83286b26ebbf66cb7cd211a79de7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredMotionProjection.epochFeaturesCancellable (cyclomatic 17): AtriaRecoveredMotionProjection.epochFeaturesCancellable 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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"d084904eedc1ad5f24723191b0e5c52159974ed5f5ef5082dd9458f12d1aa8e7"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSensorReferenceEntry.init (cyclomatic 17): AtriaSensorReferenceEntry.init has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSensorReferenceCapture.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b72ef9d9ea26bbca5c5b90a217f5433418f79c4f7ff04637c9e80700effa69"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepHypnogramPresentation.compositedRuns (cyclomatic 17): AtriaSleepHypnogramPresentation.compositedRuns 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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"617b256ebebd88c3fd5f7083efb241725cccf86cfbe7e86fd81bf559d6609677"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStrainLoadModel.evaluateInterval (cyclomatic 17): AtriaStrainLoadModel.evaluateInterval 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":"Atria/Atria/AtriaStrainLoadModel.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a8f5a0152aba26b98dfbc32b37e4f2049012db9349ce8ca8a93d59363141376"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStressElevatedEvidence.analyze (cyclomatic 17): AtriaStressElevatedEvidence.analyze has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"193c15bf97b58826fa294386ef57a3ba5162f1a38f8b95819decb7da72666095"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTrendActionReadout.init (cyclomatic 17): AtriaTrendActionReadout.init has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a8b3509471f2dad60670e5b1f58288ed5169081270a7235f5e006739425c5e5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHeartRateAxisChart.baseChart (cyclomatic 17): AtriaHeartRateAxisChart.baseChart 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4709}}}],"partialFingerprints":{"codehealthFindingId/v1":"db34ce6b6fad0a0ba3e114b263a7de1b9f312373e9b1f56ba2ccc8ef0c2eb180"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoricalRecordDecoder.decodeFixedLayout (cyclomatic 17): AtriaWhoop4HistoricalRecordDecoder.decodeFixedLayout 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":"Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06ba663d5cb5e16590b9355fa9b90d18ff803b64b4000186a7b34a5f438af80"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.recordEmptyArchiveDurabilityBoundary (cyclomatic 17): AtriaWhoop4HistoryAdmissionLedger.recordEmptyArchiveDurabilityBoundary 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"38a4e4ccffcdc579f0d87f7d9d05de8df81866388595a523de4dd083220625f3"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivityFragments (cyclomatic 17): AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivityFragments 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1811}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c18794c1187592179f37d65a9f27f80d2c2a131cf81acf7ceeaaca5c31026e"}},{"ruleId":"D1","level":"warning","message":{"text":"DailyRecoveryResolver.metricMatchesCurrentPhysiologicalNight (cyclomatic 17): DailyRecoveryResolver.metricMatchesCurrentPhysiologicalNight 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2bd58ce124f5c5f1f39213b2edb8580944044758c7a74516537a54601bdeb5"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.recordDrainedThroughCompletionIfNeeded (cyclomatic 17): HistoricalArchive.recordDrainedThroughCompletionIfNeeded 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2619}}}],"partialFingerprints":{"codehealthFindingId/v1":"813b6659e89e35663ec22cb84a8b90272bc5a7171f3628bd8aaf1a188400fd92"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.append (cyclomatic 17): HistoricalArchive.append 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8900}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa98ae6d48a9c2da20d88b7b536244fccc5d7a9b7301f77e8eb56bc4afc2d792"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedSession.distinctCoverageHonestWindows (cyclomatic 17): SavedSession.distinctCoverageHonestWindows 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffa66d74a78ee2feacd53688aee2cfb937090b3db05efd4bd092c4ab10edfac"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkoutReadiness.gappedStrengthReviewCandidate (cyclomatic 17): WorkoutReadiness.gappedStrengthReviewCandidate 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. This shape REPEATS in the file: one other method here (WorkoutReplaySummary.gappedStrengthReviewCandidate) 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":3042}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f997be41ac01e57d70b261f66f8eea0f5c0f4c3789e642a57c4ffb727edcec"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaSleepStageIntegrity.validates (cyclomatic 17): AtriaSleepStageIntegrity.validates 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4157}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab1d9b94ac54b74fa8a426c5cb8d21820242179a6f79e6b1829aa0292547e22"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkoutReplaySummary.gappedStrengthReviewCandidate (cyclomatic 17): WorkoutReplaySummary.gappedStrengthReviewCandidate 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. This shape REPEATS in the file: one other method here (WorkoutReadiness.gappedStrengthReviewCandidate) 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":6548}}}],"partialFingerprints":{"codehealthFindingId/v1":"c41672f4a61650880dbd6b080ecbf051a1623e0e754ce2bdbb8c39aaa872ccd1"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.verifiedCanonicalStepEvidenceDaysCancellable (cyclomatic 17): SessionStore.verifiedCanonicalStepEvidenceDaysCancellable 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21678}}}],"partialFingerprints":{"codehealthFindingId/v1":"40cb798d2051b80c4a81f001fd7654d69535a316ce8c1b2d01f2211b0717ddf2"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.preservingMonotonicResearchAggregates (cyclomatic 17): SessionStore.preservingMonotonicResearchAggregates 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29265}}}],"partialFingerprints":{"codehealthFindingId/v1":"577900c466aadd977a34b19af7b5504132644f5a4160f8897a59c3ce1dcaf2f9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmMetadataOnlyWorkout (cyclomatic 17): SessionStore.confirmMetadataOnlyWorkout 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34589}}}],"partialFingerprints":{"codehealthFindingId/v1":"972d1612209cdbcf871a105d9cbf5f0b0628b476eab9620a99544ecec86beab4"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.isHighSpecificityFragmentedHROnlyMainSleepCandidate (cyclomatic 17): SessionStore.isHighSpecificityFragmentedHROnlyMainSleepCandidate 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42064}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff8857cd92af6623386b4bf318bee317a0ed3057a7844c32218fc15daf81485"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.sleepStageQualifiedRRInputs (cyclomatic 17): SessionStore.sleepStageQualifiedRRInputs 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43936}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc328b5e1605a58f34cc3b8052de1f9a5edc9f41bec679037145a94f4fd43a6d"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.shouldSplitPostWakeNap (cyclomatic 17): SessionStore.shouldSplitPostWakeNap 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56559}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a68faf87c01af80108fa6788eec5bf10e171bbd35aae987cd1248d359992d69"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoryView.body (cyclomatic 17): HistoryView.body 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58755}}}],"partialFingerprints":{"codehealthFindingId/v1":"94abf62cc1f3d87be24775f0fe941e7b89646f3f6039700b89b20d8ab664bef5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWidgetProvider.getTimeline (cyclomatic 17): AtriaWidgetProvider.getTimeline 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba79ffe60fb43b38dffc7b664f4c6e77a581ba19a422ea0616f92ea5a595d5b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWidget.swift.liveActivityDailyStepGoalPresentation (cyclomatic 17): AtriaWidget.swift.liveActivityDailyStepGoalPresentation 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2697}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd5285b541721764e2b3b8c6ee3fafdb7525e958d28e2c80c2f8f664ec208002"}},{"ruleId":"D1","level":"warning","message":{"text":"ActiveSessionJournal.replaying (cyclomatic 16): ActiveSessionJournal.replaying has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"aba75bf6f8a1e46fc449e63ff2caa4a8318a532b31b662c0714355d318eedffb"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldSendCoverLiveBoundedRawCapture (cyclomatic 16): AtriaBLEManager.shouldSendCoverLiveBoundedRawCapture 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4832}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8f54eee0d2a2e64706a3f16e9ba199e5f3895aa5eb27d04b19a3d085e7f356"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldRefreshIMUOnLiveHeartRateFallback (cyclomatic 16): AtriaBLEManager.shouldRefreshIMUOnLiveHeartRateFallback 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4960}}}],"partialFingerprints":{"codehealthFindingId/v1":"f35bc24fbab2921eb146761621359207779d0ae37bba5741f93b8bced4c3f47d"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.handleInteractiveForeground (cyclomatic 16): AtriaBLEManager.handleInteractiveForeground 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9622}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68caa05b29be70407d734e0184b933c31454318e014c06027b70c576e3b95ac"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.reassertHeartRateNotificationsIfConnected (cyclomatic 16): AtriaBLEManager.reassertHeartRateNotificationsIfConnected 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9771}}}],"partialFingerprints":{"codehealthFindingId/v1":"252051490b00334a2ce0022c75b28d9b80fcbb5e6319121b5e416ff30f170ab0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.reassertR10NotificationIfConnected (cyclomatic 16): AtriaBLEManager.reassertR10NotificationIfConnected 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9848}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce4768fdd85527792462be3fa12bc1d179b0e4e2e79c7a59693663004299673"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldReacquireInterruptedFullDrain (cyclomatic 16): AtriaBLEManager.shouldReacquireInterruptedFullDrain 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11613}}}],"partialFingerprints":{"codehealthFindingId/v1":"e646dfa34eea38fd3f9173ed2752a12f3d8f49038c9492191a4838341f7f74ce"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.releaseConnectedHistoricalSliceIfNeeded (cyclomatic 16): AtriaBLEManager.releaseConnectedHistoricalSliceIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":18259}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ec6a4644c1f9d04116801bdfe7f2f5426c7252683a8c5bd6447d9a71cf1ee2"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.finishRecording (cyclomatic 16): AtriaBLEManager.finishRecording 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30536}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a078531206d39d5ef5d4af079720a931361f44a2140c535186880ab24a092a"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.sendSacrificialFastDrainCommand (cyclomatic 16): AtriaBLEManager.sendSacrificialFastDrainCommand 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41392}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e1d7174085129c992fe4a7279fed925fcda66c564f645655f386e3effba44f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.addRRBatch (cyclomatic 16): AtriaBLEManager.addRRBatch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49908}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eea57d7d3bfe512dd8a5fccabfd60beeb2f17ad632e4d74bf0778ed07ecb59c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.selectedIdleWindowHistoryDrain (cyclomatic 16): AtriaBLEManager.selectedIdleWindowHistoryDrain 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"5082966f716abcb89d859648ad8e15db22be27b7ef3c44347374462c608e4ba8"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.shouldAdmitIdleWindowHistoryDrainRetry (cyclomatic 16): AtriaBLEManager.shouldAdmitIdleWindowHistoryDrainRetry 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"7209fd6c503183158d12141d7e1d2b4db184de389c47d6b564181eec6bd0b067"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaBLEManager.batteryLevelAcceptanceDecision (cyclomatic 16): AtriaBLEManager.batteryLevelAcceptanceDecision 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":"Atria/Atria/AtriaStrapPowerPolicy.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"6665680be7d9433edaaf778dc285b09724a9dcc1ef8f2379217969d81b94b099"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHealthspanDetailView.orb (cyclomatic 16): AtriaHealthspanDetailView.orb 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":"Atria/Atria/AtriaHealthspanDetailView.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"7063ad2c2d5259752f1c039e1ba1469115e6bc8efd17081e081fde81e26efaa6"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalActivityInspectionProofFactory.prepareUsingFullScan (cyclomatic 16): AtriaHistoricalActivityInspectionProofFactory.prepareUsingFullScan 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f146ecbfd68813dd489264bde74ec8a97f222ad61c16102da21b96be19fc63"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.init (cyclomatic 16): AtriaHistoricalArchiveDurableStore.init 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc08324d07ff285a2b2ef24e21f84b7cf6e846bfc2e691762ff66fd67a1dc8f"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerDestinationStore.existingApplication (cyclomatic 16): AtriaHistoricalCanonicalConsumerDestinationStore.existingApplication 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"4beaa214252b7eb68c7e9fded2800fcfd18d6a74be443109a36eac65eb24a42b"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.arm (cyclomatic 16): AtriaHistoricalFullDrainCoverageStore.arm 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4fcc978438659a6b6dfd5551f82079e682ea0708005324acd9ff5fcaad6126e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.validate (cyclomatic 16): AtriaHistoricalFullDrainCoverageStore.validate 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"a85a27edaee4a2c518375d6113c404908e6f184961eeb0fd92df7665664ce19e"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalGapLedger.continuity (cyclomatic 16): AtriaHistoricalGapLedger.continuity 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c75bb8bbe4270652a3f708363620edb127abf0c59c12f3e2b051d8bf2e63b4"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalSealedJSONLCompression.loadAndVerifyCommitted (cyclomatic 16): AtriaHistoricalSealedJSONLCompression.loadAndVerifyCommitted 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"516beb14290cdae4f7fcbddabed0cce5fcffc4663dcafa7007df6384f4edd255"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLiveWorkoutTabAccessory.body (cyclomatic 16): AtriaLiveWorkoutTabAccessory.body 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":8589}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f926983331ae03d8875cbf5e165bd164a32207172c42926a285f9ddc09fd91"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaLearnedInsights.dayRead (cyclomatic 16): AtriaLearnedInsights.dayRead 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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c9e6b88b360f22e42cdcd77c1a4f6dc71b40c37ffd78f8a7c3ca36f257d200"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaMetricZone.zone (cyclomatic 16): AtriaMetricZone.zone 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":"Atria/Atria/AtriaMetricTargets.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"943f692786f8cad04b8b967e1016aee4249ab8979a04f9881396aa9ad8621621"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveryScoreHero.body (cyclomatic 16): AtriaRecoveryScoreHero.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. This is NOT this file\u0027s highest cyclomatic complexity: AtriaTodayMetric.label (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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":7846}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe439a6d76516cc017c0f3d7704454710fc3559919394203130765bf8f0be5e0"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaRecoveredMotionAnalytics.sleepProvenance (cyclomatic 16): AtriaRecoveredMotionAnalytics.sleepProvenance 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37522bebe5e85aff011dda01815d6b541d03d7fdb97fc0cea6ebfc4f63cde69"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStepsWeekChart.body (cyclomatic 16): AtriaStepsWeekChart.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":"Atria/Atria/AtriaStepsWeekChart.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"3191eff346520a733b4a864a5c7e274c9ef01e148e037d0cafc463eae6d04876"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaStrapCalibrationArchive.materializeDecodedCompactIMUSamplesFromArchive (cyclomatic 16): AtriaStrapCalibrationArchive.materializeDecodedCompactIMUSamplesFromArchive 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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"7901500f12cacdcf8309437647313819627252c73913861b2a7d87a7afb4a587"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaHistoricalStressReplay.snapshot (cyclomatic 16): AtriaHistoricalStressReplay.snapshot 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"01306f35fd9d98c30783a5b65faccd70ee1b9a0a949439fcbebc5a1e7f8ac2d5"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaTrendChartCard.body (cyclomatic 16): AtriaTrendChartCard.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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"42001b21545e319fd1f23d9d320e19a65c6b02b61b3785a4125b495e3b63c81c"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaCollectionResearchSignalsCard.body (cyclomatic 16): AtriaCollectionResearchSignalsCard.body 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":2259}}}],"partialFingerprints":{"codehealthFindingId/v1":"aec0932f59adaa43405a81e7bfb056808751fd6855903697ed2315afaf691786"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.motionTickWindowRead (cyclomatic 16): AtriaWhoop4MotionTickCompactStore.motionTickWindowRead 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"8731806dd32668453b503ad55507f5cb5b92dfdb3c91af9183d20f1bbd780bee"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWorkoutPromptEvaluator.lastCompletedSustainedBout (cyclomatic 16): AtriaWorkoutPromptEvaluator.lastCompletedSustainedBout has cyclomatic complexity 16 (threshold 15). Of this number, 12 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":"Atria/Atria/AtriaWorkoutPromptEvaluator.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a591e871b4b6542d121801203f3bae18bf74efa33f73584e154c106f8c86a61"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataBootstrapDescriptorsAreAdmissible (cyclomatic 16): HistoricalArchive.automaticRecoveredDataBootstrapDescriptorsAreAdmissible 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4678}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60c392ecb5fc00b346088556c327f690e9e4ff0f93eeaa1404c33765d0d1367"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.prunedRecoveredCache (cyclomatic 16): HistoricalArchive.prunedRecoveredCache has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 5 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6927}}}],"partialFingerprints":{"codehealthFindingId/v1":"2999aa1654a13d4ea556cae9ab9eb78b7fd6ef0d08687438d5d57dd4c1060cd9"}},{"ruleId":"D1","level":"warning","message":{"text":"HistoricalArchive.fastHeartRatePoint (cyclomatic 16): HistoricalArchive.fastHeartRatePoint 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9466}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec26d8819bfecdf1362cb5a67b655938a1f0ea644e74a15bb960df904b95471"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalNotificationScheduler.scheduleActionableConnectionDiagnosis (cyclomatic 16): LocalNotificationScheduler.scheduleActionableConnectionDiagnosis 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa3f118daaef54f08c610b5485b6177353758ab391a109147f4a579b16f44ac2"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.persistPreparedDailyRollups (cyclomatic 16): SessionStore.persistPreparedDailyRollups 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13397}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab550b265de0257dd63af6e22d92b77259efa37a2ec7dd242a81051a40200aee"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.runRecoveredIndependentDerivedSteps (cyclomatic 16): SessionStore.runRecoveredIndependentDerivedSteps 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19576}}}],"partialFingerprints":{"codehealthFindingId/v1":"eece842dea4a9546ee8354dcdd01f4d0f162cc4a7ebbb326d00c5b21532f24be"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.shouldAdmitAutomaticArchiveCompaction (cyclomatic 16): SessionStore.shouldAdmitAutomaticArchiveCompaction 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28160}}}],"partialFingerprints":{"codehealthFindingId/v1":"19af5f37256bbfa896674f398c77eb20f2142a83b03ae82c4d7eec411e31e50f"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.preferredGrowingSleepReview (cyclomatic 16): SessionStore.preferredGrowingSleepReview 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37671}}}],"partialFingerprints":{"codehealthFindingId/v1":"2151ab008d779fdf920808f845c4162a0129e1d0bf33cf29707f2c58cc2bf669"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.maybeScheduleDaytimeQuiescenceReview (cyclomatic 16): SessionStore.maybeScheduleDaytimeQuiescenceReview 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. This is NOT this file\u0027s highest cyclomatic complexity: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":39774}}}],"partialFingerprints":{"codehealthFindingId/v1":"08386260289669d2b1dd2942b11d3fd79fedbb5949264e4e974ce0114c3e0a12"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.prepareWakeBoundarySleep (cyclomatic 16): SessionStore.prepareWakeBoundarySleep 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41626}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62287c83b3efb183b85b5ffee9f691c67bde6f889cc8f3d564eb39db75babd9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.isStrongAutoConfirmableSleepCandidate (cyclomatic 16): SessionStore.isStrongAutoConfirmableSleepCandidate 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42000}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ae6aa1f65be1f98eb2694291a5d53d31a105d1865958602f09248418f98215"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.isUnambiguousHROnlyMainSleepCandidate (cyclomatic 16): SessionStore.isUnambiguousHROnlyMainSleepCandidate 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42093}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3061dc67191c7275fb9bd07aabe349e7a507ce0aed47b0549ee5767536e26f9"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionStore.confirmedMainSleepHRVEvidenceCancellable (cyclomatic 16): SessionStore.confirmedMainSleepHRVEvidenceCancellable 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: Tag.label (cyclomatic 41) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44567}}}],"partialFingerprints":{"codehealthFindingId/v1":"960dffcf0ad7c55c313b55b1461e91c156edc2b8065a2301acef77726dd9d3a9"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSnapshotPublisher.timelineReloadDelay (cyclomatic 16): WidgetSnapshotPublisher.timelineReloadDelay 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":2504}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed992aafbcd9191f30cd7c06cd8fed09a85053063071f5a567247e6b8d2d0742"}},{"ruleId":"D1","level":"warning","message":{"text":"AtriaWidgetMetric.value (cyclomatic 16): AtriaWidgetMetric.value 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3608}}}],"partialFingerprints":{"codehealthFindingId/v1":"50bb4ed36f9e9a7ff8f6f5678da7b112df3308e581343b2400dcbee0d90809c7"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.aggregateSleepCandidatesCore (cognitive 330): SessionStore.aggregateSleepCandidatesCore has cognitive complexity 330 (threshold 15). Drivers by points: boolean chains 160, if/else 71 (118 pts), loops 20 (29 pts), ternaries 16 (22 pts), match/switch 1 (nesting depth added 62). Of this number, 323 points are the body\u0027s own statements and 7 belong to one function item 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":50025}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c29bd542b6ba4c03e9728036a3de1cdb7c88eddfa6e74d524b7c0ccb81793ad"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.validateSessionBackupEnvelopeForImport (cognitive 302): SessionStore.validateSessionBackupEnvelopeForImport has cognitive complexity 302 (threshold 15). Drivers by points: boolean chains 336, if/else 16 (24 pts), loops 5 (7 pts), ternaries 3 (nesting depth added 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. This shape REPEATS in the file: one other method here (SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48099}}}],"partialFingerprints":{"codehealthFindingId/v1":"15cd9fe9cd25ca4b074bae59ba5bc78a5be5c77fd9d682afdc36250d16f04adf"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.compactArchive (cognitive 257): HistoricalArchive.compactArchive has cognitive complexity 257 (threshold 15). Drivers by points: if/else 58 (152 pts), ternaries 16 (57 pts), error handling 7 (21 pts), boolean chains 12, loops 3 (9 pts), match/switch 2 (6 pts) (nesting depth added 159). Of this number, 255 points are the body\u0027s own statements and 2 belong 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9722}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69431e56b8e3eb11de0a61ec84eb4c6e4cd10c198d9e6e300ae9261a0065af4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded (cognitive 236): AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded has cognitive complexity 236 (threshold 15). Drivers by points: if/else 61 (87 pts), boolean chains 80, ternaries 34 (64 pts), error handling 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13289}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8aafbb49e6cde394097348c7214cbb55ba26798123be8056aa3b42ad2a391d2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armHistoryOnlyProbe (cognitive 235): AtriaBLEManager.armHistoryOnlyProbe has cognitive complexity 235 (threshold 15). Drivers by points: if/else 67 (152 pts), boolean chains 53, loops 7 (15 pts), ternaries 7 (13 pts), match/switch 1 (2 pts) (nesting depth added 100). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40410}}}],"partialFingerprints":{"codehealthFindingId/v1":"15353027d4698352a5fab9c967d979e4c8a3213a34d2449f4e492bb90836ad58"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cognitive 231): AtriaBLEManager.peripheral has cognitive complexity 231 (threshold 15). Drivers by points: if/else 72 (159 pts), boolean chains 44, ternaries 7 (19 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 104). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55594}}}],"partialFingerprints":{"codehealthFindingId/v1":"e419653a5a7d0b742e59363cd078f91c48365c166019d923dd59523f376baac1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleFullDrainConsumerMaterialization (cognitive 215): AtriaBLEManager.scheduleFullDrainConsumerMaterialization has cognitive complexity 215 (threshold 15). Drivers by points: if/else 61 (157 pts), boolean chains 31, error handling 9 (15 pts), ternaries 4 (12 pts) (nesting depth added 110). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46608}}}],"partialFingerprints":{"codehealthFindingId/v1":"da28cdeb5d3320603aaa86a1ced4e465eca60841ae576834f035a8742ad32b75"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cognitive 211): AtriaBLEManager.peripheral has cognitive complexity 211 (threshold 15). Drivers by points: if/else 77 (147 pts), boolean chains 33, ternaries 7 (21 pts), loops 4 (6 pts), match/switch 2 (4 pts) (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56686}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d57d1e5e09aa8c4d8ecc0445baae5f6e96595f93fed21d49a381b35d7e240b6"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.resumedSleepReviewCandidatesCore (cognitive 185): SessionStore.resumedSleepReviewCandidatesCore has cognitive complexity 185 (threshold 15). Drivers by points: if/else 41 (108 pts), loops 22 (48 pts), boolean chains 25, ternaries 2 (4 pts) (nesting depth added 95). Of this number, 180 points are the body\u0027s own statements and 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51622}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4f0cd52f6954bfef258873575b08da450c54b184ea3b2295917063038a554c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4SacrificialFastDrainReceiptVerifier.verify (cognitive 178): AtriaWhoop4SacrificialFastDrainReceiptVerifier.verify has cognitive complexity 178 (threshold 15). Drivers by points: boolean chains 84, if/else 34 (84 pts), match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 56). 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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"94242c39116a44a62aceca20d5071887105106996b7c7b6274e2fa23e34014a9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.processHistoricalDrainEffects (cognitive 166): AtriaBLEManager.processHistoricalDrainEffects has cognitive complexity 166 (threshold 15). Drivers by points: if/else 41 (125 pts), boolean chains 25, error handling 2 (7 pts), ternaries 2 (6 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 94). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45898}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d1979ab4485ebe696fd8888d9e2e829ee91fc641b9cc76466197dca7d4b271"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cognitive 164): AtriaBLEManager.centralManager has cognitive complexity 164 (threshold 15). Drivers by points: if/else 69 (97 pts), boolean chains 37, ternaries 14 (30 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54164}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aa0d0e994b9ba4ae931f195ed81f0b422e9cd99cf2d964b16c60398f5915ccc"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.applyLaunchAutomation (cognitive 159): AtriaBLEManager.applyLaunchAutomation has cognitive complexity 159 (threshold 15). Drivers by points: if/else 67 (81 pts), boolean chains 66, ternaries 5 (10 pts), loops 1 (2 pts) (nesting depth added 20). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24590}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a9d753756b2c0287f5c4d165a1ff5adfe8231706fa09fff1fdb22b9368a5fa"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logGateStatusFromLaunchIfRequested (cognitive 143): SessionStore.logGateStatusFromLaunchIfRequested has cognitive complexity 143 (threshold 15). Drivers by points: ternaries 103 (104 pts), boolean chains 32, if/else 7 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31247}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2994c2394ee84d1c73974c36782ee84f25de812315e61c95451425bf549a251"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.snapshotPreservingFresherStepAuthority (cognitive 143): WidgetSnapshotPublisher.snapshotPreservingFresherStepAuthority has cognitive complexity 143 (threshold 15). Drivers by points: if/else 32 (62 pts), ternaries 12 (48 pts), boolean chains 33 (nesting depth added 66). 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"77561f8e4b4340a5fb1c283edc52eec0b065b4f4b4a44c55cae10bceb637115a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.validate (cognitive 140): AtriaHistoricalFullDrainCoverageStore.validate has cognitive complexity 140 (threshold 15). Drivers by points: boolean chains 77, if/else 31 (58 pts), match/switch 2 (3 pts), error handling 1, loops 1 (nesting depth added 28). 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c3dbe8b6329d6a0f086f8970d46b5d56dd5e327cd98581380c9dcccb79503c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startOfflineHistoricalSync (cognitive 139): AtriaBLEManager.startOfflineHistoricalSync has cognitive complexity 139 (threshold 15). Drivers by points: if/else 63 (84 pts), boolean chains 43, ternaries 7 (9 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 24). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16963}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c308055dd0aba850dcf185a6d1925e833649e8ed72eafd45c70fb1307722371"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.runRecoveredHeartRateProjection (cognitive 135): SessionStore.runRecoveredHeartRateProjection has cognitive complexity 135 (threshold 15). Drivers by points: if/else 79 (105 pts), boolean chains 17, loops 5 (7 pts), match/switch 3 (4 pts), ternaries 2 (nesting depth added 29). Of this number, 120 points are the body\u0027s own statements and 15 belong to 5 function items 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15199}}}],"partialFingerprints":{"codehealthFindingId/v1":"5edc873ed24426356de18aff6dd6ec5cafe74542099f84998d23b1ca66733ea3"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logBoundedLargeStoreGateStatus (cognitive 128): SessionStore.logBoundedLargeStoreGateStatus has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 90 (94 pts), boolean chains 31, if/else 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, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31571}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b3e0d5f9382c035305c4953e8a135460d43917f144c4e02f07dff11e28388c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.awakeSplitSubClusters (cognitive 128): SessionStore.awakeSplitSubClusters has cognitive complexity 128 (threshold 15). Drivers by points: if/else 29 (75 pts), loops 10 (19 pts), ternaries 5 (19 pts), boolean chains 15 (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":51200}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18714498d1de3eada959b00f2fa99ff23b0ec86ad972f0b5c7e5334da482ed8"}},{"ruleId":"D2","level":"warning","message":{"text":"validate_hrv.main (cognitive 124): validate_hrv.main has cognitive complexity 124 (threshold 15). Drivers by points: if/else 70 (89 pts), ternaries 12 (15 pts), boolean chains 14, loops 4 (6 pts) (nesting depth added 24). 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":"validate_hrv.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee5f6ca583612d104df1105c4bb2d14ae93db84713a62e20491ddabdc65e699"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPhysiologicalCycle.canonicalMainSleepsCancellable (cognitive 123): AtriaPhysiologicalCycle.canonicalMainSleepsCancellable has cognitive complexity 123 (threshold 15). Drivers by points: if/else 33 (83 pts), boolean chains 19, loops 9 (18 pts), ternaries 2 (3 pts) (nesting depth added 60). Of this number, 92 points are the body\u0027s own statements and 31 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e6311cd57bfddc60c983398232b2ba95cb341580f9da163ebc1b153cfd3f46"}},{"ruleId":"D2","level":"warning","message":{"text":"SleepHistorySnapshot.init (cognitive 121): SleepHistorySnapshot.init has cognitive complexity 121 (threshold 15). Drivers by points: if/else 32 (75 pts), boolean chains 23, loops 7 (14 pts), ternaries 5 (9 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60294}}}],"partialFingerprints":{"codehealthFindingId/v1":"68dd6469d76512ad474c3a8ce60595cb7b4c864c805b96c5cfcd841855659608"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightMotionRead (cognitive 120): AtriaWhoop4MotionTickCompactStore.latestNightMotionRead has cognitive complexity 120 (threshold 15). Drivers by points: if/else 28 (74 pts), boolean chains 28, loops 5 (10 pts), error handling 3 (6 pts), match/switch 2 (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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"18641d44bb270c9d1fb95b64b7eb61c1e46412e9c358ed7194990244c6682efc"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.finishOfflineHistoricalSync (cognitive 115): AtriaBLEManager.finishOfflineHistoricalSync has cognitive complexity 115 (threshold 15). Drivers by points: boolean chains 74, if/else 28 (37 pts), error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19222}}}],"partialFingerprints":{"codehealthFindingId/v1":"556e9bab00e8b2afe010e7f0ea5d5f61e435e9f2d580aa34460bcfe326f0fcc3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded (cognitive 114): AtriaBLEManager.resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded has cognitive complexity 114 (threshold 15). Drivers by points: if/else 44 (59 pts), boolean chains 46, ternaries 7, match/switch 1 (2 pts) (nesting depth added 16). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38001}}}],"partialFingerprints":{"codehealthFindingId/v1":"c564d58e68903b968b06bd068de9663a06a78a94a607990abfeeda7642aa1321"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTopStatusProjection.presentation (cognitive 114): AtriaTopStatusProjection.presentation has cognitive complexity 114 (threshold 15). Drivers by points: if/else 37 (50 pts), ternaries 15 (46 pts), match/switch 5 (11 pts), boolean chains 7 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14203}}}],"partialFingerprints":{"codehealthFindingId/v1":"519662b7a652380e083dac8b4115e81ce7a30259ef5009c6fe25f1d5eb725ce1"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.compactLatestNightSessionSlice (cognitive 114): SessionStore.compactLatestNightSessionSlice has cognitive complexity 114 (threshold 15). Drivers by points: if/else 29 (78 pts), boolean chains 17, loops 5 (12 pts), ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 60). Of this number, 108 points are the body\u0027s own statements and 6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38605}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3649f74d3df11cdb581d5fc443cc48aa19663e8d90f583d1f0cb111d92e0b6a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.handleRecoveredDataRecomputeEffects (cognitive 107): SessionStore.handleRecoveredDataRecomputeEffects has cognitive complexity 107 (threshold 15). Drivers by points: if/else 28 (84 pts), ternaries 5 (16 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":18410}}}],"partialFingerprints":{"codehealthFindingId/v1":"196c8cc876a751ba2a8be2cdfcf05c87886ad6270b85ba59f7285a35440f34fb"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.backfillConfirmedSleepStagesFromSessions (cognitive 106): SessionStore.backfillConfirmedSleepStagesFromSessions has cognitive complexity 106 (threshold 15). Drivers by points: if/else 30 (78 pts), boolean chains 15, loops 4 (11 pts), error handling 1, ternaries 1 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":46346}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a8c6eecbd08c61b356b8accb58720acc7842d730f0db271ee0255efd9ab07a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cognitive 101): AtriaBLEManager.peripheral has cognitive complexity 101 (threshold 15). Drivers by points: if/else 47 (77 pts), boolean chains 19, ternaries 3 (5 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56373}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c27eaa5d453c9f371b465295d0b47fc138d4905cd7a465f75415c77d91696f2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidgetMetric.statusText (cognitive 100): AtriaWidgetMetric.statusText has cognitive complexity 100 (threshold 15). Drivers by points: if/else 30 (71 pts), ternaries 6 (17 pts), boolean chains 11, match/switch 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3653}}}],"partialFingerprints":{"codehealthFindingId/v1":"f207e727dc2c4e22dce561749d1c1913190324d1123a2fe385bf9b6f6f952509"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.init (cognitive 99): AtriaBLEManager.init has cognitive complexity 99 (threshold 15). Drivers by points: if/else 44 (60 pts), boolean chains 21, ternaries 9 (17 pts), error handling 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6959}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd4bb1632eb55e414e670f139654647962aec05c25ac9b9c8fa79c39b2c8fb9"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.publish (cognitive 95): WidgetSnapshotPublisher.publish has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 47 (54 pts), if/else 20 (22 pts), boolean chains 19 (nesting depth added 9). 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"df513998b188673a81c9da1d586420345bdecd1058c93b0d80246d2068d119d1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightEpochFeature (cognitive 93): AtriaWhoop4MotionTickCompactStore.latestNightEpochFeature has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (48 pts), boolean chains 22, loops 7 (16 pts), ternaries 5 (7 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd40540fb760f0212b3bedcc5d08ea52909ec0f7e6db85bf7b470d773852f22"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaColdSessionSourceScanner.scanFrames (cognitive 92): AtriaColdSessionSourceScanner.scanFrames has cognitive complexity 92 (threshold 15). Drivers by points: if/else 25 (77 pts), error handling 1 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaColdSessionSourceScanner.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce5779cffe982bf70409c0a2e05309902a8d1cb34c9d09d25a7162f3e4cb377"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDailyStepPresentation.resolve (cognitive 92): AtriaDailyStepPresentation.resolve has cognitive complexity 92 (threshold 15). Drivers by points: boolean chains 49, ternaries 20 (29 pts), if/else 13 (14 pts) (nesting depth added 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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"523b290e9b27a3591359dde6847a96cd84334e17a2b5f50b48d9822dd0bea48d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutActivityType.resolved (cognitive 91): AtriaWorkoutActivityType.resolved has cognitive complexity 91 (threshold 15). Drivers by points: if/else 60, boolean chains 31. 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":"Atria/Atria/AtriaExerciseCatalog.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f37cb787778374bd9e34667d7d8b98a2714735452a73707704a3ee1dad7572"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.archiveOnlyHeartRateSegmentsCancellable (cognitive 90): SessionStore.archiveOnlyHeartRateSegmentsCancellable has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (56 pts), boolean chains 19, loops 9 (14 pts), ternaries 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":27378}}}],"partialFingerprints":{"codehealthFindingId/v1":"78bf79e953f71b92480d0a12c3568131dc7dfa61649c8af9544532942fbe65fa"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.streamedWholeArchiveDigest (cognitive 89): AtriaHistoricalAggregateReader.streamedWholeArchiveDigest has cognitive complexity 89 (threshold 15). Drivers by points: if/else 19 (49 pts), boolean chains 27, error handling 4 (9 pts), loops 3 (4 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"431a9471b781e9da688c0528e750fd3830d31fabccc2fc0547046063e79931af"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.runForegroundKeepaliveTick (cognitive 88): AtriaBLEManager.runForegroundKeepaliveTick has cognitive complexity 88 (threshold 15). Drivers by points: if/else 35 (52 pts), boolean chains 25, ternaries 6 (9 pts), match/switch 1 (2 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10681}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6d6789819d6dbb463c00bb1bb7816f46cd1faad3bd204f7c63c6a6e4ce8ad2b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeBehaviorCorrelationSummariesCancellable (cognitive 88): SessionStore.makeBehaviorCorrelationSummariesCancellable has cognitive complexity 88 (threshold 15). Drivers by points: if/else 22 (47 pts), ternaries 9 (17 pts), loops 10 (13 pts), boolean chains 11 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":47378}}}],"partialFingerprints":{"codehealthFindingId/v1":"3910e182faf76f606a180cc189d0254844ba8347b517b809170b303e47485da4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleLongWearSupervisor (cognitive 87): AtriaBLEManager.scheduleLongWearSupervisor has cognitive complexity 87 (threshold 15). Drivers by points: if/else 30 (64 pts), boolean chains 17, ternaries 2 (5 pts), loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25154}}}],"partialFingerprints":{"codehealthFindingId/v1":"e790e124cab4506d7e05488ee6b8ae1ab90024b0633a9c8c4b0aa7d8da4ec234"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cognitive 87): AtriaBLEManager.peripheral has cognitive complexity 87 (threshold 15). Drivers by points: if/else 35 (57 pts), ternaries 4 (14 pts), boolean chains 9, match/switch 2 (6 pts), loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b403de98773b820a9c6d78693448834d923362a006ab33902dfbe39dc8ce0e3a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.peripheral (cognitive 85): AtriaBLEManager.peripheral has cognitive complexity 85 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 31, ternaries 4 (11 pts), match/switch 1 (3 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56116}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8aa72a682636b76f09f96a58bbc3863d26d47b7ce16caa45de174fc725dc86"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.durableStepPatchedSnapshot (cognitive 85): WidgetSnapshotPublisher.durableStepPatchedSnapshot has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 41, if/else 15 (22 pts), ternaries 19 (21 pts), match/switch 1 (nesting depth added 9). 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"e948619dfecc59ec2e66f2b6e49e48ee53c223b00ce24d6afd2f7ad1128cf1e2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDiagnosisReport.discrepancies (cognitive 84): AtriaDiagnosisReport.discrepancies has cognitive complexity 84 (threshold 15). Drivers by points: boolean chains 45, if/else 31 (38 pts), loops 1 (nesting depth added 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":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1008b2f5f82d37ef39a4cb5036bec2bef5891918ebe336f98901b7b907b61a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.qualifiedOrdinaryBandPowerShare (cognitive 83): AtriaWhoop4GravityCadenceStepModel.qualifiedOrdinaryBandPowerShare has cognitive complexity 83 (threshold 15). Drivers by points: if/else 33 (49 pts), boolean chains 23, loops 6 (10 pts), ternaries 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"012ccaa15351a1ab3bfa741e4c6706b97e8d361f336c41477c3e867314481853"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.autoConfirmSleepOnForegroundIfUseful (cognitive 83): SessionStore.autoConfirmSleepOnForegroundIfUseful has cognitive complexity 83 (threshold 15). Drivers by points: if/else 36 (52 pts), boolean chains 18, ternaries 4 (7 pts), match/switch 3 (6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":39229}}}],"partialFingerprints":{"codehealthFindingId/v1":"2461a851b4d29fa16e57c1a64f94e0c973c100646350b74df29bbfcdcc71e7ef"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.makeRecoveredDataSnapshot (cognitive 82): HistoricalArchive.makeRecoveredDataSnapshot has cognitive complexity 82 (threshold 15). Drivers by points: if/else 41 (56 pts), boolean chains 19, loops 4 (6 pts), match/switch 1 (nesting depth added 17). Of this number, 65 points are the body\u0027s own statements and 17 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6298}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c694edfdc818c39f1881a34d17b284a17a048f78db0da5a6d7e101aea6962fb"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.attachRecoveredSkinTemperatureCancellable (cognitive 81): SessionStore.attachRecoveredSkinTemperatureCancellable has cognitive complexity 81 (threshold 15). Drivers by points: if/else 25 (52 pts), loops 11 (17 pts), boolean chains 10, ternaries 2 (nesting depth added 33). Of this number, 76 points are the body\u0027s own statements and 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22768}}}],"partialFingerprints":{"codehealthFindingId/v1":"d072214414c99c1bb73bdfc7f7029e38e7781c71322dbbf8f6e43d54ff33e9cd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cognitive 79): AtriaBLEManager.centralManager has cognitive complexity 79 (threshold 15). Drivers by points: if/else 38 (53 pts), boolean chains 17, ternaries 4 (9 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53660}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf9739b859cc99387aff2cead5e550d530a87f069e448508b6901e152da5063"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalJSONLRecentScanner.scan (cognitive 79): AtriaHistoricalJSONLRecentScanner.scan has cognitive complexity 79 (threshold 15). Drivers by points: if/else 17 (62 pts), loops 3 (8 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 52). Of this number, 52 points are the body\u0027s own statements and 27 belong to 2 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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f1dc12fb8e26ce0bc81389826ace5701091aaee4a839bd33f1c283ab178341"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startReadOnlyHistoryCaptureIfNeeded (cognitive 78): AtriaBLEManager.startReadOnlyHistoryCaptureIfNeeded has cognitive complexity 78 (threshold 15). Drivers by points: if/else 26 (40 pts), boolean chains 29, ternaries 4 (5 pts), loops 3, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41909}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c9eed894576d5f5e2ebcc889e93fc62cc2104f615b8ca53453a625d9a4c1771"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow (cognitive 78): AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow has cognitive complexity 78 (threshold 15). Drivers by points: if/else 31 (38 pts), boolean chains 27, loops 5 (8 pts), match/switch 1 (4 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"59eb130ac475c16b5f501bc950793c25c4182fb49b1f5913a01cc1fbf998456a"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.readAutomaticRecoveredDataBootstrapCheckpoint (cognitive 77): HistoricalArchive.readAutomaticRecoveredDataBootstrapCheckpoint has cognitive complexity 77 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 18, error handling 7 (11 pts), loops 4 (11 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4725}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4358a5c886bbbe45511d5760c7b2c3aa3686b68deb0d59969ef2566de1f9c5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.archiveOrphanHistoricalIngressIfNeeded (cognitive 76): AtriaBLEManager.archiveOrphanHistoricalIngressIfNeeded has cognitive complexity 76 (threshold 15). Drivers by points: if/else 23 (48 pts), ternaries 3 (10 pts), boolean chains 7, loops 2 (5 pts), match/switch 1 (4 pts), error handling 2 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":17830}}}],"partialFingerprints":{"codehealthFindingId/v1":"208d68ea4c545f374b060ed70df53e97f5cf903a835d8212ad08a160b74e13ba"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleConfirmedWorkoutArchiveRehydration (cognitive 76): SessionStore.scheduleConfirmedWorkoutArchiveRehydration has cognitive complexity 76 (threshold 15). Drivers by points: if/else 40 (51 pts), boolean chains 19, match/switch 1 (3 pts), ternaries 2, loops 1 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":19830}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8db2d34323d4ede4f3c2b1437ce83ffe724efd4ce1fb108c5d20992172eca6c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.evaluate (cognitive 75): AtriaHistoricalStressReplay.evaluate has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (40 pts), boolean chains 21, loops 8 (14 pts) (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2125}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a12f7719be47df5e2edbb00ff1ada86cd99b909623a62fdf7da627efcc7891"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveWorkoutTRIMPAccumulator.metrics (cognitive 74): AtriaLiveWorkoutTRIMPAccumulator.metrics has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 33, if/else 21 (33 pts), ternaries 5 (7 pts), 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02f49a173b2f9bc250098a6f07c12b969653a9899386c8a5ecb4314cbf0f48e"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.publishAndVerifyHistoricalConsumerCutover (cognitive 73): HistoricalArchive.publishAndVerifyHistoricalConsumerCutover has cognitive complexity 73 (threshold 15). Drivers by points: boolean chains 42, if/else 22 (27 pts), error handling 2, ternaries 2 (nesting depth added 5). Of this number, 72 points are the body\u0027s own statements and 1 belongs to one function item 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2721}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc767d29e661ddb3af340a49c325e96cd2cacdbc97dfdd38e235674b6deae93"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sleepStageResearchSegmentsCore (cognitive 72): SessionStore.sleepStageResearchSegmentsCore has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (48 pts), boolean chains 12, loops 6 (12 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":43794}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc937fda8bd63b048ff38bcf243615ce22e3e83e015875b0d7e6bc456b260d11"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.applyEarlyHistoricalLaunchConfiguration (cognitive 71): AtriaBLEManager.applyEarlyHistoricalLaunchConfiguration has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (48 pts), ternaries 6 (10 pts), boolean chains 9, error handling 2 (4 pts) (nesting depth added 29). Of this number, 59 points are the body\u0027s own statements and 12 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7773}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9f3b63ee2b38472fe024e055c71c939f93ba45ef57362fe00aea051eacb4cf"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.motionTickDayEvidenceReadImpl (cognitive 71): HistoricalArchive.motionTickDayEvidenceReadImpl has cognitive complexity 71 (threshold 15). Drivers by points: if/else 27 (45 pts), boolean chains 39, loops 4 (5 pts), ternaries 2 (4 pts), error handling 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. This shape REPEATS in the file: one other method here (HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine) 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3744}}}],"partialFingerprints":{"codehealthFindingId/v1":"4016353f77403b243a4f7430ac5b83182e2821a97aa0584eceb233d8cb967843"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.load (cognitive 70): AtriaHistoricalAggregateReader.load has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 18, error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"3780ccb779f4a00a27905719f64c3d3775971bbff478dd5853e5c677a5a2051d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.materialize (cognitive 70): AtriaHistoricalStressReplay.materialize has cognitive complexity 70 (threshold 15). Drivers by points: if/else 14 (35 pts), boolean chains 24, loops 6 (9 pts), ternaries 2 (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5976af5a7242528df9db6e6365e19be19e03c233b1eaefe9ddabc542eccb839"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.recoveredSkinTemperatureProjectionCancellable (cognitive 70): SessionStore.recoveredSkinTemperatureProjectionCancellable has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (46 pts), loops 9 (12 pts), boolean chains 11, ternaries 1 (nesting depth added 24). Of this number, 65 points are the body\u0027s own statements and 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23037}}}],"partialFingerprints":{"codehealthFindingId/v1":"078413657b9dca4afae2b6a3eba205bd9783f7f17d5c073dfff142a71c4b1dc7"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.physiologicalSleepReviewNightDraftCore (cognitive 68): SessionStore.physiologicalSleepReviewNightDraftCore has cognitive complexity 68 (threshold 15). Drivers by points: if/else 14 (25 pts), ternaries 10 (20 pts), boolean chains 17, loops 5 (6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37821}}}],"partialFingerprints":{"codehealthFindingId/v1":"481598a75e837ecbf87fc18b77820bf7273a7923f046f87092d91fb1f8b451fd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.runSacrificialFastDrainSlices (cognitive 67): AtriaBLEManager.runSacrificialFastDrainSlices has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (36 pts), boolean chains 17, loops 4 (8 pts), error handling 1 (4 pts), ternaries 1 (2 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41105}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf2da3525461575414ab6ddd18175cc1bc13721f1c43fc37fad06fa73692651"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.centralManagerDidUpdateState (cognitive 67): AtriaBLEManager.centralManagerDidUpdateState has cognitive complexity 67 (threshold 15). Drivers by points: if/else 25 (41 pts), boolean chains 13, ternaries 4 (12 pts), match/switch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53006}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b596e4e3def12a29664f607773b82f10a38a11cd171e0326eb0224f1bbd3cf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cognitive 65): AtriaBLEManager.centralManager has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (49 pts), boolean chains 7, ternaries 3 (5 pts), loops 2 (3 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53285}}}],"partialFingerprints":{"codehealthFindingId/v1":"25155dbbbc048fbdd3463f22f85ece1dfd6fd23ccb6dcd86cae02d65f1b62139"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.loadPage (cognitive 64): AtriaHistoricalAggregateReader.loadPage has cognitive complexity 64 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 21, error handling 4 (8 pts), loops 3 (4 pts) (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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d0e3abc9b9c8e533d394d60ffb7a1c3203522c9dd99c095ab58068a9607ac0"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeSleepReviewNightForCacheCore (cognitive 63): SessionStore.makeSleepReviewNightForCacheCore has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 23, ternaries 4 (7 pts) (nesting depth added 13). Of this number, 52 points are the body\u0027s own statements and 11 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37221}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94faf97a93d6bd15149a01a96958ba9b517330c5b10ea1ceb5bdf5d50ec7f42"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.detectCandidates (cognitive 62): AtriaHistoricalActivityProjection.detectCandidates has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 13, loops 5 (7 pts), ternaries 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd92522b5a4e81ac113ced5d8966a6a14b6e5a5156691a49e6ac657fffad159e"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeMorningFrozenDailyMetric (cognitive 62): SessionStore.makeMorningFrozenDailyMetric has cognitive complexity 62 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 15, ternaries 12 (13 pts), loops 2 (nesting depth added 9). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24454}}}],"partialFingerprints":{"codehealthFindingId/v1":"f47000b9cf00613f52f701a530f8ac5a864d8d46b338d4f501c52e5b0ca8bb59"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmWorkoutWindow (cognitive 62): SessionStore.confirmWorkoutWindow has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 21 (25 pts), if/else 13 (21 pts), boolean chains 13, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34270}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f010e0c0cf6159b73861274cbe651ff38b14c83e156fd96ffe2630e4c44002"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredHeartRateProjection.recoveredSessionsCancellable (cognitive 61): AtriaRecoveredHeartRateProjection.recoveredSessionsCancellable has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 8 (13 pts), boolean chains 8, ternaries 3 (5 pts) (nesting depth added 24). Of this number, 57 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e807d6e2bc81b4ee6bca45e9c8dcda78ce8f36bd1455ee1dcacf394da8ce618"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.mergeDailyMetricHistoryCancellable (cognitive 61): SessionStore.mergeDailyMetricHistoryCancellable has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 18, ternaries 3 (6 pts), loops 3 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23768}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b79c9b5723e35b1cd30cf2770aa8467396d5fabbf257613804b87cbbfd2b0a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.editConfirmedWorkout (cognitive 61): SessionStore.editConfirmedWorkout has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 11 (31 pts), if/else 12 (19 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":35971}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28510020830dbfd0ef4bab5d5375fd1f7c3484d0d92711a2fa709f6e128d53a"}},{"ruleId":"D2","level":"warning","message":{"text":"SleepHistorySnapshot.combiningResumedSleepSegments (cognitive 61): SleepHistorySnapshot.combiningResumedSleepSegments has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 23, loops 6 (nesting depth added 11). Of this number, 43 points are the body\u0027s own statements and 18 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92e7a23ac79271a640ccb39d3a8dcf525125a720494c30ec586c687005c92c3"}},{"ruleId":"D2","level":"warning","message":{"text":"Night.reconciledHROnlyDisplaySegments (cognitive 60): Night.reconciledHROnlyDisplaySegments has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 20, loops 3, ternaries 2 (3 pts) (nesting depth added 13). Of this number, 41 points are the body\u0027s own statements and 19 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59825}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3415b05794542efbd0caa152c9017747355dc2787ecb9a9238b9e742da5d9db"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightTimelineAnalyzer.analyze (cognitive 59): AtriaNightTimelineAnalyzer.analyze has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 18, loops 6 (9 pts), ternaries 4 (7 pts) (nesting depth added 19). Of this number, 56 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":"Atria/Atria/AtriaNightTimelineAnalyzer.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab81752842f33927357e90cdcef16c38df7d5ebd9e6eafee616b437cfa394cc"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightEpochFeatures (cognitive 59): AtriaWhoop4MotionTickCompactStore.latestNightEpochFeatures has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 6 (14 pts), boolean chains 9, match/switch 1 (2 pts) (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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a769c1dd88952bec8eff5dab72e872451c1343d9dc7db305efcef03d1a33c8"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.prepareRecoveredProjectionInstall (cognitive 59): SessionStore.prepareRecoveredProjectionInstall has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 9, loops 7, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14991}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24659c159f142975a3cdad5dd0a8a55a2ff92e6743fda129f6292c687c84a86"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.observeProductionHistoryCursorRange (cognitive 58): AtriaBLEManager.observeProductionHistoryCursorRange has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 19, loops 3 (5 pts), match/switch 1 (4 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42566}}}],"partialFingerprints":{"codehealthFindingId/v1":"39812bf92ec990eb8326d587c1e0605185b47f1b91440e798632903849203f48"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoryDrainState.receiveFrame (cognitive 58): AtriaWhoop4HistoryDrainState.receiveFrame has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 10, match/switch 1 (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":"Atria/Atria/AtriaWhoop4HistoryDrainState.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"1443247e6d6e6516631b68bcfff801d0966f26cf5bff5311ff18be59f61bf958"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutRouteStore.recoverPendingTransaction (cognitive 58): AtriaWorkoutRouteStore.recoverPendingTransaction has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 14, ternaries 4 (12 pts), match/switch 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c6b14eb855d8e59d69f07aaece52407f71aa4e7e902653481d70a3b94c695c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.mergeCanonicalHistoricalDetectionsCancellable (cognitive 58): SessionStore.mergeCanonicalHistoricalDetectionsCancellable has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 5 (11 pts), ternaries 3 (9 pts), boolean chains 7 (nesting depth added 33). Of this number, 56 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21391}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a2908570828cb09b65b761cfa95f6e75d777ea76fde2fcd7c7392155c7bcf8b"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.quickMetricReadinessProbe (cognitive 57): HistoricalArchive.quickMetricReadinessProbe has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (41 pts), ternaries 4 (7 pts), boolean chains 6, loops 2 (3 pts) (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3248}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94331002c94638cd0f7e030906b7cfbaa1780d241e70ceb502a4dcd4e41f93c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaMetricDetailSheet.detailTemplate (cognitive 56): AtriaMetricDetailSheet.detailTemplate has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 12 (24 pts), boolean chains 5, 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":4783}}}],"partialFingerprints":{"codehealthFindingId/v1":"af5b8bc24a52d2b955f0e38672363722c6e36a48207999432055357ccacf6213"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepWakeResearch.stage (cognitive 56): AtriaSleepWakeResearch.stage has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 33, if/else 16 (22 pts), ternaries 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b0336564098fff984d80a4effcfa162a8b1d8b2f01868123eb9cbdae6c99c9"}},{"ruleId":"D2","level":"warning","message":{"text":"Recovery.estimate (cognitive 55): Recovery.estimate has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 21 (22 pts), if/else 17 (21 pts), boolean chains 12 (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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f9e19d2814c825a6621e747f0b74c0115ce828ab5faccacfae547b878bcc472"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.persistActiveSessionJournalIfNeeded (cognitive 55): AtriaBLEManager.persistActiveSessionJournalIfNeeded has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 15, ternaries 12 (14 pts), match/switch 1 (2 pts), error handling 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, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23292}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da818b2ddf608f83b807358b9b1a02443a95a57a47eec0ecb4efd9546252608"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaFullFidelityColdSessionStore.persistLocked (cognitive 55): AtriaFullFidelityColdSessionStore.persistLocked has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 12, error handling 2 (4 pts), loops 2 (3 pts), ternaries 2 (3 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d687d44f8f9facae48242c3a194d6246639a43ef4630da490124697692194f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.autoConfirmStrongSleepCandidates (cognitive 55): SessionStore.autoConfirmStrongSleepCandidates has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 10, ternaries 1 (2 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40769}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ed9854886b7d93232595acf41a76201cc87f7e8c62c9dc42111214bc478df5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.finalizeOfflineHistoricalSyncAfterLiveRestoration (cognitive 54): AtriaBLEManager.finalizeOfflineHistoricalSyncAfterLiveRestoration has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 24, if/else 17 (19 pts), ternaries 11 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19797}}}],"partialFingerprints":{"codehealthFindingId/v1":"56943a7fbc7df136105a153fe29b9a89c9d471b4410bf3a5b2c695b202a5fa08"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalRawRetirementExecutor.retire (cognitive 54): AtriaHistoricalRawRetirementExecutor.retire has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (28 pts), boolean chains 26 (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":"Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8de8f28c6e4778589760ed2953ae42bd2e274819ddcf98b212fa52737c0d254"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredMotionProjection.projectCancellable (cognitive 54): AtriaRecoveredMotionProjection.projectCancellable has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (34 pts), boolean chains 11, loops 5, ternaries 4 (nesting depth added 9). 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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc85940042ed00b603547142c8b4c826ed74a91b7fd6c7247ad4a29a02dadd3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickSequenceReducer.reduce (cognitive 54): AtriaWhoop4MotionTickSequenceReducer.reduce has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 15, ternaries 3 (9 pts), loops 3 (5 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":"Atria/Atria/AtriaWhoop4MotionTickSequenceReducer.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc6cc4817048dcba75da7eef744eeff1e9770dd8de4662afecf4fa24fc0cd46"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.qualifiedLnRMSSDWindowsCore (cognitive 54): SavedSession.qualifiedLnRMSSDWindowsCore has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 5 (10 pts), boolean chains 9, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"490a0f55ebc97a13cb51346915e993ecb8c111a235e9c2d653a1a1466670a966"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeTodayHRZoneMinutesCancellable (cognitive 54): SessionStore.makeTodayHRZoneMinutesCancellable has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 6 (12 pts), boolean chains 6 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20805}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fee65d36e4f5d57d04efa5f49ee312c2e4292385e76010e6528253110602385"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.freezingAdaptiveSleepNeed (cognitive 54): SessionStore.freezingAdaptiveSleepNeed has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 9, loops 4 (7 pts), ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44447}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a50ea44516275a091152d1187c7bf1e8a49c9a9478ae10fafd346ee94be791"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.saveConfirmedSleeps (cognitive 54): SessionStore.saveConfirmedSleeps has cognitive complexity 54 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 16, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45543}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f457143395c15f2f4034c625300e47e080c94d92adbbdf4c33bee5dad67f11e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.resumePendingFullDrainPublicationIfNeeded (cognitive 53): AtriaBLEManager.resumePendingFullDrainPublicationIfNeeded has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 20, error handling 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":48363}}}],"partialFingerprints":{"codehealthFindingId/v1":"26376a319907f6966af19393b88b85320144e7b7477622ede621fda04324d213"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cognitive 53): AtriaHistoricalLongTermRollup.validate has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 41, if/else 9 (11 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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce4b469b8a2b84dccfe652d3bdbf541d22f606845b05ccf9c1d346c8e4e3e6c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence (cognitive 53): SessionStore.validateSessionBackupEnvelopeForImport::validCalibrationEvidence has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 47, if/else 3, ternaries 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. This shape REPEATS in the file: one other method here (SessionStore.validateSessionBackupEnvelopeForImport) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48152}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f884a5a8145368ae9815098e3c79ab06a8ba440de739568dc491ef3650b6b1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEHistoryTerminalPublicationStore.validate (cognitive 52): AtriaBLEHistoryTerminalPublicationStore.validate has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 42, if/else 5 (9 pts), match/switch 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":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"574b5186d4e166b295a45db892d6a3191e33e6b3f1b5930d7d9af58394676285"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.resumeProtectedR10FromRestoredCache (cognitive 52): AtriaBLEManager.resumeProtectedR10FromRestoredCache has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 7, ternaries 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16487}}}],"partialFingerprints":{"codehealthFindingId/v1":"704e3fc392a933967714401bdb548139f510de74fdae261e6908c1a7ff8112e2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepWakeResearch.motionContext (cognitive 52): AtriaSleepWakeResearch.motionContext has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 14, loops 3 (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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"43202a237954f8db5f390aecd05573d6a98081ca681e15ad82397c0498164e8a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressMonitorStore.update (cognitive 52): AtriaStressMonitorStore.update has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 17, ternaries 2, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":4275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4964fd6ee3fcb261d1fbbd1d7e540a33cef5559d9b69f66505033dc06f675a9"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logExecutionPriority (cognitive 52): SessionStore.logExecutionPriority has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (26 pts), ternaries 12 (16 pts), boolean chains 10 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31979}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a599f3ada807f1ddab6d640d92fa13431aae05d213a809c47a9bc3628d97b4"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.commitPreparedWorkoutWindowConfirmation (cognitive 52): SessionStore.commitPreparedWorkoutWindowConfirmation has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 19 (22 pts), boolean chains 8 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33980}}}],"partialFingerprints":{"codehealthFindingId/v1":"257b588efca46c01ddcc9fba4e5d6781af89c3a47f865344bb075b72be2d8e5d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armWorkoutHistoricalMotionBankIfPossible (cognitive 51): AtriaBLEManager.armWorkoutHistoricalMotionBankIfPossible has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 22, ternaries 3 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36012}}}],"partialFingerprints":{"codehealthFindingId/v1":"f678d2eebcd471a4a0719ae4a49c2c9496cd076a0beb16b256a61abdafd8a440"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.windowedWorkoutCandidates (cognitive 51): SessionStore.windowedWorkoutCandidates has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 4 (8 pts), ternaries 2 (7 pts), boolean chains 6 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":49467}}}],"partialFingerprints":{"codehealthFindingId/v1":"d09f5a75453d2d0078048fc4181fa4d6f9833922aa5a18f66db437f8782ab5ff"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.drainNextHistoricalTransportEventBurst (cognitive 50): AtriaBLEManager.drainNextHistoricalTransportEventBurst has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (27 pts), error handling 5 (11 pts), boolean chains 8, loops 2 (3 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45253}}}],"partialFingerprints":{"codehealthFindingId/v1":"4609962b63fb12ff0667058a5f94ef97bfdd067844f9366e932fc957221bb692"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaColdSessionMigration.migrate (cognitive 50): AtriaColdSessionMigration.migrate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 10, error handling 6 (8 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"f328982a55fca5220538f37ee29e7f9db987ba5332d89e5d1cf7f5354ae4527c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeOverviewTrendPointsCancellable (cognitive 50): SessionStore.makeOverviewTrendPointsCancellable has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 6 (8 pts), boolean chains 4, ternaries 2 (4 pts) (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20568}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd248d22650bbc52ebd5cc671bd3cba41c5451044a26a751ff3ca533e0a7dd2"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.observedHeartRateUnionSecondsCancellable (cognitive 50): SessionStore.observedHeartRateUnionSecondsCancellable has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 10, loops 4 (6 pts), ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24381}}}],"partialFingerprints":{"codehealthFindingId/v1":"854fc816a947e8d393753ae446bf86fa37b779f9ff11d8e1ec4b755e683e8b02"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleSacrificialFastDrainPayload (cognitive 49): AtriaBLEManager.handleSacrificialFastDrainPayload has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 13, error handling 3 (5 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43423}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cde0644901b0fb14686438b9f46e8c32265a42981b1422368b2fd424112afbe"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBehaviorImpact.summariesCancellable (cognitive 49): AtriaBehaviorImpact.summariesCancellable has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 7, loops 5 (7 pts), ternaries 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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7555a6b477531cc18415cd0351b5c6cb3d13b6aa5dbe336d3572331106f195"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry (cognitive 49): AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 30, if/else 14 (17 pts), loops 2 (nesting depth added 3). Of this number, 25 points are the body\u0027s own statements and 24 belong to 4 function items 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1651}}}],"partialFingerprints":{"codehealthFindingId/v1":"13db4f7988e55a8404898c4ec37f0cfe2574fa76cb90bc4a7f5eb834d485689f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.homeSavedAggregateCancellable (cognitive 49): SessionStore.homeSavedAggregateCancellable has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 9 (13 pts), boolean chains 7, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27053}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1e3c0b59be94a87da959dca15ede86ef7c609384e9b4ffb705ddd6e6d36747b"}},{"ruleId":"D2","level":"warning","message":{"text":"RespRateRsa.estimateCancellable (cognitive 48): RespRateRsa.estimateCancellable has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 14, loops 6 (7 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d947e9adb98f286872506377235f57f392fb61ef50aa2ac4332d9a10d88c11"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.snapshotSession (cognitive 48): AtriaBLEManager.snapshotSession has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 29, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51508}}}],"partialFingerprints":{"codehealthFindingId/v1":"0275d6fc5f1e1edd29f3900a706287ab20bac539c1424576ef4b9ce206b1bcb7"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.compactRespiratoryRateEstimate (cognitive 48): SessionStore.compactRespiratoryRateEstimate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (35 pts), loops 9 (10 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":43323}}}],"partialFingerprints":{"codehealthFindingId/v1":"da24e6b3ff59a8000ce20cb94736fe45a2ed14b6b5452008d7d011c0b048a102"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.parseISO8601 (cognitive 47): AtriaScanRecordParser.parseISO8601 has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 22, if/else 11 (15 pts), ternaries 5 (7 pts), match/switch 2, loops 1 (nesting depth added 6). Of this number, 43 points are the body\u0027s own statements and 4 belong to one function item 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11397}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ee38f8634ec8518b093df1bb27d9d65e5cf5d52a02181a477aca8c57ab3f85"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeHistoryTrendSummariesCancellable (cognitive 47): SessionStore.makeHistoryTrendSummariesCancellable has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 5 (8 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":22456}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6b839974afe37d5a5190d1ced75030df28abbd7749814ba2ce1913f426485e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaApp.scheduleLaunchExportsIfRequested (cognitive 46): AtriaApp.scheduleLaunchExportsIfRequested has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 26, boolean chains 16, if/else 4. 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec72fbfb78a723cbdf79cfa37924f56190134205760b88221309db88ea9e803"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.beginIdleWindowHistoryTransportWithoutHeartRateRediscovery (cognitive 46): AtriaBLEManager.beginIdleWindowHistoryTransportWithoutHeartRateRediscovery has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 6, loops 3 (5 pts), ternaries 2 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":12782}}}],"partialFingerprints":{"codehealthFindingId/v1":"816e6b28fe626d18d218931bd1573c975b383d4a21b9156b16553f646393508d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armRealtime (cognitive 46): AtriaBLEManager.armRealtime has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 7, ternaries 2 (6 pts), loops 4 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40087}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b58a6b1e1a15bbf0707638bd23e34cb836fda742eb13c275fc1f0c76261c5f"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.export (cognitive 46): HealthKitExporter.export has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 21, if/else 17, ternaries 6 (8 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d7ebf6f8754a309f1c632518eaa9082a6d47bde92305c56d75abc7e837e8f2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaApp.handleDeferredLaunchWork (cognitive 45): AtriaApp.handleDeferredLaunchWork has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 41, if/else 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2791fd3a741e65ff6aa8a96560c417e1ffd16d00f807710055302df30ab0b6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.prepareProtectedR10CleanOwnerAtLaunch (cognitive 45): AtriaBLEManager.prepareProtectedR10CleanOwnerAtLaunch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 19 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5076}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9dd0fa324ed37bafd59206b33fca7758c3d9384fa22b11dd18b78483a586fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"HRVAnalyzer.analyze (cognitive 45): HRVAnalyzer.analyze has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (34 pts), ternaries 5, boolean chains 3, loops 3 (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":"Atria/Atria/HRV.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf14bd6defc5758bc913405f2101db3faf9893ea82406d4c80a9c50cbf3a0960"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.performAutomaticRecoveredDataBootstrapStep (cognitive 45): HistoricalArchive.performAutomaticRecoveredDataBootstrapStep has cognitive complexity 45 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 5, match/switch 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5478}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2005139a9f9c58a9d023ef95b06336df884478662f6d84271ac07ac89c20bde"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.refreshHistorySnapshotCache (cognitive 45): SessionStore.refreshHistorySnapshotCache has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 5, ternaries 1 (2 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":11739}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51c8a045bcf998da9ba140e970058d848f4259ab43592c353b4376567516326"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded (cognitive 44): AtriaBLEManager.attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 11, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21878}}}],"partialFingerprints":{"codehealthFindingId/v1":"01de84f6367bd8dea7f4b34687a2d4b962987d09b23f7d69679d12f44cb412d3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaR10MotionPipeline.accept (cognitive 44): AtriaR10MotionPipeline.accept has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (29 pts), ternaries 3 (8 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71d1084ca34f98c44f057346c6dbaefe3e2aa59858fc404480fc6c5b1b6990b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepWakeResearch.stageSegmentsCore (cognitive 44): AtriaSleepWakeResearch.stageSegmentsCore has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 12, loops 3 (5 pts), ternaries 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"caeabd9769e3856fcbea85ec3318fb2445b6c59a0961b182284c0e1e089f49f3"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.physiologicalCycleStrainByDisplayDayCancellable (cognitive 44): SessionStore.physiologicalCycleStrainByDisplayDayCancellable has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 5, ternaries 3 (4 pts), loops 3 (nesting depth added 15). Of this number, 35 points are the body\u0027s own statements and 9 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13686}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c2bdcd17ea3d1ca1cbe16b5bba341b8bd2422be1e292fad5bab6e845520867"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleProprietary (cognitive 43): AtriaBLEManager.handleProprietary has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (22 pts), ternaries 4 (9 pts), boolean chains 7, loops 2 (4 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43176}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b82936989452b907a14890511f9d046d8af2c972ae35804f4debbcbc6bb78d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.validateTerminalGapReconciliations (cognitive 43): AtriaHistoricalFullDrainCoverageStore.validateTerminalGapReconciliations has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 19, if/else 8 (19 pts), error handling 1 (2 pts), match/switch 1 (2 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a17210771fadc527258162e4c4c06320c46c5f2fb4623603b88d8ddd03af911"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.applyDebugUIScreenLaunchArgumentIfNeeded (cognitive 43): AtriaHomeView.applyDebugUIScreenLaunchArgumentIfNeeded has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 16, loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3067}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb25f4ee3f402e3056ae42c3b59c838c68253182e692eb527272feb0cae68d6"}},{"ruleId":"D2","level":"warning","message":{"text":"HeroSnapshot.== (cognitive 43): HeroSnapshot.== has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 43. 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9506}}}],"partialFingerprints":{"codehealthFindingId/v1":"0176331644c9b541f365b9ec06aed55c2cc80d5b67c82d4b5b62d85d9a4a2e1a"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.appendRecoveredRecord (cognitive 43): HistoricalArchive.appendRecoveredRecord has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 9 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6765}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce13ac81e4ac869363f419fde60706b7e24351f12347475bbde427b99e0f388"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.legacyCompactArchiveDisabled (cognitive 43): HistoricalArchive.legacyCompactArchiveDisabled has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 8, loops 4 (5 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 8). Of this number, 29 points are the body\u0027s own statements and 14 belong to 2 function items 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10644}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e154a45cc3cf2c141f6b239cd4c9f50d2a6a2b7ad91a9825daa32018b8f48a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeSavedDailyMetricsCancellable (cognitive 43): SessionStore.makeSavedDailyMetricsCancellable has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 5 (9 pts), boolean chains 5, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":23333}}}],"partialFingerprints":{"codehealthFindingId/v1":"011ba44147c73f220ab25e83c3e3a1c144ce62c0324b0d08319cb728011e76ce"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.prepareConfirmedSleepSave (cognitive 43): SessionStore.prepareConfirmedSleepSave has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 12, loops 2 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45283}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a6dcace5a9d645ec226654e2880d29a3aeca9f5190516a70da59ea651874e91"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logSleepValidation (cognitive 43): SessionStore.logSleepValidation has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 12 (19 pts), boolean chains 12, if/else 12 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53559}}}],"partialFingerprints":{"codehealthFindingId/v1":"44fdd8f9f44df9076b833eec647444e922a32d98aebeb4c2c327b1da2ef88322"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaManifestedColdSessionCompaction.compactAndRetire (cognitive 42): AtriaManifestedColdSessionCompaction.compactAndRetire has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 6, loops 3 (6 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4efaf55b85bdefe1b9d1f795f3662b36b1c8c3ffaab34b73b318a8541bf9d46"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaFullFidelityColdSessionStore.adoptStreamingSourcesLocked (cognitive 42): AtriaFullFidelityColdSessionStore.adoptStreamingSourcesLocked has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 5, error handling 2 (4 pts), loops 2, ternaries 1 (nesting depth added 13). Of this number, 23 points are the body\u0027s own statements and 19 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b8381845c3700b3864467a1fde09e4b456ac21f3ce97b54640d61541d199e6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPhysiologicalStressModel.evaluate (cognitive 42): AtriaPhysiologicalStressModel.evaluate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 20, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"468b96b83c7fd4082a4acd4b9d10ab6fad546073b5a3a1f2bf312d2de4be4011"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeHistoryDailyRollups (cognitive 42): SessionStore.makeHistoryDailyRollups has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 7 (15 pts), ternaries 4, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21843}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd0ee1d6d6f3f2b43ff9e33603aff622b04c25dde9ec17198848749e1337b15"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.restoreSessionBackup (cognitive 42): SessionStore.restoreSessionBackup has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 2 (5 pts), ternaries 1 (3 pts), loops 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55587}}}],"partialFingerprints":{"codehealthFindingId/v1":"5feaba5a911992aab3304c9f6fca99c94b32032362f2debe6ab35dc372487d4b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.leftoverFlushLines (cognitive 41): AtriaBLEManager.leftoverFlushLines has cognitive complexity 41 (threshold 15). Drivers by points: if/else 27, ternaries 5 (9 pts), boolean chains 5 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9071}}}],"partialFingerprints":{"codehealthFindingId/v1":"795bfab51c7664e55b82f41790da6ff1b0e801e9abfd530d3d510bf28f0efd6d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.applyPersistedInterruptedFullDrainAuthority (cognitive 41): AtriaBLEManager.applyPersistedInterruptedFullDrainAuthority has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 8, ternaries 3 (8 pts), error handling 1 (2 pts), match/switch 1 (2 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":12023}}}],"partialFingerprints":{"codehealthFindingId/v1":"21363bceaa933f1ef5e0ecaf94c25cf09bc0958c3c40d95724b113ba30ec4640"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.acceptHeartRate (cognitive 41): AtriaBLEManager.acceptHeartRate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 14, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31145}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe6c9ab64270249f2204e2e41c19f7ea77aac895432f9d586eee32fad3e644f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendCommand (cognitive 41): AtriaBLEManager.sendCommand has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 7, error handling 1 (2 pts), match/switch 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33373}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7ff195f846d34b5f371db8ab9a4d4ebd20e9776c1ad892eb96454c6135ad0a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateWorkoutMotionLease (cognitive 41): AtriaBLEManager.evaluateWorkoutMotionLease has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 8, ternaries 4, match/switch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39514}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e372da58df0a9ac8966802067cd353de2864d07b4efee612323aaf57a19785f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleUnknownProtocolPayload (cognitive 41): AtriaBLEManager.handleUnknownProtocolPayload has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 4 (11 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43712}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ceb6abaa9d8419fca03a1bcf7f7e049598bc96890b493519954506ab86aea2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.makeDeferredDetails (cognitive 41): AtriaHomeModel.makeDeferredDetails has cognitive complexity 41 (threshold 15). Drivers by points: if/else 33, ternaries 4 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13627}}}],"partialFingerprints":{"codehealthFindingId/v1":"f21193be79886da00b12274e766d8f538a79630e20b5f28eff3535e9cf8b2443"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible (cognitive 41): AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 8, ternaries 2 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOnboardingHistoryBootstrap.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc60b3ab860f1eb34b1d7169cbb0c885a6a40b18fa2a1dbee347a33808de9085"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredMotionAnalytics.sleepProvenance (cognitive 41): AtriaRecoveredMotionAnalytics.sleepProvenance has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 12, loops 5, ternaries 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b98991f947b8ee16b834f5df238f5fe997d45106a882c8349e2d3b51bb671a3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepWakeResearch.epochFeatures (cognitive 41): AtriaSleepWakeResearch.epochFeatures has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d51cf1115152e1a6050e54f83990802a7ff511ea85d8e9566ef877ed816177"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrapSetup.evaluate (cognitive 41): AtriaStrapSetup.evaluate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 7 (12 pts), match/switch 4 (5 pts), boolean chains 4 (nesting depth added 11). Of this number, 38 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":"Atria/Atria/AtriaStrapSetup.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"48a4187c16e9e2376e8a3060ca7c03f85895c6b2d4dadb6dfc5d47628ca3b924"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutRouteStore.reconcile (cognitive 41): AtriaWorkoutRouteStore.reconcile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 13, error handling 2 (4 pts), ternaries 2 (4 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1346}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a6dcb0575ac7179dd67d249120bdabbbe5c2387bd7a61929f0319b3818adbce"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logGateReadinessFromLaunchIfRequested (cognitive 41): SessionStore.logGateReadinessFromLaunchIfRequested has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 26 (27 pts), boolean chains 9, if/else 5 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31142}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9b0139bbd070aeb5be9f8c7b698d773566883e60ad2486a73d09abd357990e"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.rebasedRecoveredConfirmedSleepsCancellable (cognitive 41): SessionStore.rebasedRecoveredConfirmedSleepsCancellable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 9, loops 6 (7 pts), ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44982}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4401acde5ad7c70d1dcd77ab1bcd5cfbce11d1876aa666eb15b219b0a28cce6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleInterruptedFullDrainReacquisitionIfNeeded (cognitive 40): AtriaBLEManager.scheduleInterruptedFullDrainReacquisitionIfNeeded has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, boolean chains 3, ternaries 1 (2 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11723}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f8a110553c85898e6a4d028b4d115d88fdfc4508266eb126d5d13ac0de34d7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recordHeartRateMeasurement (cognitive 40): AtriaBLEManager.recordHeartRateMeasurement has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 11, ternaries 3 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31545}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac710c52e1c7be15cad3ea8949ba27a943c2283b3da5b3582b2368637cb82de4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.notifyDecision (cognitive 40): AtriaIMUDiagnosticTransport.notifyDecision has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (2 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"663245e56c2b26c144e615fed186d60831e757894ac9ad2a3aaa926814627a1d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutPromptEvaluator.evaluate (cognitive 40): AtriaWorkoutPromptEvaluator.evaluate has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (17 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 6). Of this number, 36 points are the body\u0027s own statements and 4 belong to one function item 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":"Atria/Atria/AtriaWorkoutPromptEvaluator.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"3185eeb175b47c2fd5f80ced93f9f44174e734ac9b461e7aaad7b5f13b084f74"}},{"ruleId":"D2","level":"warning","message":{"text":"probe.on_notify (cognitive 40): probe.on_notify has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (3 pts) (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":"probe.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc76d53d317cb57669cc44a070b85f571601bdd1a75025d9b136ebb627517e5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recoverAcceptedHRWatchdog (cognitive 39): AtriaBLEManager.recoverAcceptedHRWatchdog has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 11 (13 pts), boolean chains 8 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26490}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e6d56c54224a1588474d7dfc50ed2c87d399882e20305f6f59cbb796e265a6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.refreshProtectedBoundedRawCaptureIfNeeded (cognitive 39): AtriaBLEManager.refreshProtectedBoundedRawCaptureIfNeeded has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 19, if/else 16 (19 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34442}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa5d41399615e0343c4f32a5e6131d76a5e654359b977bb59405cf8df412964"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendWorkoutMotionActivationPair (cognitive 39): AtriaBLEManager.sendWorkoutMotionActivationPair has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 21, if/else 14 (16 pts), loops 1, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39764}}}],"partialFingerprints":{"codehealthFindingId/v1":"601a4b524c1b1d7a58fc8cc0d1b509312f4e7dd894653dd88fa98e922357a1cf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.validatesInternalShape (cognitive 39): AtriaHistoricalActivityProjection.validatesInternalShape has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 35, if/else 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7b6cd881e4482a3f78ac7a4c311701a59311c9e62ae2c75e34d2380186381b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.bind (cognitive 39): AtriaHomeModel.bind has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23, boolean chains 16. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":10396}}}],"partialFingerprints":{"codehealthFindingId/v1":"82783b9dde2d690984465df73a7ed65319a4708825f0bd39127361ecee49a8f6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPreparedMetricHistory.init (cognitive 39): AtriaPreparedMetricHistory.init has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 12, ternaries 2 (4 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9109}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7abacb2300e12fc9b7191dd04247781aa83a0a280195277e0a1b987e23e7219"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutRuntime.applyPendingActions (cognitive 39): AtriaWorkoutRuntime.applyPendingActions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (13 pts), ternaries 3 (6 pts), boolean chains 4 (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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"3967b5d4fb08d70203bcbb06d740d9d50dee583bb4c0dc4a313828bf282663df"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.exactMetricHeartRatePoints (cognitive 39): HistoricalArchive.exactMetricHeartRatePoints has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 7, loops 1 (nesting depth added 11). Of this number, 32 points are the body\u0027s own statements and 7 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7564}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0b8c4b05876eac12a3f25532f24258fccd94006329ebf7b4ce50d416eb65eb"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.detectedActivity (cognitive 39): SavedSession.detectedActivity has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (14 pts), ternaries 3 (7 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7806}}}],"partialFingerprints":{"codehealthFindingId/v1":"64325450527ba7557bc9dea45fd686ed69319f4edf777e2653a3aa419a6185ce"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.noteLeftoverFlushNotifyState (cognitive 38): AtriaBLEManager.noteLeftoverFlushNotifyState has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8952}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb182646aa72bfeb5f16af22a89ad8adddd3d6f2defeb8d806776ef30ed4d3f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armConnectedRealtimePreservingHistoryBudget (cognitive 38): AtriaBLEManager.armConnectedRealtimePreservingHistoryBudget has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 12, ternaries 2 (8 pts), match/switch 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37410}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2807f28efe22584c2da632c3611fc4b2155181104d6f85607c778b9f7345d95"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.applyHistoricalArchivePersistenceResult (cognitive 38): AtriaBLEManager.applyHistoricalArchivePersistenceResult has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 3 (8 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45661}}}],"partialFingerprints":{"codehealthFindingId/v1":"61f008cab73f1bb4b2ca6a4a94f0b8668ad72fe56fe93f104e1950c7464f2906"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.centralManager (cognitive 38): AtriaBLEManager.centralManager has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 7, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55084}}}],"partialFingerprints":{"codehealthFindingId/v1":"e341d012edee28546f04b2bc585702c53c4a0e4db3909f3e6a3f3303db84ff44"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalRetentionTransaction.commit (cognitive 38): AtriaHistoricalRetentionTransaction.commit has cognitive complexity 38 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f612901f99acf9338cb804d7fea7157eed3b27490dc3dd6d685c89cab4530ca"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.bestSavedRRReferenceWindow (cognitive 38): SessionStore.bestSavedRRReferenceWindow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (9 pts), boolean chains 6, ternaries 1 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":32250}}}],"partialFingerprints":{"codehealthFindingId/v1":"22cad4398b004431762ee782fec00246e983d48fc8270f09476bae294f0be2d2"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.liveWorkoutPatchedSnapshot (cognitive 38): WidgetSnapshotPublisher.liveWorkoutPatchedSnapshot has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 31, boolean chains 7. 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec047896d9c40defadabd4489ec408a43b87647ca528c49dbc7f7c8e1b7c996"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaApp.handleBackgroundTask (cognitive 37): AtriaApp.handleBackgroundTask has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 9, 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"57366ec13afc8ec5ec6c0f9f0d1ea8700eff374bb4f3bf8035cf4d9c33086ebb"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleOfficialGen4CompactOnStream5LinkUp (cognitive 37): AtriaBLEManager.scheduleOfficialGen4CompactOnStream5LinkUp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 7, loops 1 (2 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24356}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1ce854c03b99b646dae0d576b7f2a1b68c9e6544c5e0ba9114b6672c5c5949"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.connectedRawHistoryCatchUpRequestAuthorityIsValid (cognitive 37): AtriaBLEManager.connectedRawHistoryCatchUpRequestAuthorityIsValid has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 17, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37212}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab6e33212c246e9c2e2ab2baf692912f04dec83379bfa6c358dd361217e01e35"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluatePendingWorkoutHistoricalMotionBankOffload (cognitive 37): AtriaBLEManager.evaluatePendingWorkoutHistoricalMotionBankOffload has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 6 (9 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38805}}}],"partialFingerprints":{"codehealthFindingId/v1":"d503f0057b2800dbe3a583e569aff9db8892c6d8dcd4a841663bd5ea8804e283"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDaytimeQuiescentSleepDetector.detect (cognitive 37): AtriaDaytimeQuiescentSleepDetector.detect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaDaytimeQuiescentSleepDetector.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6688592384280343a63e5a91b858d5cbff5b4e0730574bcf17ab6c71b8e919a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSyncProgressFooterPresentation.footer (cognitive 37): AtriaSyncProgressFooterPresentation.footer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 15, ternaries 4 (5 pts) (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":7283}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea68b242089fa5c64397eb4b05ec5933207215201a90d1aa18307339c09f51e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaShareSheet.canvasButtonLabel (cognitive 37): AtriaShareSheet.canvasButtonLabel has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 16 (30 pts), if/else 5 (7 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbe5ddc4473863af7db1ef52e8112c46668816daf96631ded82ef3c9e201a1b2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.classifyGapMinutes (cognitive 37): AtriaHistoricalStressReplay.classifyGapMinutes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 5 (8 pts), boolean chains 5 (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1957}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c51d8f6c7de7f161985123f8ae177f24aa013a1b4eba320498ef69d66eaf1b1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.storeValue (cognitive 37): AtriaScanRecordParser.storeValue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34 (35 pts), boolean chains 2 (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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11002}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cff711781521a3d19c3dee97fe85767e0069205b56013d3dee2e44d5a707336"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeIncrementalRecoveredHistorySnapshots (cognitive 37): SessionStore.makeIncrementalRecoveredHistorySnapshots has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6, loops 5, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21143}}}],"partialFingerprints":{"codehealthFindingId/v1":"88415b5b99729594fd0e7656ba1b06f166965244e39f0dc7c25732d239f4749a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.archiveOnlyHeartRateSegments (cognitive 37): SessionStore.archiveOnlyHeartRateSegments has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 6 (8 pts), boolean chains 6 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":27526}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb8c72418fa2f34d93b332ebd31e190caa4bc7c44735e19cf31a5d8b8fafd5d"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.rebasedConfirmedSleepsCancellable (cognitive 37): SessionStore.rebasedConfirmedSleepsCancellable has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8, loops 6, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44908}}}],"partialFingerprints":{"codehealthFindingId/v1":"adff4397f0a607097651a01840aaccb059c801c080e1cd6bea371e7765e86758"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveSessionJournal.saveIncremental (cognitive 36): ActiveSessionJournal.saveIncremental has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 13 (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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"788e396274f8c7ec3d38665cb935c8cf5679cc1cbda9b6647a52fd228daea58c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ResponseEventDataSequenceIfReady (cognitive 36): AtriaBLEManager.sendProtectedR10ResponseEventDataSequenceIfReady has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 13 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15640}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a78d9f75dd888d53e75308b66e1d654594415d413c1a4ad368b9362a6988798"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.median (cognitive 36): AtriaBLEManager.median has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (35 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31761}}}],"partialFingerprints":{"codehealthFindingId/v1":"656b308fd14efbe503029bf94331da2fd710a5603f7c436c11c8ecfc84fa5f83"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaColdSessionFact.validate (cognitive 36): AtriaColdSessionFact.validate has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 26, if/else 8 (10 pts) (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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"bced6623dc658d24c4111a4281cb28e25a09e96f40b4b9c997efbf862e387623"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalWorkoutProjection.detectCandidates (cognitive 36): AtriaHistoricalWorkoutProjection.detectCandidates has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (14 pts), loops 4 (6 pts), ternaries 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb0a00c7f86f0fa85f22e4340879e8bb5c27d953c25baab4fcf0eb2cac22c4e"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.diagnostics (cognitive 36): HistoricalArchive.diagnostics has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3123}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa7f9f1c52e307e501ea846fbc52ea8bf6cc3013db0c18cd93cbd72a6140d84c"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.loadPointsCancellable (cognitive 36): SavedSession.loadPointsCancellable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 9, loops 3, ternaries 1 (nesting depth added 6). Of this number, 23 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2628}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ce5c138b993b094bd3e9be8d7bc72063e6a6b86f4c7da1c4d9562ffc6f004b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleConfirmedWorkoutStepEvidencePublication (cognitive 36): SessionStore.scheduleConfirmedWorkoutStepEvidencePublication has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, ternaries 3 (5 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":20190}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e2fe6388f2ae3e933c094fd18143b9ff6d6eccb2341052ee13470c4ff15144"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.reducedConfidenceUnconfirmedRecoveryInput (cognitive 36): SessionStore.reducedConfidenceUnconfirmedRecoveryInput has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 10, loops 3, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24261}}}],"partialFingerprints":{"codehealthFindingId/v1":"e490c882907379b6d54cefb13151c8e71b7c1f0485cd8ec441e4acf0542fbd0f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedSleepWindowMetricsCore (cognitive 36): SessionStore.confirmedSleepWindowMetricsCore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (6 pts), ternaries 4 (6 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":43185}}}],"partialFingerprints":{"codehealthFindingId/v1":"9542993b439587129b47f3f9edb32998c88ff5d4b41e9039d166cb561a775177"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedSleepRespiratoryRateCore (cognitive 36): SessionStore.confirmedSleepRespiratoryRateCore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (50 pts), loops 7 (14 pts), boolean chains 8, ternaries 1 (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. This shape REPEATS in the file: one other method here (SessionStore.confirmedSleepRespiratoryRateCore::finishRun::checkedEstimate) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43488}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ade6d3926d4d3dd3f60c7f29d75d8cfabe44632890d3258f6d6ec374e2074a7"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.settleConfirmedMorningAuthority (cognitive 36): SessionStore.settleConfirmedMorningAuthority has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 12, ternaries 6 (8 pts) (nesting depth added 5). Of this number, 25 points are the body\u0027s own statements and 11 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57826}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d088dd9f526b9523619b7926668aa864a1eb9b25beb639e526dc75086ac57b1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reconcileAdditionalTerminalFullDrainGaps (cognitive 35): AtriaBLEManager.reconcileAdditionalTerminalFullDrainGaps has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 7, ternaries 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47774}}}],"partialFingerprints":{"codehealthFindingId/v1":"12bf3398b3ad0c548f9a72eec2d697759db70ee94cb67b92a1c570bb8f14163c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleTerminalConsumerMaterializationIfAuthorized (cognitive 35): AtriaBLEManager.scheduleTerminalConsumerMaterializationIfAuthorized has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 10, error handling 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49004}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f1acb3430b1bc68a8ac91763ea0c00b90971def958adc06b96cb0bb5c57083"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.completeHistoricalACKAcceptance (cognitive 35): AtriaBLEManager.completeHistoricalACKAcceptance has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 12, error handling 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49388}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4110448bee1aad77357d199635c6acb899ebaa2297a41dc059d4a52dd5628b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.validateTransportAuthority (cognitive 35): AtriaHistoricalFullDrainCoveragePolicy.validateTransportAuthority has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 28, 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed5e7c8afc7deb3f4d8d9287ba421c4535d65a2a9a629fabb056bf5555a2d80"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalJSONLInput.decodeRawDeflate (cognitive 35): AtriaHistoricalJSONLInput.decodeRawDeflate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 6, 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61ef0dae41ac4cb620e0c1b17bfd0fe1d468b4c7859614709f84b1770d55b66"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalVerifiedConsumerReader.readSource (cognitive 35): AtriaHistoricalVerifiedConsumerReader.readSource has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 8 (9 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 1 (2 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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"13330c2e6f185615c7f85430b89af67a9e83a44ff89a071acb9b24f923c4bc26"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIrregularRhythmAssessment.evaluate (cognitive 35): AtriaIrregularRhythmAssessment.evaluate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 5, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIrregularRhythm.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"15bd98d05e03f33338d79672a811181828c16fb26c335e625efd2f4d1e588605"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveActivityCoordinator.shouldSendActivityUpdateImmediately (cognitive 35): AtriaLiveActivityCoordinator.shouldSendActivityUpdateImmediately has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 30, if/else 5. 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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"391a751323bc9528be30015fb868e198b97cf47a7ad50cfea45f402348252ec3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveWorkoutView.workoutActionsCard (cognitive 35): AtriaLiveWorkoutView.workoutActionsCard has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 9 (13 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2845}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d474eaaab0cc07286e3592f7a9f642a002e82a69708ef4db8f379abb52f869"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.autonomousGaitBouts (cognitive 35): AtriaWhoop4GravityCadenceStepModel.autonomousGaitBouts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 12, loops 8 (10 pts) (nesting depth added 7). Of this number, 25 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e496c1fe442caa1b75593b87c72ab95ac5b6c16306fc37f0fb09e6b525d67c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaShortWindowRMSSD.value (cognitive 35): AtriaShortWindowRMSSD.value has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 7, ternaries 2 (4 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HRV.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"279c710c87630e677088bd6aa440d11a834278ddca3e0f4185002ddddaab718c"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.motionTickWindowRead (cognitive 35): HistoricalArchive.motionTickWindowRead has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 23, if/else 9, ternaries 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3488}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f04d93450c33df9fa8dbff3329353f9077fa3dbfd5943b216aabda13f171807"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.readVerifiedCanonicalConsumerSourcePage (cognitive 35): HistoricalArchive.readVerifiedCanonicalConsumerSourcePage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 11, loops 2 (7 pts), error handling 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b46be79d595834a1bf6d94e8f20d77ebfd0e6bcf3d45ecc2c9e9ebf81455a77"}},{"ruleId":"D2","level":"warning","message":{"text":"AutomaticRecoveredDataBootstrapCheckpoint.init (cognitive 35): AutomaticRecoveredDataBootstrapCheckpoint.init has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (31 pts), loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6690f2c9e5ea5c112270999de7a56b63a52508f9e91788c4273f72b6c8489fd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.parseRecord (cognitive 35): AtriaScanRecordParser.parseRecord has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (14 pts), loops 1 (nesting depth added 5). 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10937}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9bd38bd8835113974bced258887da04757a0a3d032fe8be2b4fb48c4186db0"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.mergeDailyMetricHistory (cognitive 35): SessionStore.mergeDailyMetricHistory has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 14, ternaries 2 (4 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23591}}}],"partialFingerprints":{"codehealthFindingId/v1":"9deb3ac04b7ba94f8f614fe1ad1a63a1c994207841d9b2f1583f08a36c426376"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaCoachPayload.serializedNumbers (cognitive 34): AtriaCoachPayload.serializedNumbers has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"30791a645e0b0b487a3c0bf7659073b59ba0db132de44d43bfc5e8ae01d16a46"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ActivationNowIfReady (cognitive 34): AtriaBLEManager.sendProtectedR10ActivationNowIfReady has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 19, if/else 13 (15 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15948}}}],"partialFingerprints":{"codehealthFindingId/v1":"33ff7ef06b21317e3725bf33b1cd5d0027c63cbbcb3b3021f0a4d5093a667373"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.logClockCommandResponse (cognitive 34): AtriaBLEManager.logClockCommandResponse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 11, ternaries 5 (10 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32138}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3be1b72b6d10035928bc54a6b592cf267adb88935443d4ea4edecdea283982"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.recordMetricUsableRows (cognitive 34): AtriaHistoricalGapLedger.recordMetricUsableRows has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 2 (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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"a06234aca33d57f753813830ea6fde47e95077029c5e48d55bd242aed7643fb8"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.endWorkoutSession (cognitive 34): AtriaHomeView.endWorkoutSession has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (28 pts), ternaries 5, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":4210}}}],"partialFingerprints":{"codehealthFindingId/v1":"7037bf0284437f15acfff46c649f79b455569ba62867f16906c60f39d160ada4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.makeHeroSnapshot (cognitive 34): AtriaHomeModel.makeHeroSnapshot has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, ternaries 11, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12877}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e8172fb4e75a9ffd2c0574fd35bf8d85b557ac9dfa7fae97c5322c0dae43e5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredHeartRateProjection.projectCancellable (cognitive 34): AtriaRecoveredHeartRateProjection.projectCancellable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 8, loops 5 (nesting depth added 7). Of this number, 26 points are the body\u0027s own statements and 8 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"c006bcfc52e0f8cd354a6b4b17f29a95dde0c81debe1bf05775d75cde60ea827"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredRRProjection.verify (cognitive 34): AtriaRecoveredRRProjection.verify has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 21, if/else 13. 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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ecf0cd0f448493e75880e8ff36eb5009ffebce44af7999e0f9c99ec9ba2345"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.skipValue (cognitive 34): AtriaScanRecordParser.skipValue has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (4 pts), boolean chains 3, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11352}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2d67b4fe0e7ae6a5ae66e88fbcbc6148dad1ee7aa7f0907659ca4285952304"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.qualifiedLnRMSSDCore (cognitive 34): SavedSession.qualifiedLnRMSSDCore has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, ternaries 2 (4 pts), loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":1978}}}],"partialFingerprints":{"codehealthFindingId/v1":"cababee240734c8c537323f9b878e333483b7a9be127cb814f3f7b7ac7ce52d0"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleSleepReviewCacheRefresh (cognitive 34): SessionStore.scheduleSleepReviewCacheRefresh has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, ternaries 3 (4 pts), match/switch 1 (2 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":36749}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4f38038ac714c3b62865b24bf0f33834528511b0175b3208ccc65ea4fed745d"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sustainedWakeOnsetCore (cognitive 34): SessionStore.sustainedWakeOnsetCore has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 8 (9 pts), boolean chains 3 (nesting depth added 11). Of this number, 28 points are the body\u0027s own statements and 6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41289}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92bf18c5230cbbb87d081a5e35d946f746636273380dc63d377b01ea32ab555"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.commitPreparedWakeBoundarySleepIfUseful (cognitive 34): SessionStore.commitPreparedWakeBoundarySleepIfUseful has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5, ternaries 1 (3 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41734}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4acbc76640e66196320fd9885c1658a901446d69d06b249b70a22c8d0d5607"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.rebuildBaselineCancellable (cognitive 34): SessionStore.rebuildBaselineCancellable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 4, loops 2 (3 pts), ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58511}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66f3c2401e420675989ff0922c88fa04db44f5b56091b3ef6861a83a5f702b9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleRangeLossBackfillIfNeeded (cognitive 33): AtriaBLEManager.scheduleRangeLossBackfillIfNeeded has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 12, if/else 11, ternaries 10. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21112}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d007e438a6a53b353e747fcdea3e9d2255f2c19bc0893a1311edea1861e5be"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.performHRContinuityWatchdogAction (cognitive 33): AtriaBLEManager.performHRContinuityWatchdogAction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, ternaries 5 (7 pts), match/switch 3 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25889}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8a703da0abcd90b532cfb375975ee08195052ba34a6d6f6fbd42f11428131b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBackupCompression.transform (cognitive 33): AtriaBackupCompression.transform has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 2 (7 pts), match/switch 1 (2 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":"Atria/Atria/AtriaBackupCompression.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0a022e2edc184ed7a55e597bbdb74058987fd05500ac2f4530c7cd117cb4f2b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.writeDecision (cognitive 33): AtriaIMUDiagnosticTransport.writeDecision has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52dd4f2e754fbb36577dfe1082d4c3186c349bd975bc0456c44cebcb2ebcf01"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaJournalInsights.insightsCancellable (cognitive 33): AtriaJournalInsights.insightsCancellable has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaJournalInsights.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"8896d11744617b9a480a1c9489f5409a96715e84909b5b931fdf40575a6d4a80"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightMinuteBuilder.build (cognitive 33): AtriaNightMinuteBuilder.build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 4 (7 pts), boolean chains 6, loops 5 (nesting depth added 10). Of this number, 32 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":"Atria/Atria/AtriaNightMinuteBuilder.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"3edd11bb68e3b749321b572937c3c72fac4c5018e239a6d746f445eaca3a4330"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSettingsView.dataSection (cognitive 33): AtriaSettingsView.dataSection has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 10 (22 pts), if/else 6 (8 pts), boolean chains 3 (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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"3408f24b620fdc0565278043188ed543f928558bb161df3857992402baf7ce0b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.qualifiedActivityContexts (cognitive 33): AtriaHistoricalStressReplay.qualifiedActivityContexts has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 14, loops 2 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2382}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2449997d03415e12d888f200bc43505becc929ad53292bed01018c29ac43259"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4DailyMotionBankRearmPolicy.evaluate (cognitive 33): AtriaWhoop4DailyMotionBankRearmPolicy.evaluate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31 (32 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4DailyMotionBankRearmPolicy.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6663823a1e97b161cfdb640a56efebfe4ecd51e620487240d5f07cdb6221cf8"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoryArchivePipeline.prepare (cognitive 33): AtriaWhoop4HistoryArchivePipeline.prepare has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 10, if/else 10 (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":"Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"66af9e33c655428138ae936dc5e505939d996e45cd4f4903debaab2e47c3104e"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.resumeTerminalConsumerProjectionsAfterCrash (cognitive 33): HistoricalArchive.resumeTerminalConsumerProjectionsAfterCrash has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 26, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6af77adfa20faf6288404b8e0637fed07534f991107cedfd3820b6ecacf35a"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataBootstrapSourceImage (cognitive 33): HistoricalArchive.automaticRecoveredDataBootstrapSourceImage has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 19, if/else 6 (11 pts), match/switch 1 (2 pts), loops 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4594}}}],"partialFingerprints":{"codehealthFindingId/v1":"925291fd18125ca68d63d2e988b8308d2f187bcd354bba39d3e832761e06a7f3"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.detectedSleepOrRestActivityCancellable (cognitive 33): SavedSession.detectedSleepOrRestActivityCancellable has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, if/else 6 (8 pts), ternaries 3 (7 pts) (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7894}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c156761e781454a6fa3d99ff5d15804ace53f8e1f25944a4a89f460f97a79f5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.updateStrapStreamState (cognitive 32): AtriaBLEManager.updateStrapStreamState has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 21, if/else 8, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f3e5e693aa8a3311882583af6b0a188e2f97912ad9eddf60ae97a3e6e0062c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.beginPostReconnectStreamLeaseIfNeeded (cognitive 32): AtriaBLEManager.beginPostReconnectStreamLeaseIfNeeded has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 3 (6 pts), boolean chains 4, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed9e72426d534d02af3047bf083ecf55278c4b00913e6a5b9833b8b59b3888d6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startOneShotHistoryTrimIfNeeded (cognitive 32): AtriaBLEManager.startOneShotHistoryTrimIfNeeded has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 17, if/else 10 (12 pts), error handling 1, loops 1, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41546}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bdb1adea3e15493877428c2725b1a0f7d4d51aec030ae716230d61bad173a9d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceipts (cognitive 32): AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceipts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 3 (8 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8d3eef24a57038982a2c394b03a954ef9099a69d8263c8cf2a25bc4aec1252"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.updateWorkoutDetectionPrompt (cognitive 32): AtriaHomeView.updateWorkoutDetectionPrompt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 10 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3949}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31d1d6e2da6a8c86489395778cfb1965a3a23beb789738cc35de5ff4949eb70"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.observe (cognitive 32): Tracker.observe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 7, match/switch 1 (2 pts), ternaries 1 (2 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":"Atria/Atria/AtriaStrapSetup.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdcab7bc68846ced778868eff72593d96cc6ebbd29006c194398be8d91c20bc"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.plannedCounts (cognitive 32): HealthKitExporter.plannedCounts has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 13, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"909c30d1263a8e1c6238939176021301862f56627cf924b624e50eef925f0490"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.canonicalizeAutomaticRecoveredDataBootstrapEvidence (cognitive 32): HistoricalArchive.canonicalizeAutomaticRecoveredDataBootstrapEvidence has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5198}}}],"partialFingerprints":{"codehealthFindingId/v1":"55179356596373602b5927384db01630cef43c1862353b5912337b570480a3ae"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.boundedSleepReviewAuthorities (cognitive 32): SessionStore.boundedSleepReviewAuthorities has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, loops 5 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37118}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1c25a2b082714e5f2462b0fba852104018033ec11dae4551a051dfecaa16c0b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.rebuildConfirmedSleepRecoveredMotionProvenance (cognitive 32): SessionStore.rebuildConfirmedSleepRecoveredMotionProvenance has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, ternaries 2 (4 pts), loops 1 (2 pts), error handling 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46965}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3297a835c22ccfd11c591a070cfb6d4eeb024d249865b0bc6f793787234373f"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoryView.body (cognitive 32): HistoryView.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (6 pts), boolean chains 5 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58755}}}],"partialFingerprints":{"codehealthFindingId/v1":"6987bb57abb25f19a098384caac2acee9b0f22179c44f0e25ef97e419588a366"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityWorkoutDetailSheet.body (cognitive 31): AtriaActivityWorkoutDetailSheet.body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 4, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4025}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b556059df204fcee3b4325872817427e3852785b8232836bef9f5cc55623520"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaApp.body (cognitive 31): AtriaApp.body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (23 pts), match/switch 4, ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ff2a23f840a4c154365e287aa2f00372173e21bd2c1c8cbb111950b6d01741"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBehaviorImpactPresentation.model (cognitive 31): AtriaBehaviorImpactPresentation.model has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (6 pts), ternaries 3 (6 pts), boolean chains 5 (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":"Atria/Atria/AtriaBehaviorImpactPresentation.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"191843f8952ac47a4164bae854a6e658d7210a649f39d6c3736ac267e374ab1d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.recordCompressedStorage (cognitive 31): AtriaHistoricalArchiveCatalogStore.recordCompressedStorage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 21, if/else 8 (9 pts), error handling 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"71415a9df482b1cee7231297bc3ccb2560188160a608dfc476eafaa8ab4d77b9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.validate (cognitive 31): AtriaHistoricalFullDrainCoveragePolicy.validate has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 25, if/else 4, loops 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10fc71561899163c4f7364bdeefce03a39b4539f1743e1ed2be97ff4c7720e5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cognitive 31): AtriaHistoricalLongTermRollup.validate has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 22, if/else 7 (9 pts) (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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"394036a0183a6694acde6a506da3833cab0779d2da2af083aec861da7219500f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStepsWeekChart.body (cognitive 31): AtriaStepsWeekChart.body has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 4 (6 pts), boolean chains 5 (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":"Atria/Atria/AtriaStepsWeekChart.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d7cdac02dff8b1ba317fa054b5c9051b3613c0caa68875134bc7cac3ad1149"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrapStepLedger.reconciledCheckpoint (cognitive 31): AtriaStrapStepLedger.reconciledCheckpoint has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 15 (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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b65b8bb4be4e4fbdddf3ad1fa9030e489422d0294077172d55919bdf10e2309"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressMonitorStore.replayMayReplace (cognitive 31): AtriaStressMonitorStore.replayMayReplace has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 12 (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3484}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa97cb97efecc74739d2a2e21d4b3750a094b1b7d242a7f2e1d3ad4ba3588f71"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivity (cognitive 31): AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivity has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2fb498e7f55d086b487910ab832516d2c96bb37b6102402b7a575a2bdec3afa"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.resumeFullDrainConsumerProjectionsAfterCrash (cognitive 31): HistoricalArchive.resumeFullDrainConsumerProjectionsAfterCrash has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 24, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2437}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d9a90242296f68569f1f330b7b9ede23ca8cc557e7534b47d0d032cc311dc06"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeHistorySnapshotsCancellable (cognitive 31): SessionStore.makeHistorySnapshotsCancellable has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 2 (3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20953}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2705f69eb891806d145b68beb0bda8bc57561bc8e808680de29b97f823132b6"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.recoveredDailyPreparationSessions (cognitive 31): SessionStore.recoveredDailyPreparationSessions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":21261}}}],"partialFingerprints":{"codehealthFindingId/v1":"4823bcd95c060fecaa84eec75ada2c1f1502be3c8e25f668cbbbc166713f1313"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.finalizedSkinTemperatureDeviationByMorningDayCancellable (cognitive 31): SessionStore.finalizedSkinTemperatureDeviationByMorningDayCancellable has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":22956}}}],"partialFingerprints":{"codehealthFindingId/v1":"f593c2824ec09c2260788ce924b6fd6370e0ec9603da39dd2daa38e2676ae08f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.motionQuiescenceRefinedBounds::boundaryEvents (cognitive 31): SessionStore.motionQuiescenceRefinedBounds::boundaryEvents has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SessionStore.motionQuiescenceRefinedBounds) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49799}}}],"partialFingerprints":{"codehealthFindingId/v1":"64cfd2902a48f9bd0bf4efa4d4f9919b402f83e190818fd312f1465f72f01ff8"}},{"ruleId":"D2","level":"warning","message":{"text":"Strain.contiguousSegments (cognitive 30): Strain.contiguousSegments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 3 (4 pts), ternaries 3 (4 pts) (nesting depth added 8). Of this number, 29 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc58acc47d578316382cd8518fb83fe9e87cb6196f31cc61c9c263a041c6085b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestStrapStatusRead (cognitive 30): AtriaBLEManager.requestStrapStatusRead has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, match/switch 2 (5 pts), ternaries 1 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10451}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3c10fa93c0a65ff9bea20494c8aa8b76d55189f17c44edeab57cb1dc2187e6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.finishRecording (cognitive 30): AtriaBLEManager.finishRecording has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 6 (7 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30536}}}],"partialFingerprints":{"codehealthFindingId/v1":"631249607d6a5f7b5bf08256a2d4b26c220bd5c2246ea58e444a924298766f2e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleHistorySequenceConfirmationRetry (cognitive 30): AtriaBLEManager.scheduleHistorySequenceConfirmationRetry has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 12, ternaries 2 (4 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46370}}}],"partialFingerprints":{"codehealthFindingId/v1":"620cfd0f676abfdc50336dae6ad7674f1632c6d1635e25201c7c438240c0801a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDailyStepPresentation.detailText (cognitive 30): AtriaDailyStepPresentation.detailText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 3 (7 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7bfbfd1021078758afe88dcffb4da04b85a68cc1b3edaedc365e882bd74659d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decodedIndexEntriesAndDigest (cognitive 30): AtriaHistoricalArchiveDurableStore.decodedIndexEntriesAndDigest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 5, loops 2 (5 pts), ternaries 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf61627e0e876ce440fe7d83d99b5126b9e14aa496e628fd47ed36d80e3b9fb"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoveragePolicy.evaluate (cognitive 30): AtriaHistoricalFullDrainCoveragePolicy.evaluate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (13 pts), loops 2, ternaries 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fec882b4009d975522d7db44b44eb7b9f01df5db6fc2e041868c4f46d1161bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGeneratedArtifactGC.planReceiptDirectory (cognitive 30): AtriaHistoricalGeneratedArtifactGC.planReceiptDirectory has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 9, loops 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8aa4b067fd064deb568da601bc56e484df221c7a110db217d05415808af1d8d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepMotionQuiescence.quiescentWindows (cognitive 30): AtriaSleepMotionQuiescence.quiescentWindows has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 7 (8 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":"Atria/Atria/AtriaSleepMotionQuiescence.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b26a1ca157d7dfa7994e7570cba1f2ee8f828687782b17e9ab0f11803cb3378"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressMonitorStore.mergeHistoricalMinuteFacts (cognitive 30): AtriaStressMonitorStore.mergeHistoricalMinuteFacts has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 8 (9 pts), ternaries 1 (2 pts) (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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":4030}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab853a247eeaccae21b05130fdf6c9424c9a38cf15503cc5293d4fda6e99f8f7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.verify (cognitive 30): AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.verify has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, if/else 12 (13 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":"Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38d62844c8d097e1fc29962c4f6c0487f987976f3e4cdf8a7d7d82607ab932c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDailyStrainTargetStore.resolve (cognitive 30): AtriaDailyStrainTargetStore.resolve has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 6, match/switch 1, ternaries 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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c53ce1a8c162b6812461740c90b48fc8117f7b4f5abe1325dcf9b6a76b4251"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.gravitySample (cognitive 30): HistoricalArchive.gravitySample has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 21, if/else 8 (9 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9273}}}],"partialFingerprints":{"codehealthFindingId/v1":"586ae8bc88edb1296c310aa7625c13b0bb3b967b5c965408097837c1059b537d"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.sleepRespiratoryRateCancellable (cognitive 30): SavedSession.sleepRespiratoryRateCancellable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 9, loops 2, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9c87aeb2dbfa412447a1ad3aa935a322cbabbde3ed1b11ba83a43e2207cdfb"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.dailyLoadTRIMPCancellable (cognitive 30): SavedSession.dailyLoadTRIMPCancellable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 8, loops 4 (5 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2481}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9f85b281ca30797e46caa652b8e6dc82cf27d51b5edbde7e66486802d8f40a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeDailyRollupStoreEntriesCancellable (cognitive 30): SessionStore.makeDailyRollupStoreEntriesCancellable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, ternaries 2 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":24073}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26d03329b7045894dba89cea3234a4e01136aa048357ff635ea93a0158697cf"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sleepStageResearchSampleCount (cognitive 30): SessionStore.sleepStageResearchSampleCount has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 7, loops 3 (4 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44008}}}],"partialFingerprints":{"codehealthFindingId/v1":"a480738e38629f3e46dfb5e96ce52b8772a629eeec568cbdaf72237154e14368"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.cooperativeRecoveredMotionSleepProvenance (cognitive 30): SessionStore.cooperativeRecoveredMotionSleepProvenance has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, loops 3, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51405}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7cc607df26f087b116a75064bf71de566f46358ec47ae95a7abd57b9953f468"}},{"ruleId":"D2","level":"warning","message":{"text":"Strain.maxHeartRateZoneSeconds (cognitive 29): Strain.maxHeartRateZoneSeconds has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 4 (7 pts), boolean chains 6, 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3524cb9416f51def94b72f91ea301c5f2e21880a348f42917c280a7bd64c6da"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalActivityProjection.validatedInspectionEvidence (cognitive 29): AtriaHistoricalActivityProjection.validatedInspectionEvidence has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 12, 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"3619898917c398b35d98fdd440217f6832ec623021ae12567ef634b5bad26eef"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGeneratedArtifactGC.prune (cognitive 29): AtriaHistoricalGeneratedArtifactGC.prune has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (6 pts), boolean chains 2, ternaries 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":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7367100b75a4fcbfe833c567a12a01bf5a030b402ca6922e6a7d712f2b746c16"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalLongTermStore.verifiedRetirementCandidates (cognitive 29): AtriaHistoricalLongTermStore.verifiedRetirementCandidates has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 4 (7 pts), loops 3 (4 pts), ternaries 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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"8afd8963a9f9e00e3640631d156ec83ff52ac5ec3efbc55280c082937ab64f8e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSleepProjection.detectCandidates (cognitive 29): AtriaHistoricalSleepProjection.detectCandidates has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (11 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 5). 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e62c38e881f5541aaad29e9ae05d353ae9f96881d2fe6f631498a6f9c6448a1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.updateLiveActivity (cognitive 29): AtriaHomeView.updateLiveActivity has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11, boolean chains 9, if/else 8 (9 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3533}}}],"partialFingerprints":{"codehealthFindingId/v1":"3901cfb4f5db358251fe9fdc245da680c6e3f5af0717ddad4761bb18c1f70e5a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveActivityCoordinator.update (cognitive 29): AtriaLiveActivityCoordinator.update has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 3, 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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"90961eb95efe3bc88533d30c28a2518e0b03647974497a73c2cf6f7a6f5a91e1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.fillingHeartRateHoles (cognitive 29): AtriaHistoricalStressReplay.fillingHeartRateHoles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8, loops 3, ternaries 2 (nesting depth added 4). Of this number, 16 points are the body\u0027s own statements and 13 belong to 2 function items 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1813}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6233a5d4e418e771d5a15bd8be3aaae55c4308ffc004ee36bd84fc5a08c4ee1"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.schedule (cognitive 29): LocalNotificationScheduler.schedule has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 7, boolean chains 3, error handling 1 (2 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af7fc4cbdd1cddb2901b516acb79c6427097501bfd0b93d720d4acce9586f73"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepStageIntegrity.validatesCancellable (cognitive 29): AtriaSleepStageIntegrity.validatesCancellable has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 12, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":4203}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f94b92401d7c02030127c4dc303b0d0fe19456ca7391abfa0b09ccf9ebf7f8"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.deriveInsightsCancellable (cognitive 29): SessionStore.deriveInsightsCancellable has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, match/switch 2 (3 pts), loops 2 (nesting depth added 8). Of this number, 28 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":25028}}}],"partialFingerprints":{"codehealthFindingId/v1":"427e05f22a5776a29356512ff4d03c600c5ac3f330b7211fcbb72e0ae1300580"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sleepStageQualifiedRRInputs (cognitive 29): SessionStore.sleepStageQualifiedRRInputs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 6, loops 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43936}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d509ad14e36daaf0ff4ff4842de0e3bd7f0b75ec5d4d34d76c00af9520a23b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.deferredLaunchCardSettlementMatches (cognitive 29): SessionStore.deferredLaunchCardSettlementMatches has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (11 pts), match/switch 3, ternaries 1 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57511}}}],"partialFingerprints":{"codehealthFindingId/v1":"1543cf690bf5cfe0d67f4fcedbeda4d202cc0b726e714ffcde8237b1cf08a7ea"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.requestDeferredLaunchCardSettlement (cognitive 29): SessionStore.requestDeferredLaunchCardSettlement has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":57572}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ec792a661e8c0589b3d181dce83b21b80c2c4b0d24190cd72dea936dbb089c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.protectedR10RecoveryDecision (cognitive 28): AtriaBLEManager.protectedR10RecoveryDecision has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, ternaries 1 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4063}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8a31aee80125dfdac1f429a6522f54e87175a9687e0ca95ba2ab0c16fa9764"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.rearmPersistedInterruptedFullDrainAfterFreshHRIfNeeded (cognitive 28): AtriaBLEManager.rearmPersistedInterruptedFullDrainAfterFreshHRIfNeeded has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 6, ternaries 6, error handling 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11876}}}],"partialFingerprints":{"codehealthFindingId/v1":"3328a2c62c1f72b7093d75ea6f02b955e01fbe7c74e9353c0bb835aee5472800"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleIdleWindowHistoryPipeRetryIfNeeded (cognitive 28): AtriaBLEManager.scheduleIdleWindowHistoryPipeRetryIfNeeded has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (6 pts), boolean chains 3, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13034}}}],"partialFingerprints":{"codehealthFindingId/v1":"4653108a5af656278132caabfb97e8f8d8a7699ed911d5b23e7bec48f59e43f9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestOnboardingPairingPreflightIfNeeded (cognitive 28): AtriaBLEManager.requestOnboardingPairingPreflightIfNeeded has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (11 pts), loops 1 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14783}}}],"partialFingerprints":{"codehealthFindingId/v1":"4407407531c1a8d0683e08ccb4efe464862ed31ee2669e4fde7321bbdadeb79d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleConnectedRawHistoryCatchUpContinuation (cognitive 28): AtriaBLEManager.scheduleConnectedRawHistoryCatchUpContinuation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, ternaries 4 (6 pts), match/switch 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":20076}}}],"partialFingerprints":{"codehealthFindingId/v1":"c49b1c1a4d4b2b26202eb288de99c28544a7433dbe8b91943a7582ecbf552c75"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recoverNoDataWatchdog (cognitive 28): AtriaBLEManager.recoverNoDataWatchdog has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 5 (10 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25601}}}],"partialFingerprints":{"codehealthFindingId/v1":"822b317a809faa8c5f6ef222c9e685237269ec53d2215d7f74dcee60e80102ac"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.publishRRContinuityQuality (cognitive 28): AtriaBLEManager.publishRRContinuityQuality has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 5 (10 pts), boolean chains 7 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43010}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d7dc49b3f26c173ff19b39691555307fd90970034aed81cd209ea1e185aa30"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaDeviceUseJournal.sustainedUseIntervals (cognitive 28): AtriaDeviceUseJournal.sustainedUseIntervals has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (2 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":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e8527619aa81fa3c68723c5bf1640eb0cdd356d731c9d5fe67814828e5c435"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSealedJSONLCompression.commit (cognitive 28): AtriaHistoricalSealedJSONLCompression.commit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 6, 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, 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1c994ba3e8cf40f92849f64b81173c66b6115550fc0f2a844f031a0dde4798"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrapCalibrationArchive.materializeDecodedCompactIMUSamplesFromArchive (cognitive 28): AtriaStrapCalibrationArchive.materializeDecodedCompactIMUSamplesFromArchive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 5 (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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff65476e8c717d9fe7e0f8f3a5b7db4c2d254750bc81a695a8472479c6d4843"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrapStepLedger.isValid (cognitive 28): AtriaStrapStepLedger.isValid has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 21, if/else 6 (7 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"517b4113db34b73c673b3000e86a7788c2441b8a951c568d8fd9ece2f17fc6fd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressMonitorStore.timeAlignedRRIntervals (cognitive 28): AtriaStressMonitorStore.timeAlignedRRIntervals has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, loops 4 (5 pts), ternaries 1 (2 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3230}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da3f8656bf59be9a14655ae4e5dbceeb12514cc69178ff10d134b6befed25a7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4ExactRangeTrialHarness.validateStored (cognitive 28): AtriaWhoop4ExactRangeTrialHarness.validateStored has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 26, if/else 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":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"569849fd8bf5d381a6c6ddb16dc94c16abe728532b436ef094276820f2a14c72"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection (cognitive 28): AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), loops 4 (7 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2252}}}],"partialFingerprints":{"codehealthFindingId/v1":"3442aafcbf01b22f40e418608b307623f7b1b3dd855d24fc37ba704c0815f2f1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.read (cognitive 28): AtriaWhoop4MotionTickCompactStore.read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2516}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd31e59b721e9283ce87c821f921de0d8206929575a4eebcbffc7bf7e4dbe45"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.makeActionableConnectionDecisions (cognitive 28): LocalNotificationScheduler.makeActionableConnectionDecisions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, ternaries 4 (7 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d4b15deaba4dce0d9270bee6f03cc8386d04014db039deeb2a4e3ad0feb138"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.beginFreshHistoryOwnerCutover (cognitive 27): AtriaBLEManager.beginFreshHistoryOwnerCutover has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (11 pts), ternaries 4, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14590}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d118e22220b2c464bb06bb5b45b283157737ecce06e428b540f50506fbcd343"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recordAcceptedHRSample (cognitive 27): AtriaBLEManager.recordAcceptedHRSample has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (8 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30927}}}],"partialFingerprints":{"codehealthFindingId/v1":"a552ee7696b5b241947d4cc6beeba92585b9901ff06ed2bf88aaf560e07ac0a7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendGate4OfficialGen4CompactMotionSequenceIfRequested (cognitive 27): AtriaBLEManager.sendGate4OfficialGen4CompactMotionSequenceIfRequested has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39304}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd7e57b28b109a80723f0bb69845cc3d87ab6ef194e83a364cf5600a1dedcf3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.resilientHistoryDrainSeekUnix (cognitive 27): AtriaBLEManager.resilientHistoryDrainSeekUnix has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 19, 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2820}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e8605a84913e9858c7e49c64fdc21ac529535d2be66644f6102fcccfe3f276"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.parseProprietaryUpdate (cognitive 27): AtriaBLEManager.parseProprietaryUpdate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, loops 1 (3 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57667}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb506f315fe9f6847f0feeed99689c8924cc7a111c3b64b313afe786d6ee10fb"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.validatedCurrentSet (cognitive 27): AtriaHistoricalConsumerReceiptLedger.validatedCurrentSet has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, error handling 6 (8 pts), 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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"559e8a8ff17983fa83ec344e26455fc5441b9ef9848660f7cb518255f2c6a84e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSessionInspectionProof.validatedEvidence (cognitive 27): AtriaHistoricalSessionInspectionProof.validatedEvidence has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 12, error handling 1, 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a6ef7de120228752e8cdc5f81208978fffa9878f9fd53449c54353a7463cdfa"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepHypnogramPresentation.compositedRuns (cognitive 27): AtriaSleepHypnogramPresentation.compositedRuns has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, ternaries 2 (4 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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"47859784250cef6c1f3aed53bc7b7c9575d6020a010c0df0fe9d5282374f17c7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodayScreen.body (cognitive 27): AtriaTodayScreen.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, ternaries 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"02c758e4b993dd3140d4aa3359f9756dc67d25944b48079e856fafdc5c3b6b33"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.loadHeartRateSamples (cognitive 27): HistoricalArchive.loadHeartRateSamples has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 10, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9346}}}],"partialFingerprints":{"codehealthFindingId/v1":"d76fe9b00debaaba30ff017c4943f089933fec90aa1713544b147ad4468e0126"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.bytes (cognitive 27): HistoricalArchive.bytes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 2 (6 pts), loops 2, match/switch 1 (2 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9568}}}],"partialFingerprints":{"codehealthFindingId/v1":"08070d07cb2de2f7702fce523fd1206f057da3b9cbe3506a43023556fff2d626"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe (cognitive 27): SessionStore.scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":12099}}}],"partialFingerprints":{"codehealthFindingId/v1":"798e30a0e904de1057172eb63248558fd2b459c969f90f5a2a2a9f21c85d1b86"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.mergeCanonicalHistoricalRollups (cognitive 27): SessionStore.mergeCanonicalHistoricalRollups has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":21512}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa089a49faedd86e34dd310061302ce987fa28e394583587b7a5e62a9f3dbce"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.compactHistoricalArchiveIfUseful (cognitive 27): SessionStore.compactHistoricalArchiveIfUseful has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 12, ternaries 2 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28569}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee6724412d1707aa04c86db45f2553454f56c809918c31808bf49d4d2b0cb33e"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmSleepHistoryNight (cognitive 27): SessionStore.confirmSleepHistoryNight has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 8 (9 pts), boolean chains 5 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38198}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab6459f8b634c69551372e9cfaae87a9ea2cbaacb204de5d4572aa1b05d279e"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.validateRRReferenceFromDocuments (cognitive 27): SessionStore.validateRRReferenceFromDocuments has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 5 (7 pts), boolean chains 3, error handling 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54247}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb12492d21c4266393b1a69e17517db8609106aa4cab17e645bf3cd95caa0ace"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.continueDeferredLoadFollowUp (cognitive 27): SessionStore.continueDeferredLoadFollowUp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (5 pts), boolean chains 2, match/switch 1 (2 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57128}}}],"partialFingerprints":{"codehealthFindingId/v1":"451d4cd92297548d7efe098ef77caf8538d31c0d3aa9a699ecb8ac67fd745d9d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.flushLeftoverMotion (cognitive 26): AtriaBLEManager.flushLeftoverMotion has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8693}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e23c1a31c0d4240fe51e4c0162f59b0f23ee44a1ba5d54fb3837954309ae7b2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleReadOnlyHistoricalPayload (cognitive 26): AtriaBLEManager.handleReadOnlyHistoricalPayload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, error handling 2 (3 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43310}}}],"partialFingerprints":{"codehealthFindingId/v1":"568913c4ebcfcd765ed93b2e76787e6def0e9dc5b07108b7d9fc10e9466de06c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.flush (cognitive 26): AtriaHistoricalArchiveDurableStore.flush has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, loops 4, error handling 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0d8910a338eda19d0219921a69a4b0ffa98b049d890385cb55382da6aa674c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerDestinationStore.verify (cognitive 26): AtriaHistoricalCanonicalConsumerDestinationStore.verify has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 19, if/else 5, error handling 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"526bfc5582587d09d61e16a993bf6ea556c228ee585f2a4774d5ef7cd1616cee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.validatedInspectionEvidence (cognitive 26): AtriaHistoricalDailyConsumerProjection.validatedInspectionEvidence has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (12 pts), error handling 1, 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94cb0572d15602950ded86d347360cbd60411f5f4a0c8abca7b208fa03869aa"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalReplayIdentityShard.verifyRetainedReceipt (cognitive 26): AtriaHistoricalReplayIdentityShard.verifyRetainedReceipt has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 24, if/else 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":"Atria/Atria/AtriaHistoricalReplayIdentityShard.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66d5b308c926d6615330ab694f361dd20591fde7c64e91101fce5535a9cc3a2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.finalizePendingWorkoutIntent (cognitive 26): AtriaHomeView.finalizePendingWorkoutIntent has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 8 (11 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2748}}}],"partialFingerprints":{"codehealthFindingId/v1":"8387d0bae78d8407a713f8f20043677fc1e0746725a694d2b94cd21430c9c3a3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaManualSleepSheet.detectedEvidenceCard (cognitive 26): AtriaManualSleepSheet.detectedEvidenceCard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (6 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":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"7669c673d4b684055250879a522e30128f9d858d383a07e057d78d7c6bc7c4ee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodayMorningWhiteboardModel.make (cognitive 26): AtriaTodayMorningWhiteboardModel.make has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 9, boolean chains 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":"Atria/Atria/AtriaMorningWhiteboardModel.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"637af5b096676d7d92056cb9513578b480d97e0c6b6643c4f02cd3e99baa229e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightBaseline.sentence (cognitive 26): AtriaNightBaseline.sentence has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 13 (25 pts), match/switch 1 (nesting depth added 12). Of this number, 25 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":"Atria/Atria/AtriaNightBaseline.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd4d75bdf9383bcb2cdf73c241f6c4507c336ec58776d35f769b8a23cef64b01"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaOnDeviceModel.dataBlock (cognitive 26): AtriaOnDeviceModel.dataBlock has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOnDeviceCoach.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefae855f975e1a04e5cedeafc780165be0818f448454d7008ce4b41c6a12c7b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivityFragments (cognitive 26): AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivityFragments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1811}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df36c21971e6050f5720e107fb306780859fe99251ac86eec769ca7481d4ae4"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataCacheAuthorityRestorationPlan (cognitive 26): HistoricalArchive.automaticRecoveredDataCacheAuthorityRestorationPlan has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 18, if/else 3 (5 pts), loops 2, ternaries 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4394}}}],"partialFingerprints":{"codehealthFindingId/v1":"51392505cd7f3acb21a55accd25f8cf3029da5eb6dab2bfe08746659d448be34"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.makeAutomaticRecoveredDataBootstrapCheckpoint (cognitive 26): HistoricalArchive.makeAutomaticRecoveredDataBootstrapCheckpoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5027}}}],"partialFingerprints":{"codehealthFindingId/v1":"776e81b3ee142189913928942700fa411dd1a9e65f24410df07bc3140aa4c97e"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.workoutReadinessCore (cognitive 26): SavedSession.workoutReadinessCore has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, ternaries 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7665}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e659d2e571e8787d7f2fda6b68526298c341a8371c37a4e99335abb256ce91"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.dumpSleepCandidateDiagnostics (cognitive 26): SessionStore.dumpSleepCandidateDiagnostics has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (18 pts), boolean chains 4, loops 3, if/else 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13216}}}],"partialFingerprints":{"codehealthFindingId/v1":"66eb566eba0799ddc695a8b527f6f448a5ca27ec92545c9a04b16edb6f642e20"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeDailyMetricRollupPreparationCancellable (cognitive 26): SessionStore.makeDailyMetricRollupPreparationCancellable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":14105}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe513cb662f458f4a8aa382e1c8be05c2e8e991809bf551c049131b43ee0f8fc"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.runRecoveredVerifiedActivityShadowStep (cognitive 26): SessionStore.runRecoveredVerifiedActivityShadowStep has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, error handling 1 (2 pts), match/switch 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, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19241}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e426ba2033d35ae685781c189c09f2ecb959c49ef73d455d82a67255ee7422"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.loadCachedResidentJournalSessionForSleepReview (cognitive 26): SessionStore.loadCachedResidentJournalSessionForSleepReview has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, loops 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29813}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ccf8bf010174b64d8c56c290fd362482185072ebaf937af68adabfc626e7c5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeCompactLatestNightSettlementPreparation (cognitive 26): SessionStore.makeCompactLatestNightSettlementPreparation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), ternaries 1 (3 pts), boolean chains 2, error handling 2, match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":38919}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1b973e1ee6a9bc75ce6b6881aacb41c154020300f1c677bae2e1a2f1e2fbe4"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sleepReviewAdmissionDiagnosis (cognitive 26): SessionStore.sleepReviewAdmissionDiagnosis has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40103}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4fcaa2b7761b1d7ae3695912255376c29aa55edc274ea76aad553a09a5f489b"}},{"ruleId":"D2","level":"warning","message":{"text":"Night.init (cognitive 26): Night.init has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (10 pts), ternaries 2 (3 pts) (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59556}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bff0b2eefc20fd649310de333d215c814cbff42d671c6a40f80341ff757af4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateIdleWindowHistoryDrainIfNeeded (cognitive 25): AtriaBLEManager.evaluateIdleWindowHistoryDrainIfNeeded has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13144}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a7cdef873a0846bf103de7faa64c43a8bad546ac3bc681880b2e1553435ff72"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestProtectedR10InitialProfileNotificationIfAllowed (cognitive 25): AtriaBLEManager.requestProtectedR10InitialProfileNotificationIfAllowed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16350}}}],"partialFingerprints":{"codehealthFindingId/v1":"92dd2f57a604db1f424805e75441cb2164178c2f76f1d7dc0d4933e2c28d2f08"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.pruneRRWindow (cognitive 25): AtriaBLEManager.pruneRRWindow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27129}}}],"partialFingerprints":{"codehealthFindingId/v1":"c89dbe8af0f54c4e1482e399a7433bcbb0f0e7446a5d6e29c8f19307af253960"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reconnectToSavedPeripheralIfPossible (cognitive 25): AtriaBLEManager.reconnectToSavedPeripheralIfPossible has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27965}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c021cfbee3e9d2b1b0d72fb5061d0d1fbd3140dfc9f722233437cdf69a0063"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.retryProtectedR10ShortBurstIfEligible (cognitive 25): AtriaBLEManager.retryProtectedR10ShortBurstIfEligible has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34777}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b221aea3f713c6f20895c6eda2c209d09ac5a72ed07777b62094cf4217f01c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.gate4DailyBankRearmPolicyInput (cognitive 25): AtriaBLEManager.gate4DailyBankRearmPolicyInput has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 19, if/else 4, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36640}}}],"partialFingerprints":{"codehealthFindingId/v1":"3244d22610ea74a318ff912b9944629ca6d431e561448de41ca6ef3be3520066"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recordResearchProbeCandidate (cognitive 25): AtriaBLEManager.recordResearchProbeCandidate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, ternaries 5 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44592}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e463aab417ce53aaefd0233dde3645d920987195fa30ebc5dff03f8fdf04c0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleParsedRealtimePacket (cognitive 25): AtriaBLEManager.handleParsedRealtimePacket has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51284}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4542c06673fc9c9e28adf821f496e38a5a278bb844f4791e4aff4868eb8d4b3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.restoreStrapStepLedgerAtLaunch (cognitive 25): AtriaBLEManager.restoreStrapStepLedgerAtLaunch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51728}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f665cd6068a4268a73da7f2bf1838a1a99964df59602fb45c323a45c98ac4b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBreathworkSession.finishArtifacts (cognitive 25): AtriaBreathworkSession.finishArtifacts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"edebe5467da756801f13f54498c7a93870685a216ec6fd7869b6714106909289"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepStressCard.body (cognitive 25): AtriaSleepStressCard.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":3284}}}],"partialFingerprints":{"codehealthFindingId/v1":"3179949c4fb48108fb239b1f46c4ea281d6263ae028548ecca6553a9d7a1488d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.init (cognitive 25): AtriaHistoricalArchiveDurableStore.init has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52a3a7603a55889a6600dcac4044336839ab108799cbfab0f17c755aff9ed00"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.loadValidatedDerivedIndex (cognitive 25): AtriaHistoricalArchiveDurableStore.loadValidatedDerivedIndex has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, if/else 7, loops 2 (3 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"302a30b52c8feecee62ef51d284933d47b1b27bd2ff1da5aa08a43ad2a420658"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceiptsFromSnapshot (cognitive 25): AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceiptsFromSnapshot has cognitive complexity 25 (threshold 15). Drivers by points: error handling 3 (8 pts), loops 3 (7 pts), if/else 3 (6 pts), boolean chains 3, 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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"114416b2d7170d634c601203cb44bfe7b7557327d6dd1e8fc5cb68c4b6772774"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordCommittedConsumers (cognitive 25): AtriaHistoricalFullDrainCoverageStore.recordCommittedConsumers has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, if/else 7 (8 pts), 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e19f9f1ac81e9909b46c6f834e10ba556a33d9be22609bf6ca8c189a589db0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaJournalInsights.thresholdSplitInsightCancellable (cognitive 25): AtriaJournalInsights.thresholdSplitInsightCancellable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 2 (4 pts), 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":"Atria/Atria/AtriaJournalInsights.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"2097cc46d714fdd2a172de8238e337609bdaa7344af7f2426d6815dd023530c0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredRRProjection.decodeHex (cognitive 25): AtriaRecoveredRRProjection.decodeHex has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (6 pts), boolean chains 2, loops 2, match/switch 1 (2 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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2b26ce9523ea1e106c2c532168890a614d472dd1f0fae0f88a7dd9f409ebc4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepCooperativeAlgorithms.stableSort (cognitive 25): AtriaSleepCooperativeAlgorithms.stableSort has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (6 pts), boolean chains 3, 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"193bc0ab05765364a49514269fff4a39187848f6d48c3ec52493f770ab25036e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhiteboardCoachSentence.rewrite (cognitive 25): AtriaWhiteboardCoachSentence.rewrite has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7, 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, 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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6ba8d3e4477b2ced94f938b073f6ab5905e81f4d23c15ea4caee6eff0858ca"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.queryHeartRateExportReadback (cognitive 25): HealthKitExporter.queryHeartRateExportReadback has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 8, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"458b96e5718cbb472223801b3421fb90ca74470c8859d72f768abf41b5ca977d"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.stressReplaySessionInputShrank (cognitive 25): SessionStore.stressReplaySessionInputShrank has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":9063}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8004970e5312994ba90e6f15fa185280494a7d27591e7705cb4d5711885a459"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.stressReplaySessionInputGrew (cognitive 25): SessionStore.stressReplaySessionInputGrew has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":9102}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ff4d75c6a2894f6f6d4084161e7d1fb0bf029b99a081bf149843fd4179b870"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.persistPreparedDailyRollups (cognitive 25): SessionStore.persistPreparedDailyRollups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 3 (6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53c5c89bbed455345ef9a8aae1fcf31cce7bbf1f27f15d45a58b87d19bce078"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.pendingSleepRecoveryEstimate (cognitive 25): SessionStore.pendingSleepRecoveryEstimate has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, if/else 6, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26094}}}],"partialFingerprints":{"codehealthFindingId/v1":"463fb76123478cf0da4ae376d204c5eb45b649e50b7a45c5e8bfa8204cdbcdd5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmBestWorkoutCandidate (cognitive 25): SessionStore.confirmBestWorkoutCandidate has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 8, if/else 6 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33666}}}],"partialFingerprints":{"codehealthFindingId/v1":"4350deab378f5f80ce942277433483afabe4853c6c91a00950123a348c6bf0fb"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.biologicalAgeSummary (cognitive 25): SessionStore.biologicalAgeSummary has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52456}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d6ff9ff213e4c73e6a70d9e3eeff3c1baabacc495a8a706263825552e587bb"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.allDayPassiveInProcessRequalifyShouldAttempt (cognitive 24): AtriaBLEManager.allDayPassiveInProcessRequalifyShouldAttempt has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (11 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4747}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59f943ff6d765d6ab8697658ed09e512a143732b009ea0c92bd115f0e8799b2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.updateDutyCycleState (cognitive 24): AtriaBLEManager.updateDutyCycleState has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (7 pts), match/switch 1, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10326}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c76ca0fd1e6b3d389290fd7f9659e402c839a1a032ef18eeb91bd786978099"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.derivedConnectionStatus (cognitive 24): AtriaBLEManager.derivedConnectionStatus has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 3 (4 pts), match/switch 2 (4 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27889}}}],"partialFingerprints":{"codehealthFindingId/v1":"c22db5c56963eb01a6de51e53ce9bb9d39bde7a9d6aaa47f26282f4ca25a7273"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.performProductionHistoryReadPreflight (cognitive 24): AtriaBLEManager.performProductionHistoryReadPreflight has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 11, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42781}}}],"partialFingerprints":{"codehealthFindingId/v1":"44410becf0ccc5b5d074345f786f98cc09422cff29f8d2197782b7616c50c144"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.schedulePendingConsumerFollowupScanMaterialization (cognitive 24): AtriaBLEManager.schedulePendingConsumerFollowupScanMaterialization has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, error handling 3 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47672}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41df376b5c1bbd9b23a22cc261827de14a24e6c08efc49e66c75e593372c6a9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.activeCaloriesForSnapshot (cognitive 24): AtriaBLEManager.activeCaloriesForSnapshot has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), loops 1 (4 pts), ternaries 1 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50097}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d202ed57e7ece5a200403a7d2f3b2ccb8370caf241d36865b2833c6d0ff98f4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.applyOrderedProprietaryCallbackBatch (cognitive 24): AtriaBLEManager.applyOrderedProprietaryCallbackBatch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57401}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0450e195774eae24193610687e9ac7eb2599be79d9fdeb2c8cc291795e28da"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaCivilDayStepAuthority.exactTotalsLocked (cognitive 24): AtriaCivilDayStepAuthority.exactTotalsLocked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, 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":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f1b58db7522836f20c064a75d66b2310cd868ad625e6eee0c3a78d44e1259f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHeroStatusCardHost.body (cognitive 24): AtriaHeroStatusCardHost.body has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 3 (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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"d596bfe20fc9171c7c810ffc37f8faf76bb8eb4b4eb10e058803d948326a6c75"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalActivityInspectionProofFactory.prepareVerified (cognitive 24): AtriaHistoricalActivityInspectionProofFactory.prepareVerified has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, loops 3 (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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a41d710e61e7fba466f8b733d176abbeb0af84e37f10e14bbebdccde07ac28a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.appendOnlyArchiveDelta (cognitive 24): AtriaHistoricalArchiveDurableStore.appendOnlyArchiveDelta has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1784}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76d0fbba14ddf1e8ffacc4054465df6eb5f38ac9b09f81517376b908f24f705"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.stepDays (cognitive 24): AtriaHistoricalDailyConsumerProjection.stepDays has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), ternaries 3, 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"60accd9984ff27e529f376511526f92d70a8d2324a8026190a97b3e5674979b5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalLongTermRollup.validate (cognitive 24): AtriaHistoricalLongTermRollup.validate has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 21, if/else 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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"949f4da414ab7e8c521ab0047cb44932c3054b4a44d06a66d5f4b06c6b8172a7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.handleDeepLink (cognitive 24): AtriaHomeView.handleDeepLink has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 1 (3 pts), match/switch 1 (2 pts) (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":1877}}}],"partialFingerprints":{"codehealthFindingId/v1":"1697b07f22c62da51846c965af8f80256a6e84ce5900ffb221a8b7a52a71b7f2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.scheduleLiveSensorWidgetPatch (cognitive 24): AtriaHomeView.scheduleLiveSensorWidgetPatch has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 14, boolean chains 7, if/else 3. 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3860}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4539923f97972e2e2c79d953f38151b38c6adc80066890cc7801f61cb190060"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaManagedStorageInventory.allocatedBytes (cognitive 24): AtriaManagedStorageInventory.allocatedBytes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 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":"Atria/Atria/AtriaManagedStorageInventory.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"576484199df17f88823b4b1344346f18c60fd638e0ea1b9b93c26a767693418b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaMetricZone.zone (cognitive 24): AtriaMetricZone.zone has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaMetricTargets.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3e7b3737e144ef713cf93a7d48a236243eb4ee1afb0210f6a1ae773caa782a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaGyroCadenceResearchPedometer.windowVerdict (cognitive 24): AtriaGyroCadenceResearchPedometer.windowVerdict has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, loops 5 (6 pts), ternaries 2 (nesting depth added 4). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"56203661c69082b0d25db6cf70b6731c36f523cbb1eb3c15ebe2e824fcd9cb57"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressElevatedEvidence.analyze (cognitive 24): AtriaStressElevatedEvidence.analyze has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 6). Of this number, 20 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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"346342ba119d6516ec09b377aa5c6c02bd7909731ff65c4468487f46519e5fec"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.dominantMotionWindow (cognitive 24): AtriaWhoop4GravityCadenceStepModel.dominantMotionWindow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1917}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdea7bb9c04772139b2986fe14d60b94e7c5dc85b0f9f52deefbd546a1ba8352"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutRouteRecorder.locationManager (cognitive 24): AtriaWorkoutRouteRecorder.locationManager has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 9, 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e28de432ad32963198a834822c8d5159e38fbeec40dca7758ed0707ac19d0d7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutCommandTransaction.applying (cognitive 24): AtriaWorkoutCommandTransaction.applying has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, 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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"798837efaef3e7ad8ce17c3ef17a17dd191fed8c760dc2a91d41f5b0f7b54c88"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine (cognitive 24): HistoricalArchive.motionTickDayEvidenceReadImpl::consumeDayEvidenceLine has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 21, if/else 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. This shape REPEATS in the file: one other method here (HistoricalArchive.motionTickDayEvidenceReadImpl) 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3813}}}],"partialFingerprints":{"codehealthFindingId/v1":"31846e481f2cede12c09ffea428f4be98600fb07415d1a8f005424af5dcd7e15"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.append (cognitive 24): HistoricalArchive.append has cognitive complexity 24 (threshold 15). Drivers by points: if/else 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8900}}}],"partialFingerprints":{"codehealthFindingId/v1":"146ce3711d32c8bfdd65fbe2263e38c7c27cdad9b10883a1cd0e1d1b1432da6d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.unescape (cognitive 24): AtriaScanRecordParser.unescape has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, match/switch 1 (2 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11169}}}],"partialFingerprints":{"codehealthFindingId/v1":"d66e16e0b338ae471bbcc2f4f32250fe48e15709a07efe5a7c5649bde8d87063"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.persistRecoveredCurrentCheckpoint (cognitive 24): SessionStore.persistRecoveredCurrentCheckpoint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, error handling 1, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16682}}}],"partialFingerprints":{"codehealthFindingId/v1":"c459a4b788cd5a9fb11e840c634879f6f5d3838f1e6142bf72a78ac7abfd26b3"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.completeRecoveredDataComponent (cognitive 24): SessionStore.completeRecoveredDataComponent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (4 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19685}}}],"partialFingerprints":{"codehealthFindingId/v1":"da562777be7a48d5e1750f6bda4f3a092cc229a14a715ec30f25b7b6cc864556"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.verifiedCanonicalStepEvidenceDaysCancellable (cognitive 24): SessionStore.verifiedCanonicalStepEvidenceDaysCancellable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 3 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":21678}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2616dc14641aa745dde0d8c91ea5a881beb165b5687cfd88364d382eace6c50"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeSavedDailyMetrics (cognitive 24): SessionStore.makeSavedDailyMetrics has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 5, boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":23194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e50ecbb0d6c63bf143337b44b1f44700564a213e185dcd9574c432aa938486b8"}},{"ruleId":"D2","level":"warning","message":{"text":"RespRateRsa.estimate (cognitive 23): RespRateRsa.estimate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, loops 3 (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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a79683341f1aede7cf313d3d6332e80985315c6f4af9b0303b8f1f1db9f44e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startScan (cognitive 23): AtriaBLEManager.startScan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, boolean chains 9, ternaries 4. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27296}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36d38b0fb327ac4775eac1e9dee7b80ee724133e27eb811b8a8cf83a17a9d6c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armFullDrainAuthorityAfterHistoryStart (cognitive 23): AtriaBLEManager.armFullDrainAuthorityAfterHistoryStart has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 19, if/else 3, error handling 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44911}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8fa247ccfba760a49ff238b20c0a23f77636583801d946c385f4ebbeaa3a67"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.processAdmittedHistoricalFrame (cognitive 23): AtriaBLEManager.processAdmittedHistoricalFrame has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, error handling 2 (5 pts) (nesting depth added 5). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45443}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fcaa8217327567769213cc41fa985a27418b7f40bfc01c426b8316989d72f11"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.shouldAdmitIdleWindowHistoryDrainRetry (cognitive 23): AtriaBLEManager.shouldAdmitIdleWindowHistoryDrainRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, ternaries 1 (3 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ee67bb570db98b8cbf334bfa74390214b55bfb3be693a5acfea8fa2ec2e441"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaGeneratedArtifactRetention.prune (cognitive 23): AtriaGeneratedArtifactRetention.prune has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 6, if/else 4 (6 pts), error handling 1 (2 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaGeneratedArtifactRetention.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"76fd71f246099a45949559991260d3a454ad157293741fdb8ac224d0e9e56c96"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalog.validate (cognitive 23): AtriaHistoricalArchiveCatalog.validate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 15, if/else 6, ternaries 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"795f959559f05ad90cabc76e04b91b43dd13371f1a16063ac2a107c23eda90e5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.verifyFiles (cognitive 23): AtriaHistoricalArchiveCatalogStore.verifyFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"d30defe53954cac330ccf39a7426954880e04fe113c7c317291d4611ac5a9697"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.decoratedIdentity (cognitive 23): AtriaHistoricalArchiveDurableStore.decoratedIdentity has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":2362}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f27db787d07d81babd8155f5be64425a193b8563b91cdaba23ba15b759339b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.validatedMaterializedProjections (cognitive 23): AtriaHistoricalConsumerReceiptLedger.validatedMaterializedProjections has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 1 (3 pts), loops 2 (3 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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a729c8f9d8df649baeee7dbb9e16c28cdc5912eb4b18311aef41053d5de97f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordHistoryEndFsynced (cognitive 23): AtriaHistoricalFullDrainCoverageStore.recordHistoryEndFsynced has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 11 (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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0b87a540b4cad7dd50901fc848759b5cf2ef733c74a1a377def3a440498dee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalHighVolumeDiagnosticsCoordinator.evaluate (cognitive 23): AtriaHistoricalHighVolumeDiagnosticsCoordinator.evaluate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2, boolean chains 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":"Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"895df7c51344c759c16cafe1d20dff22e3fdfa16fce84fc7538aeb0131e03248"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalRetiredReplayIndex.importAndVerify (cognitive 23): AtriaHistoricalRetiredReplayIndex.importAndVerify has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (9 pts), loops 1 (3 pts), 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":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"604efa7610372cdfc09acec32df66dfb829e29d0642f7c6850ff173373a4da12"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutZoneHapticTransition.accept (cognitive 23): AtriaWorkoutZoneHapticTransition.accept has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 3, boolean chains 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1566}}}],"partialFingerprints":{"codehealthFindingId/v1":"59360f2d58d31a57df6db5af88cbe209061d7e08731a23720fa60e07bdf49fac"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightBaseline.comparison (cognitive 23): AtriaNightBaseline.comparison has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 6 (9 pts), match/switch 2 (3 pts), 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":"Atria/Atria/AtriaNightBaseline.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f98b01ad6f686d7128c7b985a4f1037a0fc9af40cb3dafd0e57dd49d903e0ec"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveryScoreHero.body (cognitive 23): AtriaRecoveryScoreHero.body has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 13 (20 pts), if/else 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":7846}}}],"partialFingerprints":{"codehealthFindingId/v1":"778132db2504f57fd52010af8b2903e6923255b754fea021a201b3af9dfa3668"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaResearchBundleBuilder.makePayload (cognitive 23): AtriaResearchBundleBuilder.makePayload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 4 (6 pts), 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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"40685e54b84c8bde40d8a0c6c04d9a9ded6fd7def3ab2ebf95e33d0ae28fdd32"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSegmentButtonStyle.makeBody (cognitive 23): AtriaSegmentButtonStyle.makeBody has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 11 (20 pts), if/else 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":"Atria/Atria/AtriaSharedChrome.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d49217a4563860e8e3c32e01860515d3a933bee75c450d72dd7d090e669fa24"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTrendChartCard.body (cognitive 23): AtriaTrendChartCard.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 5 (8 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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"790576750821d529aa02a23b928788234349bda7b4c47b6c5ee87a2d3201c44e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTrendShift.shifts (cognitive 23): AtriaTrendShift.shifts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 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":"Atria/Atria/AtriaTrendShift.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d3bf65d2a58f0baa1fe1d3fbe07917d290ac413e52c506bb1552cc3e5aeaa5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHeartRateAxisChart.baseChart (cognitive 23): AtriaHeartRateAxisChart.baseChart has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4709}}}],"partialFingerprints":{"codehealthFindingId/v1":"093d30493e00afc45e99e363a347bf1fd26e9dc67cbfb7cb9056e0979d484f67"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.enumerateDurableFrames (cognitive 23): AtriaWhoop4HistoryAdmissionLedger.enumerateDurableFrames has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"c973d242c3b42d6d9cd9c8af5c73fefb52311529b0e75e925fcf70ba19f1ba6c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4LiveFlushPlanner.tick (cognitive 23): AtriaWhoop4LiveFlushPlanner.tick has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4LiveFlushPlanner.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26923bc0e45cc6d740f6ad764e97c31be1070260faa02afafc85856c5da33ac"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.appendMigrated (cognitive 23): AtriaWhoop4MotionTickCompactStore.appendMigrated has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 7, error handling 2 (6 pts), if/else 3 (6 pts), loops 2 (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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3bcbf1b47dcb14611ef234c9682f4ac7169adae3bd58c4f1ec56d928d1fbd61"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.estimateAlignedWindow (cognitive 23): AtriaWhoop4GravityCadenceStepModel.estimateAlignedWindow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9ce5c2723540dfc6ad7a0383429d1b25376b9096aa771d98f6d04d1d0b5d25"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.motionWindowReadableFileURLs (cognitive 23): HistoricalArchive.motionWindowReadableFileURLs has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 19, if/else 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8014}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd93b72b878657d1124fa0717359d4fd99f207caec102a82172fc261190c7464"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.distinctCoverageHonestWindows (cognitive 23): SavedSession.distinctCoverageHonestWindows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 4 (5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"9873f5899db751d2e720f420a6f144d98b0fc5abbe739afe258c27ac3e0e416f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.publishStressContextIfNeeded (cognitive 23): SessionStore.publishStressContextIfNeeded has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5 (nesting depth added 10). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8964}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6cb5c48241c4c98a5813b4617ae757e4d46d56f1b075c238c674d864b402c45"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.startCurrentCycleStrapStepReceiptRead (cognitive 23): SessionStore.startCurrentCycleStrapStepReceiptRead has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":12544}}}],"partialFingerprints":{"codehealthFindingId/v1":"443ab647fc0f2e46301289d6dd8685111f916e450ef2f06e9948648f673f9fca"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.refreshHistoricalArchiveStatus (cognitive 23): SessionStore.refreshHistoricalArchiveStatus has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14711}}}],"partialFingerprints":{"codehealthFindingId/v1":"df19b68b6d62a6d7c6c3f6bf265800bb05014a988b85ff711a09df36b25e5ce5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logCollectionHealthFromLaunchIfRequested (cognitive 23): SessionStore.logCollectionHealthFromLaunchIfRequested has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 5 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31079}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41e0a44c1f22499bb8506a8ca6eef26afab256411d2defad6b1b992da4415af"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.motionEvidenceMonotonicConfirmedSleeps (cognitive 23): SessionStore.motionEvidenceMonotonicConfirmedSleeps has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (10 pts), loops 2, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45209}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f41f96c01d2da97bb3b6f551cf10e712220a4559cb36daa6dfe183b3a435798"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.aggregateWorkoutCandidatesUnshared (cognitive 23): SessionStore.aggregateWorkoutCandidatesUnshared has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 4, ternaries 1 (2 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49141}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47a14826642d90e96c2558ea853f240adf9edb5c80327cd5fd568260a988c5e"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveSessionJournal.exactReplaySafeNovelSuffix (cognitive 22): ActiveSessionJournal.exactReplaySafeNovelSuffix has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f7f67b4f8e6f15dd3c4d23accc3ae165a46ce36537d97ad07895da5fdd515a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityMonitorMemo.timelineSpans (cognitive 22): AtriaActivityMonitorMemo.timelineSpans has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (6 pts), boolean chains 4, loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3469}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc45089ae870c61a8bfd0df069106de434b4dcddec5ef84c8e55acd7a07d1a0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityWorkoutDetailSheet.saveAllAsync (cognitive 22): AtriaActivityWorkoutDetailSheet.saveAllAsync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (8 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4336}}}],"partialFingerprints":{"codehealthFindingId/v1":"b006d5dbbada339e309e5f92cfd992197bcb068ab2c8f13c73d243add3f7f979"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.kickZombieProprietaryStreamIfNeeded (cognitive 22): AtriaBLEManager.kickZombieProprietaryStreamIfNeeded has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9973}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b9bea53357c60a597bd71f23d5da1616d31377f8493416b80353c3bcbf40708"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.liveR10EligibilityBlockers (cognitive 22): AtriaBLEManager.liveR10EligibilityBlockers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32739}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f60e0aed58587207b265c5343419a3301c694a085ca7482df1bb60d54a73709"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.allDayCompactIMURecoveryStep (cognitive 22): AtriaBLEManager.allDayCompactIMURecoveryStep has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (9 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33023}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9813888c783fd19b040cccccc9fedf6b59ff87f5361292dba3dae7bf9e37f2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.stopWorkoutHistoricalMotionBankIfPossible (cognitive 22): AtriaBLEManager.stopWorkoutHistoricalMotionBankIfPossible has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36884}}}],"partialFingerprints":{"codehealthFindingId/v1":"77349acd4466ed307cc249bb3b3efb2d5761017283de297e433e8da48e2f2769"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armHistoricalPageContinuationAfterACK (cognitive 22): AtriaBLEManager.armHistoricalPageContinuationAfterACK has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, ternaries 1 (2 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49660}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae4172810b1342b2cb7eab3ee72eb965891e427fea516fe95a6033a822aae1b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.batteryBoundaryEventIsIndependentlyCorroborated (cognitive 22): AtriaBLEManager.batteryBoundaryEventIsIndependentlyCorroborated has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 17, if/else 3 (4 pts), match/switch 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":"Atria/Atria/AtriaStrapPowerPolicy.swift"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85d698f0ddae3f3dcfea2a21466d8d85ef597802974cb2e6f28ef6542294940"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.mergeExactWindows (cognitive 22): AtriaHistoricalGapLedger.mergeExactWindows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), boolean chains 4, 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b477d6556b4c20628d2dda7995468901570af547ace2c24c8520f1c482d8675f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.overviewContent (cognitive 22): AtriaHomeView.overviewContent has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6066}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e051382c979b2cd0d224f11d0146367d920114135a89e14782964fff3dae0cf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaConnectionDiagnosis.derive (cognitive 22): AtriaConnectionDiagnosis.derive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14794}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea99945b4263eeffcb0ac91f45393eb54b01bd9fe609b40a2e8fa7b77fdde644"}},{"ruleId":"D2","level":"warning","message":{"text":"MinuteFact.isStructurallyValid (cognitive 22): MinuteFact.isStructurallyValid has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 22. 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d79aae97693f445dc5c8025aac7adec862db52512d1f113bbc3d2701967f587"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredDataRecomputeCoordinator.request (cognitive 22): AtriaRecoveredDataRecomputeCoordinator.request has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, match/switch 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":"Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e850b32f3bff459d118b0f5c5553a54daa0fd8074f62d0fefc8dc0afcea7d6a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredMotionProjection.epochFeaturesCancellable (cognitive 22): AtriaRecoveredMotionProjection.epochFeaturesCancellable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"9004e1406e2c6608e0d839b91538e8dc41fc4d994231ea8a55bcfeac84a0b32e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRestoreTransactionCoordinator.apply (cognitive 22): AtriaRestoreTransactionCoordinator.apply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (4 pts), ternaries 2 (4 pts) (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":"Atria/Atria/AtriaRestoreTransaction.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"08d2928cbc8638231aa879d2dce4a6a7cfb81ef658e3baff31fb8d918695058d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrengthLog.historyProjection (cognitive 22): AtriaStrengthLog.historyProjection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (4 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":"Atria/Atria/AtriaStrengthLog.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"5659f8797881018736819e133ea17401b5361c84c24994abf14b8366d4874040"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.finalizeGapReceipts (cognitive 22): AtriaHistoricalStressReplay.finalizeGapReceipts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, match/switch 1 (3 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2046}}}],"partialFingerprints":{"codehealthFindingId/v1":"75689ea74c5d039a4f7ccc9a9248fc5ce0f71b9546f0b5f840ff44c3fc494eeb"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaGlanceSparkline.body (cognitive 22): AtriaGlanceSparkline.body has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (8 pts), loops 1 (2 pts), 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":4158}}}],"partialFingerprints":{"codehealthFindingId/v1":"618eb345d8f654b96c6742a88d8acc022a3085f6cade9c2e360f82af21e00e5c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.latestNightReceiptIsCurrentLocked (cognitive 22): AtriaWhoop4MotionTickCompactStore.latestNightReceiptIsCurrentLocked has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 19, if/else 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e989663538ab1601d6bfd38cef48b77bbfcc3fefd2d4330450aac4f9f25b691"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.backfillHeartRateSidecars (cognitive 22): HistoricalArchive.backfillHeartRateSidecars has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8296}}}],"partialFingerprints":{"codehealthFindingId/v1":"e75efdc895ffbccbd92bd0945a36f8f7b1789900286a0d0dd039ed77ae50a0bc"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.makeSleepReviewDecision (cognitive 22): LocalNotificationScheduler.makeSleepReviewDecision has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, ternaries 1 (2 pts) (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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d520a3d6c269aba7a59d5c7a74f746faad71c6bdbccedbc02925ee8777d5fea"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.latestReferenceValidatedHRVSourceCancellable (cognitive 22): SessionStore.latestReferenceValidatedHRVSourceCancellable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, loops 2 (3 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26465}}}],"partialFingerprints":{"codehealthFindingId/v1":"7831af5b04bee2b5fd416d0d7c445d02ba4780d91523770e50927477578c0097"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeNapReviewNightsForCacheCore (cognitive 22): SessionStore.makeNapReviewNightsForCacheCore has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37537}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9e78cb2f18cfdf646a9e7c6d2dcd7ec15adb518fa3e1dec320646d579befd9"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.aggregateSleepDiagnostics (cognitive 22): SessionStore.aggregateSleepDiagnostics has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (10 pts), loops 1 (nesting depth added 5). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52339}}}],"partialFingerprints":{"codehealthFindingId/v1":"704e36e34b7f93b67af4e383669b76dcaa9c56e5f04cddde545a8b4397df9108"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scoreExternalRR (cognitive 22): SessionStore.scoreExternalRR has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, 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, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54781}}}],"partialFingerprints":{"codehealthFindingId/v1":"69edfe248f05b85aa00cbf83d7d9b94f3b0c801db84bf91b14f59cb24db5ac19"}},{"ruleId":"D2","level":"warning","message":{"text":"prepare_reference_rr.read_samples (cognitive 22): prepare_reference_rr.read_samples has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (6 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":"prepare_reference_rr.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0567275cac2662af1d8d04e33bb1d5aeb01beb435674c34acc7a98e24d3f576"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivitySelectedDaySleeps.overlapping (cognitive 21): AtriaActivitySelectedDaySleeps.overlapping has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"2019a5d8c509d3e5867f02dfecbd451163d1b8fea1b64e95755be2090a632df6"}},{"ruleId":"D2","level":"warning","message":{"text":"BiologicalAge.interpolatedAgeEquivalent (cognitive 21): BiologicalAge.interpolatedAgeEquivalent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (4 pts), boolean chains 3, 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":2163}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d489f0d9d6ab2e0c858a9ea3040075a097e5080b37474db6a1e30252753e83"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendProtectedR10ActivationIfReady (cognitive 21): AtriaBLEManager.sendProtectedR10ActivationIfReady has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15889}}}],"partialFingerprints":{"codehealthFindingId/v1":"1829de56f44d6a1752c4f29b168933bcd1f247915c216d98bcc81849430bc166"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleWorkoutAutoSaveIfRequested (cognitive 21): AtriaBLEManager.scheduleWorkoutAutoSaveIfRequested has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25051}}}],"partialFingerprints":{"codehealthFindingId/v1":"091059bd29d7c28f2387c2d426cd5d2c6fff0d947fc0e354093acab20b261014"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startReconnectWatchdog (cognitive 21): AtriaBLEManager.startReconnectWatchdog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28655}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b88844f7572885c673196da3af3ae448a2040c826c5823808f47d7d2fe61e5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.logDataRangeCommandResponse (cognitive 21): AtriaBLEManager.logDataRangeCommandResponse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (5 pts), boolean chains 4, loops 2 (4 pts) (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31946}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be6b5076757fc20b4348e5ed56a6ac5d77b4aa258dd4c8623f3a9a212596e43"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.shouldAllowProtectedTransportCommand (cognitive 21): AtriaBLEManager.shouldAllowProtectedTransportCommand has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 21. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33336}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f42e8a97d5b64ecdd53cc8a0d4577bca2eae8c7ec3fd3974be50f29d0bc3d13"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendHistoryCommandAwaitingWriteConfirmation (cognitive 21): AtriaBLEManager.sendHistoryCommandAwaitingWriteConfirmation has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), match/switch 1 (3 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33671}}}],"partialFingerprints":{"codehealthFindingId/v1":"740c85c0e7ffec3c48074521b35c7f8af516215c91fbea01cde105ef2c8ea8da"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleGate4DailyBankRearmAfterHistoryStart (cognitive 21): AtriaBLEManager.scheduleGate4DailyBankRearmAfterHistoryStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 7, match/switch 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36548}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e44188b612614e1b05b3fb249330b4c16dcd463a207af82023fe8e48df8cb42"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startSacrificialFastDrainIfNeeded (cognitive 21): AtriaBLEManager.startSacrificialFastDrainIfNeeded has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (7 pts), error handling 1, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40992}}}],"partialFingerprints":{"codehealthFindingId/v1":"2087550c5d1f3ded35eebe7a04fbe034f4a4f22aac75306ea965386fd036ec81"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendReadOnlyHistoryCommandAwaitingConfirmation (cognitive 21): AtriaBLEManager.sendReadOnlyHistoryCommandAwaitingConfirmation has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42190}}}],"partialFingerprints":{"codehealthFindingId/v1":"24304eccd8ba648e89e160bb49e2cf333b00130aa3d6b28554c1be0ac33457a3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleHistoricalData (cognitive 21): AtriaBLEManager.handleHistoricalData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45084}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa66bc51fd4f381deccc8e30178d06c9216a6f241f036d431799ce3a1d315a54"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateChunk.validateForCommit (cognitive 21): AtriaHistoricalAggregateChunk.validateForCommit has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, 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":"Atria/Atria/AtriaHistoricalAggregateChunk.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f7581c6277498c1eabff5af33d1df0cc85fdde88122621777ea783fa23a335f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerApplicationStore.loadCurrentLocked (cognitive 21): AtriaHistoricalCanonicalConsumerApplicationStore.loadCurrentLocked has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 6, error handling 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"4088ee0099ea63671800f83b37c48394d5cfbb28b07707b406778e9083b98016"}},{"ruleId":"D2","level":"warning","message":{"text":"TransportAuthority.isValid (cognitive 21): TransportAuthority.isValid has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 21. 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef29135888b0ba3b0b32d233e0e0fc762af29f0b81612a928af9cad0e77bd209"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.updateConnectionDiagnosisVisibility (cognitive 21): AtriaHomeView.updateConnectionDiagnosisVisibility has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6 (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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6310}}}],"partialFingerprints":{"codehealthFindingId/v1":"564d49073e0d662b7f6e333d44886f84ff51d1070eed808b942bd9a4a92d071c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPreparedMetricChart.chartContent (cognitive 21): AtriaPreparedMetricChart.chartContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3 (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, 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":7364}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39a81e281d060ad3362cf334b0250fc0f888d42d21b195f7021b820ff2d489d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredMotionReplayIdentity.payload (cognitive 21): AtriaRecoveredMotionReplayIdentity.payload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), ternaries 1 (3 pts), match/switch 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":"Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"991fa1418f59e857a29bc74623d047a73a8b1b3c3d110f05e6237f8a8b2c9eb2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveryDrivers.make (cognitive 21): AtriaRecoveryDrivers.make has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 pts), boolean chains 2, loops 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":"Atria/Atria/AtriaRecoveryDrivers.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0efc257df560acbb525b5b18317aa80bc0369c18d1eceff0870d313989c6e72"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressMonitorStore.checkpointHistory (cognitive 21): AtriaStressMonitorStore.checkpointHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3738}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f56ec7c1bce3b970bcf7ca3f0f820da50da4621b7d3ee16fddf31747fa7ccd4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4CompactIMUAssembler.push (cognitive 21): AtriaWhoop4CompactIMUAssembler.push has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4CompactIMU.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"805c2d5031fac65561163b556e29b463f3a55719700bcf5b25c1e3986c4b5a87"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutPromptEvaluator.lastCompletedSustainedBout (cognitive 21): AtriaWorkoutPromptEvaluator.lastCompletedSustainedBout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 1 (nesting depth added 5). Of this number, 17 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":"Atria/Atria/AtriaWorkoutPromptEvaluator.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"6116e132febb657175a7bbc364bc24930a82aa0909a2b317c178d220adc45621"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.verifiedMetricTimestamps (cognitive 21): HistoricalArchive.verifiedMetricTimestamps has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (8 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1679}}}],"partialFingerprints":{"codehealthFindingId/v1":"884e93af2dd61fba3912662d565dbd297f115aa341856db27eb1645c99da6635"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.motionBankTransportCoverage (cognitive 21): HistoricalArchive.motionBankTransportCoverage has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), loops 1, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4166}}}],"partialFingerprints":{"codehealthFindingId/v1":"c146de2d8c9e351e32563266fa2866e15a2dcfcbbaa37a9f4341bf32bb7ef50e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.parseStringSpan (cognitive 21): AtriaScanRecordParser.parseStringSpan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (6 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11127}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb19b8ef9bc9d5953131b5b2e4bb2241fed5fba502993631182ed602aa80364"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.cooperativeStableSort (cognitive 21): SavedSession.cooperativeStableSort has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 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. This shape REPEATS in the file: one other method here (SessionStore.cooperativeStableSort) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea0eda016482d2a04b05c4ee9e50222a5d10ad1da714248177d080e500f2350"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.requestRecoveredDataRecomputation (cognitive 21): SessionStore.requestRecoveredDataRecomputation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16845}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0764ec0ece6e105af0b9bf054563b84645952922394df3cc32e0dffe63f354"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.currentCollectionStatus (cognitive 21): SessionStore.currentCollectionStatus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (8 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29554}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f82b2fdd0d370dc43b05919a4cda2963aa17dfb0dabcc5496ba0ab32942c816"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.activityCalibrationEvidence (cognitive 21): SessionStore.activityCalibrationEvidence has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (4 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33282}}}],"partialFingerprints":{"codehealthFindingId/v1":"2744f780edfbb01c1a206d7a2177ad1df982fbc4870bd4b70820df14a841b2d4"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleCurrentCycleSleepReviewAdmission (cognitive 21): SessionStore.scheduleCurrentCycleSleepReviewAdmission has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 3 (5 pts), match/switch 1 (2 pts), boolean chains 1, error handling 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40167}}}],"partialFingerprints":{"codehealthFindingId/v1":"859b1b1f8fd92d65d7b18573686aec657162166139707151b81237c21003c38a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedMainSleepHRVEvidenceCancellable (cognitive 21): SessionStore.confirmedMainSleepHRVEvidenceCancellable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":44567}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4298521e17c2db47148846baa45baa59fe2ce194f90d9056ccaa7c2a1b992c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeBehaviorCorrelationSummaries (cognitive 21): SessionStore.makeBehaviorCorrelationSummaries has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":47272}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e1a7e855946c566d6cc985be3afd41fe87f2adbccd9d409daa8581ed0c6abe"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.validateHRReferenceFromDocuments (cognitive 21): SessionStore.validateHRReferenceFromDocuments has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 5 (7 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54321}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43da4f35c803c4d7f4b6a30789e1522602c6078d20aa29ff3a60d695a77b856"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.cooperativeStableSort (cognitive 21): SessionStore.cooperativeStableSort has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 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. This shape REPEATS in the file: one other method here (SavedSession.cooperativeStableSort) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56701}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6dfa7b6fcb2dc9aabb038129d51483cdfdc6e48c9e4633aed55c524a81c0e7d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidget.swift.liveActivityStatusPresentation (cognitive 21): AtriaWidget.swift.liveActivityStatusPresentation has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 4 (6 pts), 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2024}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdba80cdac97e3f1e0c88b498bd2500c330dff88e882f6ea9e07e10f5fd76bc"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaAddWorkoutSheet.body (cognitive 20): AtriaAddWorkoutSheet.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5063}}}],"partialFingerprints":{"codehealthFindingId/v1":"6895bb52146db926b6872ce7c884660ed6b1797b8aca6e773ee88b24dfb01077"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.noteLeftoverFlushInbound (cognitive 20): AtriaBLEManager.noteLeftoverFlushInbound has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 3). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8902}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddb86b00d8bc1610fa66505cf59830dbd6e52b6edb6e145b0e3a6c8036de8b2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reassertR10NotificationIfConnected (cognitive 20): AtriaBLEManager.reassertR10NotificationIfConnected has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9848}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a191b4950de325dae943f99293f956fe94ffda1dd73a89d4d17c93d4dcc8b30"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.recoverRRPresenceWatchdog (cognitive 20): AtriaBLEManager.recoverRRPresenceWatchdog has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, 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, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26243}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1197a66c81af7dc97f5fbf299a6d6c938654bd821231d9eb831f317e49f9905"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendOneShotHistoryTrimCommand (cognitive 20): AtriaBLEManager.sendOneShotHistoryTrimCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41754}}}],"partialFingerprints":{"codehealthFindingId/v1":"028cf1e55a5a0fd2fdcad7e45c25b702ca969b465e79eda2db7170a61680f603"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.addRRBatch (cognitive 20): AtriaBLEManager.addRRBatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49908}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e887df440d7e79a98c7d5f4c5fb15b8347ea2ee5565e415ca3ec6ccbd02dd3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.shouldRequestProprietaryBatteryRefresh (cognitive 20): AtriaBLEManager.shouldRequestProprietaryBatteryRefresh has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (5 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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa5ffa167ca006f10b980ec18e25b7737d50ffb402dcbed206cdb7d8e528bfd5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBackgroundProjectionThrottle.checkpointShouldAbort (cognitive 20): AtriaBackgroundProjectionThrottle.checkpointShouldAbort has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, ternaries 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":"Atria/Atria/AtriaBackgroundProjectionThrottle.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e50785c13f1706c38bc6f9e6af6db1c9e6477bf0e16552d5d5fb5fe586bab78"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBackupCompression.decodeRawDeflate (cognitive 20): AtriaBackupCompression.decodeRawDeflate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, 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":"Atria/Atria/AtriaBackupCompression.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"126fdcbb2c464655c02d68c77414f52047cb9fa9cc82b592016a26128fb9ad33"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.validatedReceipt (cognitive 20): AtriaHistoricalConsumerReceiptLedger.validatedReceipt has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 17, if/else 2 (3 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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f516b21a7360cd311b81eb7e2262730669cd7cc4ff530713b6a7a82718e815"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.stageMetricUsableRows (cognitive 20): AtriaHistoricalGapLedger.stageMetricUsableRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 1, 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"571120a9b487494654e1a069d8b12282e7073df45a3b2d1041aa25b7d1a645fc"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.commitResolvedWindow (cognitive 20): AtriaHistoricalGapLedger.commitResolvedWindow has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (6 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b00a2388ad0ead3ab0cb75138694067bdbc8f72c8487d8625031830c801e44e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.publishFrozenSceneIdleLiveActivityIfNeeded (cognitive 20): AtriaHomeModel.publishFrozenSceneIdleLiveActivityIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8, boolean chains 7, if/else 5. 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12648}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b709251af12f9d3000bec410a569c88763841f38c90aaa05c2ff775e368ec2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.nextLiveSessionDerived (cognitive 20): AtriaHomeModel.nextLiveSessionDerived has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 1, ternaries 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13816}}}],"partialFingerprints":{"codehealthFindingId/v1":"911c2bbbc0cd0da6dfb2e9a1f5c6c67ee2ac01d267dff8b8b2fc159267583805"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveWorkoutTRIMPAccumulator.exclusionsAddCoverage (cognitive 20): AtriaLiveWorkoutTRIMPAccumulator.exclusionsAddCoverage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"4275f523fe731c2dec6805f0668691ab258d4437a5d8f272b8119f95927b2e0f"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPendingWorkoutIntentStore.persistTerminalLocked (cognitive 20): AtriaPendingWorkoutIntentStore.persistTerminalLocked has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts), ternaries 2, 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43bfb87ef346fcf6cd62c2266041ec7a2fa552d59ec830a4c96399e4f7bbdea"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPhysiologicalStressModel.qualifiedRMSSD (cognitive 20): AtriaPhysiologicalStressModel.qualifiedRMSSD has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (9 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"176a1cd689dd6b80bc79bc1885dfeb19790a7d33686ed9011d662623c4278575"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSensorReferenceEntry.init (cognitive 20): AtriaSensorReferenceEntry.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (5 pts), boolean chains 3, 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":"Atria/Atria/AtriaSensorReferenceCapture.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcfe8ec471b23c49a302bddf4bba835d4adefb948aa84ead4bb0dbf5943d447"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepCooperativeAlgorithms.stableSort (cognitive 20): AtriaSleepCooperativeAlgorithms.stableSort has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7caea7753e2cafd33c0464a2f568f43facea9c72804415656c01ebb5cc42eaa"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodayScreen.glanceItem (cognitive 20): AtriaTodayScreen.glanceItem has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2960}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5273381326018b3a31d0eb15bc9a44b18f94396272a07e2cf3a12789dc00f36"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTrendChartCard.preparePeriodReadout (cognitive 20): AtriaTrendChartCard.preparePeriodReadout has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"4109562bd20804d4f4609f44fe3f78eecbf318a06b94d2780bb73e75187557c2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4FusedStepEstimator.estimate (cognitive 20): AtriaWhoop4FusedStepEstimator.estimate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (9 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":"Atria/Atria/AtriaWhoop4FusedStepEstimator.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"713cc1e4bc38fe03beef28e8352da7b1b94ef581a149d6ea9dc7a960c62e9aa6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.subtracting (cognitive 20): AtriaWhoop4MotionTickCompactStore.subtracting has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2166}}}],"partialFingerprints":{"codehealthFindingId/v1":"78c875b81727c74621a2c3347e2533007a7e5f3463318a47759a5e19f353e84c"}},{"ruleId":"D2","level":"warning","message":{"text":"DailyRecoveryResolver.summary (cognitive 20): DailyRecoveryResolver.summary has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (8 pts) (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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"fded6508527fefb9cf5969b8c8127ea1560501ea2d6fdc040f386106212ac654"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.fetchNutritionSummary (cognitive 20): HealthKitExporter.fetchNutritionSummary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12608e0bb1838e004301c2acbaa54d24591400c61c8c8d7108818d0f3047caf"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.healthSamples (cognitive 20): HealthKitExporter.healthSamples has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"df15df615e33f6d33ada94cab4344e156a173fe2a84fb2740a59fd85129b544d"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.scheduleActionableConnectionDiagnosis (cognitive 20): LocalNotificationScheduler.scheduleActionableConnectionDiagnosis has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 1 (3 pts), 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"65eb547cfdd755a97d5fa55da9ec03b77e73afc5ee3d5dbe16264821fa9ae781"}},{"ruleId":"D2","level":"warning","message":{"text":"StrainPresentation.resolve (cognitive 20): StrainPresentation.resolve has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 4. 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":"Atria/Atria/Metrics.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3a8b2b5b943174855587d7637403697316cc95dba7d70afb9a05a02a3915fb"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.hrRRDisagreesWithReportedHR (cognitive 20): SavedSession.hrRRDisagreesWithReportedHR has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), boolean chains 2, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":7537}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28ab7632d13a1a6a5582704584e99854b166bb5e36a82ed4b45c132b6e789fa"}},{"ruleId":"D2","level":"warning","message":{"text":"SavedSession.workoutPrimaryBlocker (cognitive 20): SavedSession.workoutPrimaryBlocker has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8238}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7fe1d9fc71d2c92c32af6e2f8770dbab1d7ec46b60d97243609a087ad9aa978"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.recoveredWorkoutEvidenceIsStronger (cognitive 20): SessionStore.recoveredWorkoutEvidenceIsStronger has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 19, if/else 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35939}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdd9ed872e519812470859b1714d2009169f085236d42406ef1c3888f5ae74b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.autoSleepClassification (cognitive 20): SessionStore.autoSleepClassification has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), ternaries 1 (2 pts) (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42286}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1232cc23979d9600828fddc03792b519f122dbab5eba5994786f74c94b305b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.normalizingDayPrimaryChoices (cognitive 20): SessionStore.normalizingDayPrimaryChoices has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":45119}}}],"partialFingerprints":{"codehealthFindingId/v1":"024df9930e24667a09fb7591a0f5bf30451366e3d7103778acba1044a85dee26"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.motionQuiescenceRefinedBounds (cognitive 20): SessionStore.motionQuiescenceRefinedBounds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 25 (49 pts), boolean chains 11, loops 8, match/switch 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SessionStore.motionQuiescenceRefinedBounds::boundaryEvents) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49726}}}],"partialFingerprints":{"codehealthFindingId/v1":"2365a8803f428e8789eb5927a4f2c1561d4c2a0caa72113288ed8e8bc11f6668"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logDeepDailyRollupDiagnostics (cognitive 20): SessionStore.logDeepDailyRollupDiagnostics has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (16 pts), loops 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":53288}}}],"partialFingerprints":{"codehealthFindingId/v1":"063c7144ba95e61c75e28d0d7a421131bbbac24ab03f417e50133a819499a192"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.requalifyPersistedConfirmedSleepHRVFromSessionsIfNeeded (cognitive 20): SessionStore.requalifyPersistedConfirmedSleepHRVFromSessionsIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, ternaries 3, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58076}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd4b53e7d6a8e4ddf9dd31ed8384c07750e726e33a2ccc52607fc39b1d1ae50"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidgetProvider.getTimeline (cognitive 20): AtriaWidgetProvider.getTimeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, loops 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f10af7a62cb7526f3f08f249f95244de70cb533f8d4cad445be107d2d4298d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveSessionJournal.saveLocked (cognitive 19): ActiveSessionJournal.saveLocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b25efd07813f83ac90b0c91dbd6a231b72b81026c88aaacc7f14f866b29a48"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveSessionJournal.replaying (cognitive 19): ActiveSessionJournal.replaying has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 3 (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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7ae394376c6c74832416379075ec68b2f3c0f06f8af64e8a3e4bf4e59cb5ba"}},{"ruleId":"D2","level":"warning","message":{"text":"TargetZones.restingHeartRate (cognitive 19): TargetZones.restingHeartRate has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (7 pts), if/else 3, 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, 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"e42a6db40109ddc591900ff95a3db84344f0b72a27b849dce5a60cf153d0a403"}},{"ruleId":"D2","level":"warning","message":{"text":"Recovery.sleepMissingEstimate (cognitive 19): Recovery.sleepMissingEstimate has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9, boolean chains 6, if/else 4. 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1756}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d26d3db4f76df08bdf569eb475d4cd31f14c760290c1c9d7f0663aac0707bca"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaAppDependencies.init (cognitive 19): AtriaAppDependencies.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5 (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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e498f61dc45485719947d8f914a49876270d433e3bb26bc5781239d27562cd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reassertHeartRateNotificationsIfConnected (cognitive 19): AtriaBLEManager.reassertHeartRateNotificationsIfConnected has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9771}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6942afd9846b828696accba3281bee715bbf354e3abc24cbf65e71c05277c31"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.resumePendingForcedHistoricalSyncAfterLivePersistenceIfNeeded (cognitive 19): AtriaBLEManager.resumePendingForcedHistoricalSyncAfterLivePersistenceIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11463}}}],"partialFingerprints":{"codehealthFindingId/v1":"d10e7ba88c5fe0cd08090236a399358e8ec47595d27464179a6464dbe97ebe5e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendMotionHandshakeR10IMUSequenceIfReady (cognitive 19): AtriaBLEManager.sendMotionHandshakeR10IMUSequenceIfReady has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15393}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d67f6b0bf323ba8a3b01680d3c231472a1dfeba90e7f4ce38337afae3561a2d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleHRContinuityWatchdogIfNeeded (cognitive 19): AtriaBLEManager.scheduleHRContinuityWatchdogIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25722}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3868774bbaf70885be9dc9cd0e3a9d2b551ce761449416a7bff20cea7426fb4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reconcileCentralUnavailableRecovery (cognitive 19): AtriaBLEManager.reconcileCentralUnavailableRecovery has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29982}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aba6cb294271a51d61bfacaecd105afce08753b62a0a7bbf49e7e668535362c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateR10Liveness (cognitive 19): AtriaBLEManager.evaluateR10Liveness has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34931}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d2c03774ccae35f17a6691b6020e747b8d18f48f67188fa31086eee08f447e1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.startReadOnlyClockProbeIfNeeded (cognitive 19): AtriaBLEManager.startReadOnlyClockProbeIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42460}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0dd773f82c90cf1425c7b4f508a82d230d78b1de01e49383979c6a7c69b65d5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.finishStrapStepLedgerSave (cognitive 19): AtriaBLEManager.finishStrapStepLedgerSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51950}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eaff3b0da75b429e3ab7a753a71066943771906eb00fdc460d15f1d33870611"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHealthScreen.reduceStressStrip (cognitive 19): AtriaHealthScreen.reduceStressStrip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2083}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdade2d6581b48a1003d4983a9e57ae15b4d53276d168c148fed161923f339a3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullScanCompletionStore.validate (cognitive 19): AtriaHistoricalFullScanCompletionStore.validate has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 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":"Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"12dc1e04ced32357dc224c8791c5be7e4ffb4482eb34363bd633c3f65f9f10cf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalJSONLRecentScanner.unsignedInteger (cognitive 19): AtriaHistoricalJSONLRecentScanner.unsignedInteger has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), loops 3, ternaries 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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2728a857c194c1cc8a2f025624400228769fb2cdeb464435e92b42ff5bbcaec"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.presentConnectionGuideIfNeeded (cognitive 19): AtriaHomeView.presentConnectionGuideIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2 (4 pts), match/switch 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6635}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4051ee0ca70ec233c84fd78a8afa2d5c1698798131168a5458e6c19cce4ea7c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaMissedDataBannerPresentation.copy (cognitive 19): AtriaMissedDataBannerPresentation.copy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":7754}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3c99a44f929cb2adc7ebf127cdb341383ede45d06ac2ac556c5a56bf6a9a70"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.publishFrozenSceneWidgetPatchIfNeeded (cognitive 19): AtriaHomeModel.publishFrozenSceneWidgetPatchIfNeeded has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9, boolean chains 6, if/else 4. 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12584}}}],"partialFingerprints":{"codehealthFindingId/v1":"270a57165e4898b344b0f10bdf0a40cc6c07675a239c4660e7139dc92438f860"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveActivityCoordinator.holdingLastKnownWorkoutMetrics (cognitive 19): AtriaLiveActivityCoordinator.holdingLastKnownWorkoutMetrics has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 1 (3 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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a7eb68d9cde62574d6fd26f30faa018bf170e758685b159029b4f3324961843"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWeeklyReportSheet.heroText (cognitive 19): AtriaWeeklyReportSheet.heroText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1910}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e5987a9898acc464d6feef91488559225ab5611de5d4ee664afa80e54d46f7c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrapGaitQualityChallenger.ingest (cognitive 19): AtriaStrapGaitQualityChallenger.ingest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"739837dbd931cee2190a23b1586f710905946ffb94c118f5a922325bd7806321"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutShareSnapshot.routePreviewPoints (cognitive 19): AtriaWorkoutShareSnapshot.routePreviewPoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"989dac94ee82304443f6f13526943c9fc4594ea5f629f0b3f250b339216ac5c7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStepCalibrationSequenceCard.stageStateHeadline (cognitive 19): AtriaStepCalibrationSequenceCard.stageStateHeadline has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (7 pts), 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":"Atria/Atria/AtriaStepCalibrationPlan.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ac51c33f8ed48253129992fa204eccf4151f70847f42fca1e2683b5b84b166"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalStressReplay.snapshot (cognitive 19): AtriaHistoricalStressReplay.snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddfd9bcf981908e0a83407197ab10dafad66806baccfdb88ffcaf72006d7fa17"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.append (cognitive 19): AtriaWhoop4MotionTickCompactStore.append has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 3, error handling 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f9c3ac3c88d3ed2bdcc058694c3dd38424eaf47a0a72638615899dda91e1f3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickDailyStore.saveValidated (cognitive 19): AtriaWhoop4MotionTickDailyStore.saveValidated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 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":"Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"099d1b45409ff7dcd50db04d0ccda876316d6e3037261d5b872b71775c7e63d2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4GravityCadenceStepModel.strapMotionContinues (cognitive 19): AtriaWhoop4GravityCadenceStepModel.strapMotionContinues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1604}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ba903519158dd85fc9016ff606146c0b1f4f93deb326768d02244fa24c5e30"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.body (cognitive 19): ContentView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/ContentView.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb475c7e9dc50a9b75bbedf7aede524ad2526c104ea27f3978f18c3bf36a5e4"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.prunedRecoveredCache (cognitive 19): HistoricalArchive.prunedRecoveredCache has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 4). Of this number, 12 points are the body\u0027s own statements and 7 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6927}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a0defd5fa62e2f9dd43aea993d646769b51822be448fe0fb667fce3b598f01"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.sealedCatalogBoundIsDurablyTrusted (cognitive 19): HistoricalArchive.sealedCatalogBoundIsDurablyTrusted has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8572}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0664061a5fb961d952c21884b49c56afddba4554bcc6ae86bc90292a1b4940"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaScanRecordParser.parseIntegerExactly (cognitive 19): AtriaScanRecordParser.parseIntegerExactly has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11262}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1e9d9790fa7cf04481ba7db89bcccc1fb0cc80c8b2510c610c124a14a39f37"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.add (cognitive 19): LocalNotificationScheduler.add has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":2188}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c26259faf26fd96d7d534dbb4e8cc29fae3e17090ac1516914f6607642cafd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaConfirmedRecordWriter.write (cognitive 19): AtriaConfirmedRecordWriter.write has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7018}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e50ced75a8f82a6e8dd41abd993999496902de47dae63c8223a1f8144b7d15c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.mergedAutomaticallyRecoveredHeartRatePointsCancellable (cognitive 19): SessionStore.mergedAutomaticallyRecoveredHeartRatePointsCancellable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (5 pts), loops 3 (5 pts), ternaries 3 (5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16595}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dc1fd55cddd3c263b9b146e845f55e6e69df8f57eb2f0945b9abcf8c817aa23"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.logGateETrainingDiagnostics (cognitive 19): SessionStore.logGateETrainingDiagnostics has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31837}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d702a3510b1d4a952cada95622f73598bc7ac73db0b51a7f4e5baa7112b398"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmMetadataOnlyWorkout (cognitive 19): SessionStore.confirmMetadataOnlyWorkout has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, if/else 5 (8 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":34589}}}],"partialFingerprints":{"codehealthFindingId/v1":"6efa9040cae817503c455012e1e4494d5cc705e39bd1ca30d6be1db49ec74f6d"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmSleepWindow (cognitive 19): SessionStore.confirmSleepWindow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 4. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42634}}}],"partialFingerprints":{"codehealthFindingId/v1":"86745d26a57e60c2baf0ec7ced07b517386d9203583eaf2682ebd5bf98be1a2f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.cooperativeSustainedAwakeSeconds (cognitive 19): SessionStore.cooperativeSustainedAwakeSeconds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":51549}}}],"partialFingerprints":{"codehealthFindingId/v1":"ace25d89adf281aa2df1c6e2a2e7a33de34ec3147df40b1bd9b67f18b27447f3"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.verifyLatestSessionBackup (cognitive 19): SessionStore.verifyLatestSessionBackup has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 3, error handling 1, if/else 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55106}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2edf8e3df6e36b56ce9c7d44583c85e3e686e5e55b440fe26c26cae8626741"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.splitShortPreludeFromDenseSleepCluster (cognitive 19): SessionStore.splitShortPreludeFromDenseSleepCluster has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, loops 3 (4 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56478}}}],"partialFingerprints":{"codehealthFindingId/v1":"4062440cd8d5b4d191e16006a08403761aa2a59083a640fa422bfdc0d2fdb0e8"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.seedBaselineFromConfirmedSleepsCancellable (cognitive 19): SessionStore.seedBaselineFromConfirmedSleepsCancellable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 2 (3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58619}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91c17c3aea5d83f02394174acde9cbdf8f005c518719aa21d4de1e9378b2766"}},{"ruleId":"D2","level":"warning","message":{"text":"validate_hrv.read_reference_rr (cognitive 19): validate_hrv.read_reference_rr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (6 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":"validate_hrv.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93ef1be5c78f95dabfc10302d8e44ca54adaa48acc5a0e87d3e3fe1a8990f30"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveSessionJournal.applying (cognitive 18): ActiveSessionJournal.applying has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e632d6803f7dc335b1e7d2cf34632c17f06f5b4efac3e71f57ad73b232528ba"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityTimelineSignalProjection.selectRealSamples (cognitive 18): AtriaActivityTimelineSignalProjection.selectRealSamples has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1426}}}],"partialFingerprints":{"codehealthFindingId/v1":"efce0a17d6677e73bb4f6d1e4669dd71163189a5acb8895536d25bed677fe440"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityTimelineMarkerProjection.nonOverlappingSlices (cognitive 18): AtriaActivityTimelineMarkerProjection.nonOverlappingSlices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (5 pts), ternaries 1 (3 pts), 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1481}}}],"partialFingerprints":{"codehealthFindingId/v1":"417036c7440382e950d0062815a757be1acf247409cb4cd9f8efc63ebbc4ae36"}},{"ruleId":"D2","level":"warning","message":{"text":"TargetZones.hrv (cognitive 18): TargetZones.hrv has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (6 pts), if/else 3, 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, 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea8d104f8d94afeb5d63d343e47dd81bef5eb416f146996dc978b76e885d4c6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEHistoryRequestAuthorityStore.loadStateLocked (cognitive 18): AtriaBLEHistoryRequestAuthorityStore.loadStateLocked has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"62ab6046af1243de582f8de2f6eb94a6d5f477f09a3256b989043cf99d3e4220"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendOnboardingPairingPreflightRange (cognitive 18): AtriaBLEManager.sendOnboardingPairingPreflightRange has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (6 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14889}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded89aa338b01e973ac5944c3b4c5bde29e56f32ac01a6459327df8c7389cbdf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.armOfflineHistoricalSyncIdleWatchdog (cognitive 18): AtriaBLEManager.armOfflineHistoricalSyncIdleWatchdog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":18404}}}],"partialFingerprints":{"codehealthFindingId/v1":"5869091183c270e95b697606bb8e44cf8f4fbf6af9ae705e82b1df7cb55acf70"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestFreshScanReconnect (cognitive 18): AtriaBLEManager.requestFreshScanReconnect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23996}}}],"partialFingerprints":{"codehealthFindingId/v1":"04aa00c5d64ea2a04957287517530bcb52cb99bb66314f1a4ddba40b213fb7d4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.rebuildCentralForWedgedSessionOnce (cognitive 18): AtriaBLEManager.rebuildCentralForWedgedSessionOnce has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29611}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d0d4a7a4687c751214e90f960b0927a6f0affa739268acd442914e45d03840"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.workoutMotionLeaseAction (cognitive 18): AtriaBLEManager.workoutMotionLeaseAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":35149}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a74a44dcb550158e269332d5b39030ee6b923dd868042c2cbdd8463fd07e8a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.heartRateContinuityRecoveryDisposition (cognitive 18): AtriaBLEManager.heartRateContinuityRecoveryDisposition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, 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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce5e717e52100e1368f810b7e4596b8737eb9de8aa0393b8f26eccc3c7957c24"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.shouldFinishIdleWindowHistoryDrainAtACKBoundary (cognitive 18): AtriaBLEManager.shouldFinishIdleWindowHistoryDrainAtACKBoundary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"36090878f71be149e9d276fab2083debc79cc8dc42c2b42dec82d5c019a9ff4c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.connectedRawHistoryCatchUpContinuationDisposition (cognitive 18): AtriaBLEManager.connectedRawHistoryCatchUpContinuationDisposition has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 4. 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2590}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb29323efba2a3221ab4a122b8db5454f6fd371bdc87e7a8a6bdb0a0252ab97"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHealthScreen.sleepDetailCard (cognitive 18): AtriaHealthScreen.sleepDetailCard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97e6ac084220648be5362b4f33ec91cba9392f83d30dc7807253dbc8b527f17"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepConsistencyStrip.body (cognitive 18): AtriaSleepConsistencyStrip.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (5 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":3674}}}],"partialFingerprints":{"codehealthFindingId/v1":"f82ba1b497eb65c50eae699e1112fc4c95f42fcbdcfab9a11f2bc842f6796b69"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateBuilder.buildMotionEpochs (cognitive 18): AtriaHistoricalAggregateBuilder.buildMotionEpochs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 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":"Atria/Atria/AtriaHistoricalAggregateBuilder.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"2403274069024ac87ebdca5486d2d28fdf7ef22f45f3051715a164fb72615177"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.verifyCompressedStorage (cognitive 18): AtriaHistoricalArchiveCatalogStore.verifyCompressedStorage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 2, error handling 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"03825e9a8cd737159426e2b025f1432011a7e2c1b67d907be03c60df7f940697"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveDurableStore.compactIdentityIndexOutsideHorizonLocked (cognitive 18): AtriaHistoricalArchiveDurableStore.compactIdentityIndexOutsideHorizonLocked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, loops 2 (5 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 12 points are the body\u0027s own statements and 6 belong to 2 function items 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c3ee11e75d2f4cb99accfd8cbbcfab2c9bb23bb3035864fb38f3f09e736e1e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerDestinationStore.retireReplayPayload (cognitive 18): AtriaHistoricalCanonicalConsumerDestinationStore.retireReplayPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"c37fae8f63371f794b1eef8e138a9e447a7fa7e7699f586ae11fdc351486d6ab"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordMatchingACK (cognitive 18): AtriaHistoricalFullDrainCoverageStore.recordMatchingACK has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bea017d3e23871b3c0a7d9492bd9816ab4b426024c6a0b915b67c4b6866594c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalHighVolumeStorageAccounting.measure (cognitive 18): AtriaHistoricalHighVolumeStorageAccounting.measure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (3 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":"Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e811566726b950b35db24b50c35416330c04f5e65179f9d60310a8b8b9ea5992"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalLiveIdentityLookup.lookup (cognitive 18): AtriaHistoricalLiveIdentityLookup.lookup has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 5. 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c6c380c4845e32f4c8d95506c3b024ee6aad499be02f6ee4e3f246ae0bd0c0e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLearnedInsights.insights (cognitive 18): AtriaLearnedInsights.insights has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, ternaries 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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"c163d115b80d9a43a862bbd07e269b0a19b075f80216f15ff27a47cb78f871c2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodaySleepReviewProjectionState.preferredReview (cognitive 18): AtriaTodaySleepReviewProjectionState.preferredReview has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"982d558a83806b53eb840b578c38b2f9757ae099aa91a970150028034e87e6bf"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaPersistedWorkoutStrainRescorer.matchingVerifiedAudit (cognitive 18): AtriaPersistedWorkoutStrainRescorer.matchingVerifiedAudit has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, if/else 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":"Atria/Atria/AtriaPersistedWorkoutStrainRescorer.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c9c2e5605b9beeac0280496055bb7a062184ddbb6c8fc2a24294839808ec001"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingDetector.processCandidate (cognitive 18): StreamingDetector.processCandidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ac48818358961b3a832780a3669070ab638fcbc484d6cb86b80cd07962cf2d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressPresentation.make (cognitive 18): AtriaStressPresentation.make has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 2 (3 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6af783503df4a9e05adc4508f476da8a9c5f3b92164927aec8ee84efa33e25d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodaySessionState.== (cognitive 18): AtriaTodaySessionState.== has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 18. 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b80222e50f55da5aecc78f23c2742bdc7da78d2b37f4575509e6db87e2cc3ee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTrendActionReadout.init (cognitive 18): AtriaTrendActionReadout.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 2 (6 pts), match/switch 3 (5 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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff6d428598c83d92eaf5ebe9b5c462bfe7c0028f22545d62bdab2b91e8883b2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt (cognitive 18): AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"deee975e7c30ab30a0319a7e1b383e128e6d42e9868eb1468d274d7cb4f94cc4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutOnset.firstSustainedElevatedOnset (cognitive 18): AtriaWorkoutOnset.firstSustainedElevatedOnset has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWorkoutOnset.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba7e199fd0f1944811ad8bbaf327d7be9efac871561232024461e504851e695"}},{"ruleId":"D2","level":"warning","message":{"text":"DailyRecoveryResolver.limitedFallbackMetricIsStructurallyAuthoritative (cognitive 18): DailyRecoveryResolver.limitedFallbackMetricIsStructurallyAuthoritative has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, if/else 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b2f3aad2eb5f99835331772359de75bf5aa987c0a7c6748439a71c4c249d9d"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthKitExporter.queryHeartRateReferenceSamples (cognitive 18): HealthKitExporter.queryHeartRateReferenceSamples has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 6, 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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1875}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec24a921bbf9fef606b2d244f894d0ba334eb5d38e7946e85863ced511e8b65"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.promoteMetricUsableRows (cognitive 18): HistoricalArchive.promoteMetricUsableRows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (2 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3331}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db8fc9e8e9f518b606a158f9a4de123d3871a9a65832869a96346f7167e5285"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.sealedCatalogBoundIsDurablyTrustedOutsideWindow (cognitive 18): HistoricalArchive.sealedCatalogBoundIsDurablyTrustedOutsideWindow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, if/else 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8539}}}],"partialFingerprints":{"codehealthFindingId/v1":"7146d7233d19f47581b407592cf35261c466a762c055c9db772d281a3386a188"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepStageIntegrity.validates (cognitive 18): AtriaSleepStageIntegrity.validates has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (6 pts), loops 2 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4157}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ad54f5bddbca529a8fad34662fbce37275951724749cc92aa2da787d6a2f1d0"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.appendingRecoveredExecutionDiagnosticEvent (cognitive 18): SessionStore.appendingRecoveredExecutionDiagnosticEvent has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 3, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":11009}}}],"partialFingerprints":{"codehealthFindingId/v1":"31531ee4d503b97f36eb5b7906da80d974ef7f79e9d009ec8d874b60fe2b1686"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeTrainingLoadSummaryCancellable (cognitive 18): SessionStore.makeTrainingLoadSummaryCancellable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 2 (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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20728}}}],"partialFingerprints":{"codehealthFindingId/v1":"c28581c569947193b62010bcfa11f69898d27d484f16b3deb798d6ca376cbd99"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeWorkoutReviewCandidateForCache (cognitive 18): SessionStore.makeWorkoutReviewCandidateForCache has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33001}}}],"partialFingerprints":{"codehealthFindingId/v1":"31dc72f9b099be3c177064a46dbfc52129e7969a1e74a5331cdceb8b7ca46811"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.activeWorkoutPointProjection (cognitive 18): SessionStore.activeWorkoutPointProjection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":35669}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbef342fba5141947e17f1c1f040c39e97db22c6453ca53a48e0644656c583de"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.sustainedAwakeEvidenceExists (cognitive 18): SessionStore.sustainedAwakeEvidenceExists has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":37758}}}],"partialFingerprints":{"codehealthFindingId/v1":"0775d011b5d602af4d51ac7a1177ea2d3caef2aea1b9eb6e6bd231d3d4b005c5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.prepareWakeBoundarySleep (cognitive 18): SessionStore.prepareWakeBoundarySleep has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":41626}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8da1f9bdf9c0a7b2831b7802f2af8300464f748e36e570464f62e09e3ffd1f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.shouldSplitPostWakeNap (cognitive 18): SessionStore.shouldSplitPostWakeNap has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56608}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9189898bbef4d3bc2ad2e5d9b0876a31356ec5e8859b3f685ceb0289b4c212a"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoryView.debugFixtureHistorySnapshot (cognitive 18): HistoryView.debugFixtureHistorySnapshot has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12, boolean chains 4, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59138}}}],"partialFingerprints":{"codehealthFindingId/v1":"855dc412f6e1d346c3007c862aaac7e9906e7a2689bfbe597eea262c475a006b"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.resolvedPresentedWidgetStrain (cognitive 18): WidgetSnapshotPublisher.resolvedPresentedWidgetStrain has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts) (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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"99ae348c5e2d72109e1499983314174cc2ae5b19335c943e3e9b2ce2d3a19436"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaActivityMonitorTab.debugWorkoutDetailFixture (cognitive 17): AtriaActivityMonitorTab.debugWorkoutDetailFixture has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13, if/else 3, 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1854}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7eda44cb3264a14ab30ea1d17f084a78a608a8b559f1a979c220d2aa53fae67"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.discoveryServicesForCurrentMode (cognitive 17): AtriaBLEManager.discoveryServicesForCurrentMode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 5. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5565}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc0fe52dd2e4b324b9a30f1e6906c287c66e7df2a7219456cae8fed8fa068ca"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.beginProtectedR10BringUpForCurrentEpoch (cognitive 17): AtriaBLEManager.beginProtectedR10BringUpForCurrentEpoch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 7. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6132}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60c8480ff5625e34a9ecd06e978c5d680319116c314f42a960387159799de05"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.releaseConnectedHistoricalSliceIfNeeded (cognitive 17): AtriaBLEManager.releaseConnectedHistoricalSliceIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 4 (5 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":18259}}}],"partialFingerprints":{"codehealthFindingId/v1":"62953460384f31f07a012a8be70f4c4333eb531ccb4cfb7a3a5906dc649b74bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.observeIdleWindowPostACKRangeProbe (cognitive 17): AtriaBLEManager.observeIdleWindowPostACKRangeProbe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":18731}}}],"partialFingerprints":{"codehealthFindingId/v1":"4335bdcfa68529f210baf645fd51d8d100f50c3791ccd1dfec5cd7c877949bf4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.preserveLongWearRangeLossRecovery (cognitive 17): AtriaBLEManager.preserveLongWearRangeLossRecovery has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":20934}}}],"partialFingerprints":{"codehealthFindingId/v1":"4184309282b609f46937cde2fd3ded92acb5762493450342cab51bbce1a233d8"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.maintenanceTickRangeLossBackfillReArmIfDue (cognitive 17): AtriaBLEManager.maintenanceTickRangeLossBackfillReArmIfDue has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21418}}}],"partialFingerprints":{"codehealthFindingId/v1":"71a06b51bb4c6ff027900b503955378f166a443fc1883d20ecbe33a335637db4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateAdaptiveAutoCapture (cognitive 17): AtriaBLEManager.evaluateAdaptiveAutoCapture has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2 (4 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, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27047}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd06b07b77edc7e61b2b9fcc95628b7c026c06a5ceea8a305fa5f2c313ef4f42"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.endAcceptedHeartRateBatch (cognitive 17): AtriaBLEManager.endAcceptedHeartRateBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31351}}}],"partialFingerprints":{"codehealthFindingId/v1":"461088d6fa86eae0c0f1adb1dec289c954bbc3f771553c05c60225c5b5494605"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleProprietaryArmFallbackIfNeeded (cognitive 17): AtriaBLEManager.scheduleProprietaryArmFallbackIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, ternaries 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33772}}}],"partialFingerprints":{"codehealthFindingId/v1":"78c3ae4ae9f4189a9a48c0d3b716ee4912f22f9b3fcab7955b4d250aa44d3afe"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendSacrificialFastDrainCommand (cognitive 17): AtriaBLEManager.sendSacrificialFastDrainCommand has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41392}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a7912c031308082c3c4b481278536d180fe4f2f0f1872d388fb09ddd6a1c47"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.maybeRequestProprietaryBatteryRefresh (cognitive 17): AtriaBLEManager.maybeRequestProprietaryBatteryRefresh has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 5. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd5b95465baaaf37a73d35fa3b530187e87aa0c646021761bef1b364cbe35ee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.processOrderedHistoryMetadata (cognitive 17): AtriaBLEManager.processOrderedHistoryMetadata has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 3 (5 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44803}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4df4b4bbb213781a212f7f44485feeb5d8def6ca3d9355c98ad593876552f72"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.completeSessionBoundary (cognitive 17): AtriaBLEManager.completeSessionBoundary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50517}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cc2625fa3737f61241cabee14614d21b6d59c09804489b51b16c185ec00ab18"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.shouldAttemptAutomaticConnectedHistoricalHandoff (cognitive 17): AtriaBLEManager.shouldAttemptAutomaticConnectedHistoricalHandoff has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":3062}}}],"partialFingerprints":{"codehealthFindingId/v1":"42317e4a6d5f9bdfdb4a7eda5c2353396acd93e402f019a22b6767a29aa58309"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.parseFastRealtimeProprietaryPacket (cognitive 17): AtriaBLEManager.parseFastRealtimeProprietaryPacket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 3). 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57744}}}],"partialFingerprints":{"codehealthFindingId/v1":"70047081e0fb197330988a506bbd21af52abb6163ac58f0c9594406a6a6bee58"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.batteryLevelAcceptanceDecision (cognitive 17): AtriaBLEManager.batteryLevelAcceptanceDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (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":"Atria/Atria/AtriaStrapPowerPolicy.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1c21b763a128f3202c2d9bdbe069d0dbd7107d0cf2167c1f878cae4c1403261"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateReader.loadCommittedChunkIDs (cognitive 17): AtriaHistoricalAggregateReader.loadCommittedChunkIDs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ddfdf50997fe2aa63e6c61d1b2491bf79f4c83d34bc1e440bc2181adc00146"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalArchiveCatalogStore.recordSealedMetadata (cognitive 17): AtriaHistoricalArchiveCatalogStore.recordSealedMetadata has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f415b17f9b5f0d6f453bfd3272025f95087847411ff4bbd744edd4fc7e5db1c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerApplicationStore.publishCompleteSet (cognitive 17): AtriaHistoricalCanonicalConsumerApplicationStore.publishCompleteSet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"efd79ea47dd1b62c1f71fa488d01ebde13928aa751229393da58547957651656"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalDailyConsumerProjection.validCommon (cognitive 17): AtriaHistoricalDailyConsumerProjection.validCommon has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"3acb2c52c7f4df2dec24dea823f6b4b081de2d5e15f9f028817ee3c287cbdd06"}},{"ruleId":"D2","level":"warning","message":{"text":"DurableStorePair.isValid (cognitive 17): DurableStorePair.isValid has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc47ca7905cb90ed6a1c57dfb4e965baad55b37378ae58803faeff79d756b0e0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.arm (cognitive 17): AtriaHistoricalFullDrainCoverageStore.arm has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts) (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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5bc766a8f2051cc03fc81198ff95d56b659b9b6c7b4ca74c4e6f935cedad08"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.migrateLegacyCoalescedWindow (cognitive 17): AtriaHistoricalGapLedger.migrateLegacyCoalescedWindow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), loops 1 (2 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb712aa91e32253e435632cf99bca3f9706be0ab40566d34fb64398fa376f09b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalGapLedger.continuity (cognitive 17): AtriaHistoricalGapLedger.continuity has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"3159b93b14b5b0882738a595d625d16b3edebcfaa28bd2c7c7636fb17a8424ef"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalHighVolumeStoragePlanner.plan (cognitive 17): AtriaHistoricalHighVolumeStoragePlanner.plan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d0fffc1fe9898080580cdc58391cb6cf0373bf0b28dfe58c2131050881df3e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalRawRetirementExecutor.loadAuthority (cognitive 17): AtriaHistoricalRawRetirementExecutor.loadAuthority has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, 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":"Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2eb76fbf863eb1eb725ea08eefc9562a4a9355d306d47af08d3465b790c6e78"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.setLiveWorkoutPaused (cognitive 17): AtriaHomeView.setLiveWorkoutPaused has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2593}}}],"partialFingerprints":{"codehealthFindingId/v1":"156483f8e4b626fa678993a68887e6aaa361a2a8c47ddeb96df4ff284a3bd885"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutEndRecapSheet.metrics (cognitive 17): AtriaWorkoutEndRecapSheet.metrics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 6). 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6631929f10b0e3805c93abed678abd3a8381d025cbc7e3c68e93881f855a057"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDecoder.decodeBody (cognitive 17): AtriaIMUDecoder.decodeBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIMUDecoder.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dabcc7e35d6ba29e164f79b83fd0e6e9a7d42874febfb2201c5d58d4eae6644"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.helloThen6AWriteDecision (cognitive 17): AtriaIMUDiagnosticTransport.helloThen6AWriteDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1, 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. This shape REPEATS in the file: 3 other methods here (AtriaIMUDiagnosticTransport.stopR10WriteDecision, AtriaIMUDiagnosticTransport.releaseHistoricalWriteDecision, AtriaIMUDiagnosticTransport.allDayRecoveryWriteDecision) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5379b3c452055f5bc1c260ed59e33dd56fc339fe3d7a1c687ab69167e8ff8e4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.stopR10WriteDecision (cognitive 17): AtriaIMUDiagnosticTransport.stopR10WriteDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1, 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. This shape REPEATS in the file: 3 other methods here (AtriaIMUDiagnosticTransport.helloThen6AWriteDecision, AtriaIMUDiagnosticTransport.releaseHistoricalWriteDecision, AtriaIMUDiagnosticTransport.allDayRecoveryWriteDecision) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40b763f448d86da5be23241e5716550339198dc751e032cd27fcf462cce713d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.releaseHistoricalWriteDecision (cognitive 17): AtriaIMUDiagnosticTransport.releaseHistoricalWriteDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1, 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. This shape REPEATS in the file: 3 other methods here (AtriaIMUDiagnosticTransport.helloThen6AWriteDecision, AtriaIMUDiagnosticTransport.stopR10WriteDecision, AtriaIMUDiagnosticTransport.allDayRecoveryWriteDecision) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e8a825fa1f4e45dd0b1c595c04f9aabe8a6902d376bce05da5018a3c255f56"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.allDayRecoveryWriteDecision (cognitive 17): AtriaIMUDiagnosticTransport.allDayRecoveryWriteDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1, 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. This shape REPEATS in the file: 3 other methods here (AtriaIMUDiagnosticTransport.helloThen6AWriteDecision, AtriaIMUDiagnosticTransport.stopR10WriteDecision, AtriaIMUDiagnosticTransport.releaseHistoricalWriteDecision) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":929}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7786781e336b48c74c2a6f5ece5ea9812e0ac41a432ea8599fb5c1abaef5e12"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.classifyAssembledFrame (cognitive 17): AtriaIMUDiagnosticTransport.classifyAssembledFrame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1549}}}],"partialFingerprints":{"codehealthFindingId/v1":"241afb3ba37b108f91a3042dd5d9b5ce9c84be9e7a9a8e6b47c038727cd9918c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveWorkoutActionStore.consumeClaimedFiles (cognitive 17): AtriaLiveWorkoutActionStore.consumeClaimedFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (2 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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"99726af6a70e1b182ea5bda76c79e9b948c7aab6959d275fbc29c20a62d062a6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaManagedStorageInventory.sweepOrphanedArtifacts (cognitive 17): AtriaManagedStorageInventory.sweepOrphanedArtifacts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaManagedStorageInventory.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdaf4bf59f31303d69d22d1c83e7f109eed2e91c9dde412214ba64bd0e20c0d7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRecoveredHeartRateProjection.coverage (cognitive 17): AtriaRecoveredHeartRateProjection.coverage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2, 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2282b79b48977dd19d18a9d099aae4c92143076fedc0abdce1edf4f8e80f0bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaResearchProbe.modelGeneration (cognitive 17): AtriaResearchProbe.modelGeneration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3 (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":"Atria/Atria/AtriaResearchProbe.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fae30a960bb9cf95758ecd0ca19f24ac05e46d95fbe04c4c27217ab7d86408"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaRestoreTransactionCoordinator.apply (cognitive 17): AtriaRestoreTransactionCoordinator.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRestoreTransaction.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"74a48d782fcb3a3d67c8660a26ff979182762cee81a08b2d4e8bdb3486b4493f"}},{"ruleId":"D2","level":"warning","message":{"text":"Point.isValid (cognitive 17): Point.isValid has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16596740f14845612ddc062818c81c26c505be45fe850f341c6b42b78dcdcd0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodayScreen.todaySection (cognitive 17): AtriaTodayScreen.todaySection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8b523fd98a1c141e645851efff202650f5390cdf67e643283c53ae5e499a22"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4FrameReassembler.feed (cognitive 17): AtriaWhoop4FrameReassembler.feed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), 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":"Atria/Atria/AtriaWhoop4FrameReassembler.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"5120958c9c2c54b574af4fdbaaeb89f815679b004c3dafc514a0c7893301b7b7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.decodedPrefixPoints (cognitive 17): AtriaWhoop4MotionTickCompactStore.decodedPrefixPoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 2 (4 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2622}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c03540024085f745cf49f11ef6faebd686a42ffc3881cefeb1e7d91a60ce09"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutOnset.lastSustainedElevatedBoutEnd (cognitive 17): AtriaWorkoutOnset.lastSustainedElevatedBoutEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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":"Atria/Atria/AtriaWorkoutOnset.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"81540b3db3a4da0af795da4507b85c0062a40fe0a3fad49306f688c9f63408a6"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.sidecarHeartRatePoints (cognitive 17): HistoricalArchive.sidecarHeartRatePoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8202}}}],"partialFingerprints":{"codehealthFindingId/v1":"7379c8a43b19b431e3adf48561383f8274246def9ee5b8ae2477c3042364773c"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.healthDeviationDecision (cognitive 17): LocalNotificationScheduler.healthDeviationDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4854f70695325849428fe4e2c7dc145bac463f986fa9428f2f683c0204c0ab"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.recomputeRestingTrend (cognitive 17): SessionStore.recomputeRestingTrend has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":11442}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57ccef0360461815dafd5cceffda5f6ca1a83b7b468dad65a003292a6edaf94"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.boundedRecoveredCurrentCheckpointSessionsCancellable (cognitive 17): SessionStore.boundedRecoveredCurrentCheckpointSessionsCancellable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":16487}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dbfc1bc4c8725fb367693fc4efb8aba5bc16927ee03aed535cfe53ca256785b"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.archiveOnlyTRIMPCancellable (cognitive 17): SessionStore.archiveOnlyTRIMPCancellable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27330}}}],"partialFingerprints":{"codehealthFindingId/v1":"960042c0d8aec8d26750d97f01814035edfb4d37305cbbaf8c8ed6c6d021f6b6"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.beginArchiveCompactionBGProcessingLeaseIfSafe (cognitive 17): SessionStore.beginArchiveCompactionBGProcessingLeaseIfSafe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, 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, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28285}}}],"partialFingerprints":{"codehealthFindingId/v1":"4716e81df3e563f9f3e144f490ac8f63a994d99ada6ca44e4f51cd9dd3a8c314"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeActiveJournalSessionCore (cognitive 17): SessionStore.makeActiveJournalSessionCore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 3, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":29966}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c2758ac41b9e54d9861cd18364f770b4304b8a0250fedd466d1904af3c12ae"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeWorkoutReviewCandidatesForCache (cognitive 17): SessionStore.makeWorkoutReviewCandidatesForCache has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 2 (3 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1176ce815f6f14bfc8de967b0c5aa6d6c07eb487c470cd43762048bc4f4a7b99"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.rescoredConfirmedWorkoutsForCurrentStrainCalibration (cognitive 17): SessionStore.rescoredConfirmedWorkoutsForCurrentStrainCalibration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 3). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35115}}}],"partialFingerprints":{"codehealthFindingId/v1":"1311d916824bd99205ddf253915317e63c093357c3915471006a5284b887d98f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.isDegradedHROnlyOvernightSleepCandidate (cognitive 17): SessionStore.isDegradedHROnlyOvernightSleepCandidate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42126}}}],"partialFingerprints":{"codehealthFindingId/v1":"6893376781b794fca1d3f7fbe92bf6f1e6fbecf04b42965edf08b60386a456e5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.recoveredDutyCycleSleepWindowCancellable (cognitive 17): SessionStore.recoveredDutyCycleSleepWindowCancellable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45457}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3775287c5e82ace097f721bb60ea0bb6cba987ab9cd88ef6bcd0b65ce63946c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedWorkoutZone2PlusMinutes (cognitive 17): SessionStore.confirmedWorkoutZone2PlusMinutes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":53129}}}],"partialFingerprints":{"codehealthFindingId/v1":"af33a37ae76ee99b09490fe76e8f0d815b1418ffe830c03eb79609b5b34e7ad8"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.loadPersistedSessionsDeferred (cognitive 17): SessionStore.loadPersistedSessionsDeferred has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56797}}}],"partialFingerprints":{"codehealthFindingId/v1":"b17daae59529dbda7b5fa5229bde07683bb4933eb2314678b0afa9c09586925c"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.scheduleLiveWorkoutPatch (cognitive 17): WidgetSnapshotPublisher.scheduleLiveWorkoutPatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d3cc8b8d6d7dc38bb1f5fbf9885f6ed985bb5371d9673c2485cd7fdfbf9fd5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidget.swift.liveActivityDailyStepGoalPresentation (cognitive 17): AtriaWidget.swift.liveActivityDailyStepGoalPresentation has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 6, if/else 4 (5 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2697}}}],"partialFingerprints":{"codehealthFindingId/v1":"a558d0c0ee8ef26ef2460e609f4ed212320d9ef640606f0e0e1cabbae731e8ed"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaCoachPayload.auditLines (cognitive 16): AtriaCoachPayload.auditLines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89297f85b165fe37a5a4636e2fcdabc917368506fa40f6dddcfbc3f00722b77"}},{"ruleId":"D2","level":"warning","message":{"text":"SurfaceCoverage.isComplete (cognitive 16): SurfaceCoverage.isComplete has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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":"Atria/Atria/AtriaAppReviewDemo.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cf0f97d879d58955ffb982d616983cef4e21f6a65d899bfd7adf7cb5a5faec"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateR10Live (cognitive 16): AtriaBLEManager.evaluateR10Live has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5844}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ae271839536e04a10c740787ece39019abc4f542966d563c9cabf215239c62"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.r10IdlePausedNow (cognitive 16): AtriaBLEManager.r10IdlePausedNow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5916}}}],"partialFingerprints":{"codehealthFindingId/v1":"01cfe69fd7a4dcbd7329dbe45393a68d7bae3fc727d809e8199d752ec466496b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.requestOfflineHistoricalSyncAwaitingCompletion (cognitive 16): AtriaBLEManager.requestOfflineHistoricalSyncAwaitingCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 2, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14997}}}],"partialFingerprints":{"codehealthFindingId/v1":"65aa7beef8e3a305283159cb2cbefcc05e918246706335ac2f3aa8f4a65a71b4"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.scheduleSessionCheckpoint (cognitive 16): AtriaBLEManager.scheduleSessionCheckpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (7 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26829}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae5f68b1acdd4fff246be65bcb259772d401f3e306808de7ec786c98dae48ca"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.checkpointFromLiveEventIfNeeded (cognitive 16): AtriaBLEManager.checkpointFromLiveEventIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 6, boolean chains 1, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30679}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7cdcd24fe43f0bfe57cb9af330f4c96d17a667608edc7acb6b2edf8b069cf8"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.handleHistoricalIMUCommandResponse (cognitive 16): AtriaBLEManager.handleHistoricalIMUCommandResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32035}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b834163af4232b9054bb8932426816ec1e1fd64a1d6ff9b23b57bfcceedc46"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.sendCoverLiveBoundedRawCaptureIfNeeded (cognitive 16): AtriaBLEManager.sendCoverLiveBoundedRawCaptureIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34206}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a113deb3bcca756d4f78b2769de5315fe3b1ce2fd0ae93eb895e8d598e76cd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.evaluateAllDayMotionGovernor (cognitive 16): AtriaBLEManager.evaluateAllDayMotionGovernor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 4, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":35314}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7eed59692e2d70d78fb64c4f43b9f2ad69700a16cdd7e424363b5555b318ee"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.maintainPendingWorkoutMotionBankTickets (cognitive 16): AtriaBLEManager.maintainPendingWorkoutMotionBankTickets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37897}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade68dc2d7025f35b1a51368e6774b0c62eab0a66c1f77f8da63b93eb3216a24"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.maybeRestartRealtimeAfterZeroRR (cognitive 16): AtriaBLEManager.maybeRestartRealtimeAfterZeroRR has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, error handling 1 (2 pts), 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42942}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6d87c39f5f77e9ba0fde4b872203da6e961a392bdf542bd1e2a9f6a631ac9b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.reackDurableHistoricalReplay (cognitive 16): AtriaBLEManager.reackDurableHistoricalReplay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49596}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6384d652f7ba99f2f02c4b2fc1e68c3d1af6151917289db750c9686912d4624"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaBLEManager.selectedIdleWindowHistoryDrain (cognitive 16): AtriaBLEManager.selectedIdleWindowHistoryDrain has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 1 (2 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5db96672bf2756a8d0433304542a04702cc45582b5c956c1f2c23ca29acfe0d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHeldDailyStepFloor.persistLiveCoordinate (cognitive 16): AtriaHeldDailyStepFloor.persistLiveCoordinate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5ff5c39989686eb8b5737f2690f915c90d831f2c79880323a58d935d301cbe1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaFullFidelityColdSessionStore.pruneAbandonedTemporaryFiles (cognitive 16): AtriaFullFidelityColdSessionStore.pruneAbandonedTemporaryFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 4, 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8532eaf3df2d8ddd6e9064ce0e20344facc18def3a40aa9cfbe124627b925d1"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHealthScreen.body (cognitive 16): AtriaHealthScreen.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, match/switch 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffab8820a402d5ce0c23104b3c163431348777a2611ec7a2e0e0d1c46116e50c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalDrainCompletionGenerationStore.publish (cognitive 16): AtriaHistoricalDrainCompletionGenerationStore.publish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0132af83225fa79c2a0ed352b51abc3ea4acb5535666936a0a561a5949aa39"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalAggregateBuilder.buildHeartRateMinutes (cognitive 16): AtriaHistoricalAggregateBuilder.buildHeartRateMinutes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 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":"Atria/Atria/AtriaHistoricalAggregateBuilder.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"a458ea6662670bdf240654faa7540523052ba3c9f8f14b8394116dbc2899113a"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalCanonicalConsumerApplicationStore.valid (cognitive 16): AtriaHistoricalCanonicalConsumerApplicationStore.valid has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad131c1a2b7548468e378e537a845e0f2a651a16014e709f6741ee1046d651d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalConsumerReceiptLedger.activateCurrentSet (cognitive 16): AtriaHistoricalConsumerReceiptLedger.activateCurrentSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"521f9f0bc629e8f11778e3973dbdaa32a66248da774e74098c7138210fa17b44"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullDrainCoverageStore.recordHistoryComplete (cognitive 16): AtriaHistoricalFullDrainCoverageStore.recordHistoryComplete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"880e41d09b3c88bf1f9369efb2a4901261d854eea66b47c47d6c2dd79c2314ce"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalFullScanCompletionStore.recordCompletion (cognitive 16): AtriaHistoricalFullScanCompletionStore.recordCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), 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":"Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b39efda6e358659742aab1d5389a26eb61766a847aa7e35dab44ef09ca6754c"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalRetiredReplayIndex.maintainStorage (cognitive 16): AtriaHistoricalRetiredReplayIndex.maintainStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, 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":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"a83321256f6e4dcd992814593633a3547beb4797deedfa9dc378d14debe340c9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSealedCatalogMaterializer.quarantineDivergentCommittedArtifacts (cognitive 16): AtriaHistoricalSealedCatalogMaterializer.quarantineDivergentCommittedArtifacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (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":"Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2118703ce1dc456459a1c8c7f9af7015c483b962d5c48d9513e45327b38845"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSealedJSONLCompression.loadAndVerifyCommitted (cognitive 16): AtriaHistoricalSealedJSONLCompression.loadAndVerifyCommitted has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 pts), error handling 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb87f17f744f97d621294ffb8f76d5d4b2f11526942d8fb83d0a6a9431a50f5"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalSealedJSONLCompression.encode (cognitive 16): AtriaHistoricalSealedJSONLCompression.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, loops 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 8 points are the body\u0027s own statements and 8 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba704e8a83bf10f2ac9018612658a5361bd1e5913e123904e9ee48964876e659"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalVerifiedActivityConsumerApplicationStore.loadCurrent (cognitive 16): AtriaHistoricalVerifiedActivityConsumerApplicationStore.loadCurrent has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, error handling 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":"Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"21d4f0bf07ba89c0740490db333eb2e7edb53b5a4b282934fbd9421b3209e51b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.beginWorkoutSession (cognitive 16): AtriaHomeView.beginWorkoutSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2443}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0e49db56df713c87b9e962d1df32b14cd6a5c21558141fd94551ff5c7048c0"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeView.handleHomeAppear (cognitive 16): AtriaHomeView.handleHomeAppear has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, 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, 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":4855}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f9718505067a10a6fe09ddae37b723c07c6bb9af5e6a9d1d290d6917559932"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHomeModel.publishDiagnosisReport (cognitive 16): AtriaHomeModel.publishDiagnosisReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 6, boolean chains 1. 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: 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":10952}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b5d081437ad22440e80c7fb2c3129fcd37a7d16834976b3a16c9f31ad996c7"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaIMUDiagnosticTransport.recordAssembledFrame (cognitive 16): AtriaIMUDiagnosticTransport.recordAssembledFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"768c40eb67ba77a5a27df8e6ae7bb41c57a0e97aac283aed9c50351b53d450ed"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLearnedInsights.dayRead (cognitive 16): AtriaLearnedInsights.dayRead has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. 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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ca45f3b4a6fc460a3b8cbefae7d45e8607e76a14758601ad6c95b1ae13d413"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaLiveWorkoutView.routeWorkoutActions (cognitive 16): AtriaLiveWorkoutView.routeWorkoutActions has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 5 (6 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2698}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dfedbdfb10379d998e9715eacfcdb1aefd22fcd20335dc1d1d14c797ce998e2"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightTimelineAnalyzer.classify (cognitive 16): AtriaNightTimelineAnalyzer.classify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 3 (6 pts), boolean chains 3, 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":"Atria/Atria/AtriaNightTimelineAnalyzer.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"515a2e48975510ebd64dfd078ff644d7f1013a37c943132dd07da91590a0b3d3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaNightTimelineStore.ensureLoaded (cognitive 16): AtriaNightTimelineStore.ensureLoaded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 3 (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":"Atria/Atria/AtriaNightTimelineLoader.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38a0f6f6bf003d067e091e16e856d557350a3cbdd3b87d2c3cceabcfb798cdd"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSettingsView.handleBackupImport (cognitive 16): AtriaSettingsView.handleBackupImport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 2, 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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1425}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a03f9fbad5c24b1b79e4c1c522f2e41b237970933c5b6608a036a900205caa"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaSleepHypnogramCard.displayState (cognitive 16): AtriaSleepHypnogramCard.displayState has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts) (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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"e328123b1355eef252df3b8f966b4095d6800c64fe743f8c0064da12aa62809b"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStepCalibrationPlanStore.isValid (cognitive 16): AtriaStepCalibrationPlanStore.isValid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, loops 1, match/switch 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":"Atria/Atria/AtriaStepCalibrationPlan.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c240ca519f5860b982959f317686ab8b2c86e8a7da797c753776c5f7c44d344"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStrainLoadModel.evaluateInterval (cognitive 16): AtriaStrainLoadModel.evaluateInterval has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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":"Atria/Atria/AtriaStrainLoadModel.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b85c2c76e7d6d325dc950ecdb65979a53233ba9b8b59be711afc3f52ceb8f3"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaStressHistoryPersistence.loadSynchronously (cognitive 16): AtriaStressHistoryPersistence.loadSynchronously has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 1 (2 pts), 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e23ea3dcc48d8ee1d2d7752b3f0a126dbc3460b22e11e6a8094634e630ce03"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaTodayScreen.centerDeltaText (cognitive 16): AtriaTodayScreen.centerDeltaText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2595}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbf75ae529f714123753fc4ed16177243464ac68a85ca657327f4e891b8c96a6"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaVitalsLiveSignalCard.stressMonitor (cognitive 16): AtriaVitalsLiveSignalCard.stressMonitor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 2, 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":2898}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99f43caaae55d0c7f6c5d93637d66f3c72689a405db76a5eaebf8a1257b5914"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHeartRateExplorer.selectionSummary (cognitive 16): AtriaHeartRateExplorer.selectionSummary has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (5 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3cd10af44a86b6307aff8ba42f8c759e326040066a65e66483eb9912487a10"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWalkBoutDetector.latestBout (cognitive 16): AtriaWalkBoutDetector.latestBout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 1 (nesting depth added 6). Of this number, 12 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":"Atria/Atria/AtriaWalkBoutDetector.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"3adc5e971249ef411a6df7b9472b1f80a7ad6138c981ca6be22e1c8e40592aea"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4FrameReassembler.alignToPlausibleHeader (cognitive 16): AtriaWhoop4FrameReassembler.alignToPlausibleHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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":"Atria/Atria/AtriaWhoop4FrameReassembler.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"4712a78f45d164accc85c6d98418e2a082e3ef1087ee92f1e04e4b2dfd1e520d"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoricalRecordDecoder.decodeFixedLayout (cognitive 16): AtriaWhoop4HistoricalRecordDecoder.decodeFixedLayout has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6, 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":"Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1600462355afb01759d0df8cbdfa289549e085232415e9f1137474a4d95f696"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4HistoryAdmissionLedger.recordEmptyArchiveDurabilityBoundary (cognitive 16): AtriaWhoop4HistoryAdmissionLedger.recordEmptyArchiveDurabilityBoundary has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"54065d5a0fe6c9407463edfb25754b46c78f1199e391667e71beffa9b60552b9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWhoop4MotionTickCompactStore.motionTickWindowRead (cognitive 16): AtriaWhoop4MotionTickCompactStore.motionTickWindowRead has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"da71d8f72a164bb4c8b45f23dc1a77ff284862df8724e81014681ff93c56fe61"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWorkoutRouteRecorder.previewSegments (cognitive 16): AtriaWorkoutRouteRecorder.previewSegments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 2 (4 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, 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd5bda0d2486d0caee800ac2305c2cd7ece0f806b6156be6b6e252f25caf5ea"}},{"ruleId":"D2","level":"warning","message":{"text":"DailyRecoveryResolver.metricMatchesCurrentPhysiologicalNight (cognitive 16): DailyRecoveryResolver.metricMatchesCurrentPhysiologicalNight has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"dff4203fbf28c10849784d759e790bb261bb3301efbe2faa5a4d623098feb448"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.recordDrainedThroughCompletionIfNeeded (cognitive 16): HistoricalArchive.recordDrainedThroughCompletionIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2619}}}],"partialFingerprints":{"codehealthFindingId/v1":"125ec77730a38d53604434d89762d2613ab7ebb3bfb3c044d20814b356ab8096"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.automaticRecoveredDataBootstrapDescriptorsAreAdmissible (cognitive 16): HistoricalArchive.automaticRecoveredDataBootstrapDescriptorsAreAdmissible has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 2 (3 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4678}}}],"partialFingerprints":{"codehealthFindingId/v1":"812344a8cb932f7ee59abbc5d541356f975aa20c03e2b3969f9ae07c9b86d837"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.updateAutomaticRecoveredDataBootstrapSources (cognitive 16): HistoricalArchive.updateAutomaticRecoveredDataBootstrapSources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5140}}}],"partialFingerprints":{"codehealthFindingId/v1":"370ea889201117d8165090ad82490deb7e6bd9a32947978de40ffab4cd2a6fce"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.loadRecentHeartRateSamples (cognitive 16): HistoricalArchive.loadRecentHeartRateSamples has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9428}}}],"partialFingerprints":{"codehealthFindingId/v1":"b88d44057c6f71f6221fe44eba6948bcda6003b8dcdac18f10531fa78f899914"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoricalArchive.fastHeartRatePoint (cognitive 16): HistoricalArchive.fastHeartRatePoint has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9466}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5b756831adad366e09cab5f4fe4663011bbfe1b2d0c70f86b522ef58712d79"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalNotificationScheduler.makeMetricDecisions (cognitive 16): LocalNotificationScheduler.makeMetricDecisions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"758788b3020669796c43e48ecb6c0de7ef04b79d1a3eab703721a238a1b5795e"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaHistoricalPhysiologicalCycle.noSleepFallback (cognitive 16): AtriaHistoricalPhysiologicalCycle.noSleepFallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"b084f90bcabf6c320c8cc98c85473f4e42dfdb69ce3f32c71d00248c4fe03404"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkoutReadiness.gappedStrengthReviewCandidate (cognitive 16): WorkoutReadiness.gappedStrengthReviewCandidate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 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. This shape REPEATS in the file: one other method here (WorkoutReplaySummary.gappedStrengthReviewCandidate) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":3042}}}],"partialFingerprints":{"codehealthFindingId/v1":"063f4003505bac19ac8c05c1ce6a28e5c11807478ed9b3e153ccd3a2a648e06a"}},{"ruleId":"D2","level":"warning","message":{"text":"SleepStageSegment.overlayingConfirmedWake (cognitive 16): SleepStageSegment.overlayingConfirmedWake has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":3674}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a15d9416a930cfc63dd5773ab4b48a21f7f57974acace13b9bbabe0a2a5366"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkoutReplaySummary.gappedStrengthReviewCandidate (cognitive 16): WorkoutReplaySummary.gappedStrengthReviewCandidate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 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. This shape REPEATS in the file: one other method here (WorkoutReadiness.gappedStrengthReviewCandidate) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":6548}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea3a05b14c30e81110c77085e3e20f24f99f14b73d61ccc65d8636bb1a23507"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.isReviewWorthySleepCandidate (cognitive 16): SessionStore.isReviewWorthySleepCandidate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":22618}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33048a93c6cefc74d26e75db40808908b867577f8d70df7e31b3f747ff0ce01"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.makeDailyRespiratoryRatePreparationCancellable (cognitive 16): SessionStore.makeDailyRespiratoryRatePreparationCancellable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":24217}}}],"partialFingerprints":{"codehealthFindingId/v1":"e530d2f4e3224a14942d9087d027d26c0af7eec8f5473be4a5a36fee8fa22751"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.latestLocalRMSSDSourceCancellable (cognitive 16): SessionStore.latestLocalRMSSDSourceCancellable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (firstSource). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26501}}}],"partialFingerprints":{"codehealthFindingId/v1":"4801ea4b83337c73989eac1a36e40b783001deb35886bd096e44f6ef2f7ac30c"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.preservingMonotonicResearchAggregates (cognitive 16): SessionStore.preservingMonotonicResearchAggregates has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 4, boolean chains 3, 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, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29265}}}],"partialFingerprints":{"codehealthFindingId/v1":"1132761c6286645779f95cbe7166b3283b4eb68532a16cf5a2973958689702fd"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.maybeScheduleDaytimeQuiescenceReview (cognitive 16): SessionStore.maybeScheduleDaytimeQuiescenceReview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":39774}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b900a4ee4cc091604d92a2eab5100de8766c48db6ed072da8b64394939d4fd6"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.scheduleCompactLatestNightSettlementRetry (cognitive 16): SessionStore.scheduleCompactLatestNightSettlementRetry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 6). 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40410}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a5800f60aaf46c23bbdca918dd800e103d9ab47895f2b3437ed2f9ddb9d874"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.isHighSpecificityFragmentedHROnlyMainSleepCandidate (cognitive 16): SessionStore.isHighSpecificityFragmentedHROnlyMainSleepCandidate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42064}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb69dc81a85bfd2eb18d1ebc4b4444290b423ae2d5ef170d1f40dd375ccfa2d"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedSleepRespiratoryRateCore::finishRun::checkedEstimate (cognitive 16): SessionStore.confirmedSleepRespiratoryRateCore::finishRun::checkedEstimate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (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. This shape REPEATS in the file: one other method here (SessionStore.confirmedSleepRespiratoryRateCore) 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43544}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae09c001a67ff8587f019a4dd46e7c4c51840c6ce3fd001efcbfac7913b259f"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.confirmedSleepMutationDeltaCancellable (cognitive 16): SessionStore.confirmedSleepMutationDeltaCancellable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45046}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55e76c6543cb026f492f65db2f56448bb0534e47043559912bba0a0f6860d88"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.refreshedUserAdjustedSleepEvidenceIfNeeded (cognitive 16): SessionStore.refreshedUserAdjustedSleepEvidenceIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":46169}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2c283e10fcef6e9ec4414ccd4c9f81c32cceaefcb2cadcc2ac5d1af50881670"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.splitShortPreludeFromDenseSleepCluster (cognitive 16): SessionStore.splitShortPreludeFromDenseSleepCluster has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), ternaries 2 (4 pts), 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56434}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f9e95387d2b3362aa8de492e7891434f363b446f66b97db0c15a786dd20541"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionStore.shouldSplitPostWakeNap (cognitive 16): SessionStore.shouldSplitPostWakeNap has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56559}}}],"partialFingerprints":{"codehealthFindingId/v1":"844919a2d066f07d49f47ad1c5895b6aec254c58fdd4e076cf2c4d48a47f176c"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSnapshotPublisher.timelineReloadDelay (cognitive 16): WidgetSnapshotPublisher.timelineReloadDelay has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 2 (3 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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":2504}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f2680a072d761bd059cedb4aa37e16905ab068ced83952780e65e82998346d9"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidgetEntryView.dailyDetail (cognitive 16): AtriaWidgetEntryView.dailyDetail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1015}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eefc573d9fee01213bfc7579ab08fb7390c0964d97eb1d801c310721b786f94"}},{"ruleId":"D2","level":"warning","message":{"text":"AtriaWidgetEntryView.dailyRingPresentation (cognitive 16): AtriaWidgetEntryView.dailyRingPresentation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"0311e489c5e02262da659fefd4471761a5618b0170de2dd5d727a53661128ee7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaBLEManager: ClassTooLong \u2014 38143 significant lines (blank, comment-only and punctuation-only lines excluded), 1400 methods. The bar is 400 significant lines; this is 37743 over it, 95.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5570d14050d324c92b4cff9131de928eb57072b58f6ad642e8b5e2f864b1ab"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SessionStore: ClassTooLong \u2014 37261 significant lines (blank, comment-only and punctuation-only lines excluded), 1127 methods. The bar is 400 significant lines; this is 36861 over it, 93.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8847}}}],"partialFingerprints":{"codehealthFindingId/v1":"65887912bdbed4980858925088a2ac7e9b4ee0a94b3580ca1918500f998ba21a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/Sessions.swift: FileTooLong \u2014 46296 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: SessionStore (8848-58663). The bar is 500 significant lines; this is 45796 over it, 92.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c9e1d7efcc98491b80a109319044fec49ac5b93d4eafe4c07829073a4d0b7a2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaBLEManager.swift: FileTooLong \u2014 42163 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AtriaBLEManager (559-53002). The bar is 500 significant lines; this is 41663 over it, 84.33\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f19f5d56f6106fc3e830df6eba84d6b8c519de3d7674b5be474ca52fdcdf516d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaBLEManager: TooManyMethods \u2014 1400 methods, declared across 6 files: Atria/AtriaBLEManager.swift (1166), Atria/AtriaBLEHistoricalRecoveryPolicy.swift (142), Atria/AtriaStrapPowerPolicy.swift (31), Atria/AtriaBLEBatteryTransportPolicy.swift (26), \u002B2 more file(s). The bar is 30 methods; this is 1370 over it, 46.67\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8fa6bb23cbe445e23c1f0883e2bb46bacc75e825b651977ad41e5b315a2a55"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SessionStore: TooManyMethods \u2014 1127 methods. The bar is 30 methods; this is 1097 over it, 37.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8847}}}],"partialFingerprints":{"codehealthFindingId/v1":"230a7a3a3a2c4e13b5b22b9c54bd94b5eb5808141c0fdcceee5f7a3ae197d93c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHomeView.swift: FileTooLong \u2014 10648 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10148 over it, 21.30\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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bbc252a772399f9f6d912ac05ce2bd2a4e99fcff135fbf68b9f7489029cd29b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HistoricalArchive: ClassTooLong \u2014 7987 significant lines (blank, comment-only and punctuation-only lines excluded), 215 methods. The bar is 400 significant lines; this is 7587 over it, 19.97\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"954ec6fb9c74b394a3e7e64640883a6671e3255a7c5c932962507ae4d00358df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/HistoricalArchive.swift: FileTooLong \u2014 8440 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: HistoricalArchive (3-10858). The bar is 500 significant lines; this is 7940 over it, 16.88\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d6d78971ffb0ec1e9f1fa2b2b023eb97b0bd4a6fe36ef936bf7167d0c6ffeb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaOverviewSections.swift: FileTooLong \u2014 7608 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7108 over it, 15.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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b94d6901aa1dc70de99de104ed1057997cf6594708ecff8c7431c61af887bb5b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded: MethodTooLong \u2014 requestOfflineHistoricalSyncIfNeeded runs 869 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 769 over it, 8.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13289}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc84e42b843918f0b129c0cd945b72ac5524bc1a8bcf8b22a1b3c6d2504a058"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.aggregateSleepCandidatesCore: MethodTooLong \u2014 aggregateSleepCandidatesCore runs 806 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 706 over it, 8.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":50025}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccb54997ced64d95b7492865e7369ac9c41b82f0c0a93db6a299b59adec6ec19"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaActivityMonitor.swift: FileTooLong \u2014 4003 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3503 over it, 8.01\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc28adf3ac6a5167e75ca543e652d1dcf40097abf12b7f7c5194147df3e6cc8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.scheduleFullDrainConsumerMaterialization: MethodTooLong \u2014 scheduleFullDrainConsumerMaterialization runs 745 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 645 over it, 7.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46608}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ea5eb4d9fd79814c4eb0e42cd2e067e353e4440ec5d026fe89fa926cca13b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaVitalsCollectionSections.swift: FileTooLong \u2014 3647 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3147 over it, 7.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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80dcfee713c96866617f7ba5ba69605b9c1d2adc2cfb712d108cbbefde2949e8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.runRecoveredHeartRateProjection: MethodTooLong \u2014 runRecoveredHeartRateProjection runs 700 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 600 over it, 7.00\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15199}}}],"partialFingerprints":{"codehealthFindingId/v1":"a576df949fc1281711094de08d36960311ea67424303c355e857081b26ab22dc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.centralManager: MethodTooLong \u2014 centralManager runs 692 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 592 over it, 6.92\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54164}}}],"partialFingerprints":{"codehealthFindingId/v1":"a741991eddeefd5ec56ec702ded8c9b231bd07017411c2ed7819d2ef898766fa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaTodayScreen.swift: FileTooLong \u2014 3323 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: AtriaTodayScreen (250-3459). The bar is 500 significant lines; this is 2823 over it, 6.65\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d7fe2a86c148ba05609e2df23ff50d994c0a377e8ec184ccc1e3b464d9f958e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaLiveWorkoutView.swift: FileTooLong \u2014 3056 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2556 over it, 6.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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e4bf9ab1ff1c42c3b0aa70cde0ed749c22b76d3e1193f19ee61329cb4f11d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaStressMonitor.swift: FileTooLong \u2014 3036 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2536 over it, 6.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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"021857aea0c4dc858836602ad2bc8075d798eba91848d332e770c16260c75472"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.startOfflineHistoricalSync: MethodTooLong \u2014 startOfflineHistoricalSync runs 594 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 494 over it, 5.94\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16963}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ee660961c1f17130a1d441c1c13e28a2c2cebd45f08d40dc50cddab30aa816"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: AtriaWidget/AtriaWidget.swift: FileTooLong \u2014 2829 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2329 over it, 5.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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff4feea8e81f240495f3a7006589834aa67227e4f04fa456b037db3e2596da0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4MotionTickCompactStore: ClassTooLong \u2014 2226 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 1826 over it, 5.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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a34d6589a657a5ff74a0b8cce5f7c93f1b25996986422a161d7210c470320e9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.peripheral: MethodTooLong \u2014 peripheral runs 547 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 447 over it, 5.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56686}}}],"partialFingerprints":{"codehealthFindingId/v1":"be5d9d2d1cd587ca73e0283803603c741528628f184a7531e341ca4ac7b8b4ce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WidgetSnapshotPublisher.publish: MethodTooLong \u2014 publish runs 522 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 422 over it, 5.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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e631e5155490872aeb3a9240d0492b43a9ed1703d988f64c50e6b2a925bc441"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WidgetSnapshotPublisher: ClassTooLong \u2014 2080 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 1680 over it, 5.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"8720704a59721c00755fbc90adc7723b887c16eaa1db15c01898d2ab870469da"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaTodayScreen: ClassTooLong \u2014 2064 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 1664 over it, 5.16\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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ca45a02474bb0c853f38680720a5e1e23e85448398a332819e3e08117d326a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded: MethodTooLong \u2014 resumePendingWorkoutHistoricalMotionBankOffloadIfNeeded runs 495 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 395 over it, 4.95\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38001}}}],"partialFingerprints":{"codehealthFindingId/v1":"57d1590339c6b13e3bb188cf5eb5037188ba546a85b68231004ed2b87c7e8b34"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaShareCard.swift: FileTooLong \u2014 2468 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1968 over it, 4.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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cfffb86c19bf32b3e6594c167b1a1d25c4a62d569695b51977282515c135ea1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaAnalytics: ClassTooLong \u2014 1969 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 1569 over it, 4.92\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c238128d022c5cbf1d11aa2310916b8aa1b9ef687acdb05feb9fd591009da9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HealthKitExporter: ClassTooLong \u2014 1948 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 1548 over it, 4.87\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f34ddf8379c08c966965dd2ad3b30db1f93d96fbff7e29b5da82b0a131da84"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHealthScreen.swift: FileTooLong \u2014 2396 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1896 over it, 4.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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f018f52015f9123350ac4b002bf72fe6b9ed2265be6a01b49118eaf0166ee77"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.finishOfflineHistoricalSync: MethodTooLong \u2014 finishOfflineHistoricalSync runs 473 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 373 over it, 4.73\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19222}}}],"partialFingerprints":{"codehealthFindingId/v1":"c93b7738394a5faf1a8c933c185d26d27aac3133661725d62b9c5a32b06d8302"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaHomeView: TooManyMethods \u2014 138 methods. The bar is 30 methods; this is 108 over it, 4.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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"129b3bc6fe73d9abd24317a1a4c6d3f25dc0511c093a214daf4303e062e12c84"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4MotionTickCompactStore.swift: FileTooLong \u2014 2228 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4MotionTickCompactStore (11-3175). The bar is 500 significant lines; this is 1728 over it, 4.46\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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"327d175ae8c33de8318d461a3904232e6f5b6bc841d8a90f8b5d0948bd316a69"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/WidgetSnapshot.swift: FileTooLong \u2014 2174 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: WidgetSnapshotPublisher (179-2881). The bar is 500 significant lines; this is 1674 over it, 4.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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59426a34b09891655d971af9866f7b4ddf0e9851959a8a28c5100d261e79589"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LocalNotificationScheduler: ClassTooLong \u2014 1723 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 1323 over it, 4.31\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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"e752cb86abbce3a54f99f818b89e77dc347072c4fd432f7e084d76c8ea4c5d2d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.init: MethodTooLong \u2014 init runs 422 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 322 over it, 4.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6959}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd18365905e5b8f54e5925f971e2b2d8bf9824a2d0a600e2dd12125cbaeb47a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.armHistoryOnlyProbe: MethodTooLong \u2014 armHistoryOnlyProbe runs 422 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 322 over it, 4.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40410}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de21eccef30202cd3da73ea332e83df66443eb934622ebe80d2e83268f7c809"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.validateSessionBackupEnvelopeForImport: MethodTooLong \u2014 validateSessionBackupEnvelopeForImport runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48099}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9c451d3b3c0f1fbcde93079e5c2c5f19e3ec85f4e5228c2ec9630a4a906821"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalArchiveDurableStore: ClassTooLong \u2014 1619 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 1219 over it, 4.05\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"916c96b1b288ef9a5c6afbd40077769399ccf301bea1037de7ab0cb4d4a94fb6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaBLEHistoricalRecoveryPolicy.swift: FileTooLong \u2014 1992 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1492 over it, 3.98\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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8815bb2bd65869a01b36f0637047733bbd511aabe372b6db7efafecaea83a76d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaAnalytics.swift: FileTooLong \u2014 1970 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaAnalytics (3-2644). The bar is 500 significant lines; this is 1470 over it, 3.94\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c508f5f72515e22f5dee23c42d2e199a471cea78f7b6b3a4a9a8674559f87e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/HealthKitExporter.swift: FileTooLong \u2014 1951 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: HealthKitExporter (5-2390). The bar is 500 significant lines; this is 1451 over it, 3.90\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"352d257e0c4c6ac126284dc727cb2aa93088544b58f826b1a1be22f02fff30b1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaHomeModel: TooManyMethods \u2014 116 methods. The bar is 30 methods; this is 86 over it, 3.87\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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":8877}}}],"partialFingerprints":{"codehealthFindingId/v1":"308682d4293245663c8a4d0181fd5d19e1e8d48d9d026e59bdf7d6da44535d95"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.peripheral: MethodTooLong \u2014 peripheral runs 386 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 286 over it, 3.86\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55594}}}],"partialFingerprints":{"codehealthFindingId/v1":"73955258c543d1f7aa7e9070237f49c3ffa4f576e7bda9fd270986e011ed0196"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4SacrificialFastDrainReceiptVerifier.verify: MethodTooLong \u2014 verify runs 385 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 285 over it, 3.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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9419f559e036f2651b7010d84999d043585beea1b07c0af5cb220726a95e55b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.handleRecoveredDataRecomputeEffects: MethodTooLong \u2014 handleRecoveredDataRecomputeEffects runs 384 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 284 over it, 3.84\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":18410}}}],"partialFingerprints":{"codehealthFindingId/v1":"b95333e002d61b1445a6b5b81f452d078e7b1284912977f173a4aa2bea855b94"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/LocalNotificationScheduler.swift: FileTooLong \u2014 1888 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: LocalNotificationScheduler (6-2413). The bar is 500 significant lines; this is 1388 over it, 3.78\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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba126657e896e7872bd7eb28307734a9ecb89b1610060411de442912dbfb8ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaSettingsView.swift: FileTooLong \u2014 1870 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: AtriaSettingsView (120-1766). The bar is 500 significant lines; this is 1370 over it, 3.74\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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6d53b5e8841a894f0d71e5bf54e0bf06e2e53a427a5e994e6925c80f016274"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaActivityMonitorTab: ClassTooLong \u2014 1456 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 1056 over it, 3.64\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1621}}}],"partialFingerprints":{"codehealthFindingId/v1":"686dc083d162e69b23c845944941ba7f99841062aa9fbf4fb44bddf6e89c2cf1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaIMUDiagnosticTransport: ClassTooLong \u2014 1455 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 1055 over it, 3.64\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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"790e03c2824ef36b88d2456199f06ba4fd28bcc9f3a7b95a386d0d41121f9fbe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.processHistoricalDrainEffects: MethodTooLong \u2014 processHistoricalDrainEffects runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45898}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0ec49901c32212108a8b8198576eab3a466723a2c068176824f19c6e79bf28"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4GravityCadenceStepModel: ClassTooLong \u2014 1366 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 966 over it, 3.42\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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"7072429567cd576a6f472160132fbb03f6f15640e25514a75f06941f14945617"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.resumedSleepReviewCandidatesCore: MethodTooLong \u2014 resumedSleepReviewCandidatesCore runs 340 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 240 over it, 3.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51622}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ff8885c9b4a279a9795d4add9eeec78488877f02d5487437add9a85f0018d3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.centralManager: MethodTooLong \u2014 centralManager runs 336 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 236 over it, 3.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53660}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f4f85c2e02d22a643fdddc7ba6ef173e06183f23ffb6280504821610d7c9ef"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.motionTickDayEvidenceReadImpl: MethodTooLong \u2014 motionTickDayEvidenceReadImpl runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3744}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d33bed33308ff1b4746f2c94c0abe68a3863a878ad58efe77f4d959d9ac5fe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalArchiveDurableStore.swift: FileTooLong \u2014 1622 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaHistoricalArchiveDurableStore (12-2430). The bar is 500 significant lines; this is 1122 over it, 3.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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"342db9daa270dff4ebb171fb3a9ad08ae4663e8fabbce938e281842d8fcc2fc2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.applyLaunchAutomation: MethodTooLong \u2014 applyLaunchAutomation runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24590}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79e349a89ad39b81f547c1052018b0a505d2947efcc73493eddf0ad478a305c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.logGateStatusFromLaunchIfRequested: MethodTooLong \u2014 logGateStatusFromLaunchIfRequested runs 315 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 215 over it, 3.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31247}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a89fd431222b22bc783406c62c551fccf4ce906db3c5be0dfba1d8f9cba46c4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4MotionTickStepModel.swift: FileTooLong \u2014 1524 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AtriaWhoop4GravityCadenceStepModel (231-2071). The bar is 500 significant lines; this is 1024 over it, 3.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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7a84b2209f8d148452df0ccc2edb814218d3289b4417c14a8b88b82c9e4242"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.runForegroundKeepaliveTick: MethodTooLong \u2014 runForegroundKeepaliveTick runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10681}}}],"partialFingerprints":{"codehealthFindingId/v1":"f881946a47be4b550c8b778f4c18832d5511aecd37ce1fd9950e9e62411b3f48"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaTrendChart.swift: FileTooLong \u2014 1496 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 996 over it, 2.99\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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"188f9f490ccd975581663624842bda4c77791cb3507e121508431f59cb4b3896"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SleepHistorySnapshot: ClassTooLong \u2014 1188 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 788 over it, 2.97\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59498}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a471c075b12c1f7f9c78f0b102c577c4ac06400fe03a1ff85a0681da4bd7b6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaIMUDiagnosticTransport.swift: FileTooLong \u2014 1458 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaIMUDiagnosticTransport (24-1901). The bar is 500 significant lines; this is 958 over it, 2.92\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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b61f5b1cb0f77410a437b96dc760da62e11ea121c5220a6bd9bdfefd40dd71"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaStressMonitorStore: ClassTooLong \u2014 1163 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 763 over it, 2.91\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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2886}}}],"partialFingerprints":{"codehealthFindingId/v1":"5959fb8978d5349886b8f843ede76f540dc3b106f7b9772189aed9ca3c3c3126"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaSettingsView: ClassTooLong \u2014 1148 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 748 over it, 2.87\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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"a93e9f008c32a6076d3e7d761e9299477f2caffc9165dbfe33a30d5790b03f38"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmWorkoutWindow: MethodTooLong \u2014 confirmWorkoutWindow runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34270}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce0507a8be71c032d6f886595ab67a9f7cc5d213969c24d64f03a46fd6922f6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaR10Motion.swift: FileTooLong \u2014 1384 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 884 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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"562574a2f839f867145f0f7fccc90e3a73da5527c788ebb50dc107c9f3a67b07"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalFullDrainCoverageStore: ClassTooLong \u2014 1094 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 694 over it, 2.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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"be810372ed94b0da2b43c728ec165524ecab1dc060d0e548cf9f9565daf38e82"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ActiveSessionJournal: ClassTooLong \u2014 1086 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 686 over it, 2.72\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eead153c38f8ebc360db466b3abaee107ca08fc3b5ca8c0907619adeda4eaf4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4HistoryAdmissionLedger: ClassTooLong \u2014 1068 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 668 over it, 2.67\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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"809d34d3558eac3799486e08e87a657e12cf36f91aa099e6009c0a309c501d1c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.performHRContinuityWatchdogAction: MethodTooLong \u2014 performHRContinuityWatchdogAction runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25889}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0489c8047966528ed262681ae5d48975b458a9baa2833a396742b314c075a8e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalGapLedger: ClassTooLong \u2014 1049 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 649 over it, 2.62\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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"0976f84e49598236f33602e287be04215e07364460554d5c21320725e4bd40c4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaDailyStepPresentation.resolve: MethodTooLong \u2014 resolve runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57\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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d7868f752ef53eb120e93a46b6e84c08c62b6426dcd70fe795a4378a1cf860"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.armWorkoutHistoricalMotionBankIfPossible: MethodTooLong \u2014 armWorkoutHistoricalMotionBankIfPossible runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36012}}}],"partialFingerprints":{"codehealthFindingId/v1":"5279a60efc908e4327c155c03a46da6376eb74764208cd79be6755d8b992ed4a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaStressDetailView.swift: FileTooLong \u2014 1265 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 765 over it, 2.53\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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"feadd159d12ce03bb10a63e5784b7b4ec5fbea6c1d96d6ff99c56973de46ced2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaTodayScreen.glanceItem: MethodTooLong \u2014 glanceItem runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2960}}}],"partialFingerprints":{"codehealthFindingId/v1":"644093f86229668e3cfd8e7ad0b2e0626c4a05fea291b59d6b12d7f543e746c0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalStressReplay: ClassTooLong \u2014 989 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 589 over it, 2.47\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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1276}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0d56fe5cbe41c052b04875bda41158c543b1eefc5ac082ddacb2930309ed8b5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.peripheral: MethodTooLong \u2014 peripheral runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56373}}}],"partialFingerprints":{"codehealthFindingId/v1":"304c1ffc50bf7e65e9628a3e066dcbb9dd92ee568947987dfb915c05339b75d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow: MethodTooLong \u2014 estimateQualifiedWindow runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"af3a43409babe7bb43848997643b4d269fc927a4d5e041f2084f86327abad025"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.commitPreparedWorkoutWindowConfirmation: MethodTooLong \u2014 commitPreparedWorkoutWindowConfirmation runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33980}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b0b87bade331196f4c51ec5db44572398fd5c3c7aceb80bdd3c97548744992"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.persistActiveSessionJournalIfNeeded: MethodTooLong \u2014 persistActiveSessionJournalIfNeeded runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.43\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23292}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb510559531c92cbe0877b6a7642d27e61c05d9c2cead570d20f71aa011ff8d3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.centralManager: MethodTooLong \u2014 centralManager runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.43\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53285}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d77e464797f21beaea35bc3d49be09288b53c898cae5b2f6b1c0d89320fb5ae"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SavedSession: ClassTooLong \u2014 965 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 565 over it, 2.41\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6713ce9c1cac5d0b2d3c351720ba6bca5f31da1b6fcfe98ac5328f1b5b669eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWorkoutRoute.swift: FileTooLong \u2014 1194 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 694 over it, 2.39\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2780264e42e0088ed21405fada16602832026181e18fec915e8b17dd409027b7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaAdvancedTargetsSettingsView.targetsSection: MethodTooLong \u2014 targetsSection runs 238 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 138 over it, 2.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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":2178}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dad582e3ecfb955feb83ec0cc6498f2d8a5f847e41c7443f37edfe443a9f19c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/ActiveSessionJournal.swift: FileTooLong \u2014 1186 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ActiveSessionJournal (128-1554). The bar is 500 significant lines; this is 686 over it, 2.37\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"825605b94878cb9f742069e2ed835c391a1c701a09b2b4061ccdee8eef5ca05c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.refreshProtectedBoundedRawCaptureIfNeeded: MethodTooLong \u2014 refreshProtectedBoundedRawCaptureIfNeeded runs 232 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 132 over it, 2.32\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34442}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9fb408e2972983d54384cdaa4908bc22b97864b70c52103625c53a10f20c396"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.startReadOnlyHistoryCaptureIfNeeded: MethodTooLong \u2014 startReadOnlyHistoryCaptureIfNeeded runs 232 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 132 over it, 2.32\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41909}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2419aa54c4f6922746841dabc128f842771b0fc4d11859b660c3b63850ba697"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaSleepWakeResearch: ClassTooLong \u2014 925 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 525 over it, 2.31\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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe49ca30073b720bc34bb072f4219db648aa9fc7c55d497d10cb475e6979366"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.scheduleSleepReviewCacheRefresh: MethodTooLong \u2014 scheduleSleepReviewCacheRefresh 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":36749}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6dcc772da6c11e5b468b4509b277a2b24c6cd5fe0c070db5549fe92b235749d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.continueDeferredLoadFollowUp: MethodTooLong \u2014 continueDeferredLoadFollowUp runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e93c9ee6d3a83835357520c3a89bf0066f192edee5342480eac397298ab2c6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4ExactRangeTrialHarness: ClassTooLong \u2014 901 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 501 over it, 2.25\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":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37a068cccae29cc4b5ca479191a3810ff1b43d9350a06f258f4969e19960819"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.runSacrificialFastDrainSlices: MethodTooLong \u2014 runSacrificialFastDrainSlices runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41105}}}],"partialFingerprints":{"codehealthFindingId/v1":"44dc44480256621c0be8303be361d511fd22729887bf8ba6ecbe9f5777ef0787"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.logDeepDailyRollupDiagnostics: MethodTooLong \u2014 logDeepDailyRollupDiagnostics 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53288}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dab6b27bc8738e5662f9381970e5e88ee09b14146a6458c28884ea34803ee93"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaApp.swift: FileTooLong \u2014 1118 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: AtriaApp (391-1649). The bar is 500 significant lines; this is 618 over it, 2.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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d13afc11549ac43242686f23b34592776f3b0065ca5bbce5e0c395b4ff8793e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaWhoop4MotionTickCompactStore: TooManyMethods \u2014 67 methods. The bar is 30 methods; this is 37 over it, 2.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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"667d3fe76674a3ff5b67d59b8ebab3c87a8522b2a3213807119fe33e2f32c72b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaJournalTab.swift: FileTooLong \u2014 1111 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 611 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":"Atria/Atria/AtriaJournalTab.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff71d3749b29eed24946d25c2774b9cea3a18da98203b593ed28fa87bd567fc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./validate_hrv.py: FileTooLong \u2014 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21\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":"validate_hrv.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"877d1b7f9a83169c641d31792a95b05f451240923d2c89b6f0fa2ee021ee7009"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalFullDrainCoverageStore.swift: FileTooLong \u2014 1096 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaHistoricalFullDrainCoverageStore (14-1385). The bar is 500 significant lines; this is 596 over it, 2.19\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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35aee142bb63359492fb68cac6e4e3e84f1bf067a7f24258acbb6573f59ca23"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.performAutomaticRecoveredDataBootstrapStep: MethodTooLong \u2014 performAutomaticRecoveredDataBootstrapStep runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5478}}}],"partialFingerprints":{"codehealthFindingId/v1":"5548c6d92e762ba085bf90e206ff2473e36544d08d6524d100979fea1b91325f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WidgetSnapshotPublisher.snapshotPreservingFresherStepAuthority: MethodTooLong \u2014 snapshotPreservingFresherStepAuthority runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18\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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2be83788f10e4b5ebe32e90445dbec40b720737053bd99652d523c53e3417c5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaApp: ClassTooLong \u2014 867 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 467 over it, 2.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8c9c76a0d2408c88f06c69c204bfd4707f1ee27d8a5b9f33620d77f18e9545"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistorySection.swift: FileTooLong \u2014 1077 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 577 over it, 2.15\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":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c221c1ad5e584928683dab5ef1f049bd6d4c46546609e8b871a7261594bd4899"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded: MethodTooLong \u2014 attemptConnectedRawHistoryCatchUpAfterAcceptedHRIfNeeded runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":21878}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c88edc79452e040fc64cc45b36b3b7f2a58247bda8a863df4b4ac5b0e63f40"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeMorningFrozenDailyMetric: MethodTooLong \u2014 makeMorningFrozenDailyMetric runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24454}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c60e4be64991dcb385d86a26ab0036f88a6643fd8e8751b13b4d27aa459117"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4HistoryAdmissionLedger.swift: FileTooLong \u2014 1072 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4HistoryAdmissionLedger (29-1419). The bar is 500 significant lines; this is 572 over it, 2.14\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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"212f5bfd79b81b4662999ed1890205f6c364bf399bbc0bdf7c38f7598a242488"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HealthKitExporter: TooManyMethods \u2014 64 methods. The bar is 30 methods; this is 34 over it, 2.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"18457a5ab6be799e8f73e4618c9c7acbeb6afb9c67fb0a42c7eb014f07d2635a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.peripheral: MethodTooLong \u2014 peripheral runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56116}}}],"partialFingerprints":{"codehealthFindingId/v1":"bccd98e548b3bfcf50603572e45d8d0ed642c2d9f0d3b8ad39ca5370e3016d04"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeHistoryDailyRollups: MethodTooLong \u2014 makeHistoryDailyRollups runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21843}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab37ab3161af7a00a8e83117a254b8077e001c61766a74da571046368c05208"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.archiveOrphanHistoricalIngressIfNeeded: MethodTooLong \u2014 archiveOrphanHistoricalIngressIfNeeded runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":17830}}}],"partialFingerprints":{"codehealthFindingId/v1":"6881e99b4953666ff869179dcc99560059e9c0f993452046dad16440c1151775"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.editConfirmedWorkout: MethodTooLong \u2014 editConfirmedWorkout runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35971}}}],"partialFingerprints":{"codehealthFindingId/v1":"14cf8599d7154040a510cdb3ebd52c1ef357cd2874da26b173452868e6eb52d6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaActivityWorkoutDetailSheet.body: MethodTooLong \u2014 body 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4025}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ac1702a770ef8002eaead522dec4d3f662ffe7bc405d035bb973da5ec7ffb3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalGapLedger.swift: FileTooLong \u2014 1052 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaHistoricalGapLedger (9-1503). The bar is 500 significant lines; this is 552 over it, 2.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2597f4092d93608612632e18451e15902c76d42b140bcb08cfbf80280bd5beb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HealthKitExporter.export: MethodTooLong \u2014 export runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fcc4d1bd20868f7057bd56e54f050f969af79832b47ebe39b4d0d14f2e35084"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.physiologicalSleepReviewNightDraftCore: MethodTooLong \u2014 physiologicalSleepReviewNightDraftCore 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37821}}}],"partialFingerprints":{"codehealthFindingId/v1":"37052757aedd8e329c4792d010b6b797e3b3b0197f0b0731384cfe9b0d11027e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SleepHistorySnapshot.init: MethodTooLong \u2014 init 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60294}}}],"partialFingerprints":{"codehealthFindingId/v1":"130e72b84fb9921c2583d681dcb3c2abeb89aa753863fe8f9d31b7355fe74c2f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaActivityWorkoutDetailSheet: ClassTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 424 over it, 2.06\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3724}}}],"partialFingerprints":{"codehealthFindingId/v1":"430fa6dcc584077ce96c1e4707051e2125b759a8ee2f85fa2815c1be1e2c7dce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.logBoundedLargeStoreGateStatus: MethodTooLong \u2014 logBoundedLargeStoreGateStatus 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31571}}}],"partialFingerprints":{"codehealthFindingId/v1":"f640c0b0bead60ac3754a1425021f49050650889d18835ca57c43fb76f853db0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.centralManager: MethodTooLong \u2014 centralManager runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55084}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba649fffc45b459916a3d0aa336566695c50d73e0a6e5ca28acced5c0889f716"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeSleepReviewNightForCacheCore: MethodTooLong \u2014 makeSleepReviewNightForCacheCore runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37221}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abfbeeae6f5909659c3019efd68dd4e257416c2579caf270f078c7ed3068a66"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.resumePendingFullDrainPublicationIfNeeded: MethodTooLong \u2014 resumePendingFullDrainPublicationIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":48363}}}],"partialFingerprints":{"codehealthFindingId/v1":"be45ccdf53164453793e4c533c58b441f7861429c10c96b986a4af2c34d30293"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.peripheral: MethodTooLong \u2014 peripheral 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55342}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef7a25e56519c2877021efd53df6422808cf84866a1e24b646c47b9e653208e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaSleepWakeResearch.swift: FileTooLong \u2014 1003 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AtriaSleepWakeResearch (102-1407). The bar is 500 significant lines; this is 503 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9288779713e8244144212c1e3e70429d1f26fcc42ea5c45dc3ed4ba0af08e3f5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.finalizeOfflineHistoricalSyncAfterLiveRestoration: MethodTooLong \u2014 finalizeOfflineHistoricalSyncAfterLiveRestoration runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19797}}}],"partialFingerprints":{"codehealthFindingId/v1":"7566e1e0340bf8885c3e0b097b07977e03f92230c288139e23cd08733a8d73ea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.autoConfirmStrongSleepCandidates: MethodTooLong \u2014 autoConfirmStrongSleepCandidates runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40769}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabaa3fb930eae2787ce96b20d5e398eaba8416effed4c1097eb28ec3138570b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.scheduleConnectedRawHistoryCatchUpContinuation: MethodTooLong \u2014 scheduleConnectedRawHistoryCatchUpContinuation 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":20076}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcdb369e2a2cc067386d31334b8cb4216491ce931067a2341bce40bccc37629e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4GravityCadenceStepModel.qualifiedOrdinaryBandPowerShare: MethodTooLong \u2014 qualifiedOrdinaryBandPowerShare runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97\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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"103edaf7c9465bed35dcda0c391f610d90a60714e8bb5139384d42268e1dc6cb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalDailyConsumerProjection: ClassTooLong \u2014 787 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 387 over it, 1.97\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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"a46cf6d4d4d48805fed9a10d0453291af81f07d28faf656f16d77b423699cc38"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaHistoricalArchiveDurableStore: TooManyMethods \u2014 59 methods. The bar is 30 methods; this is 29 over it, 1.97\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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4042758d305bc3336e9ab5f9303f6b5bd39dee4cf8bbdb07dacba9f51b5f81"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SavedSession: TooManyMethods \u2014 59 methods. The bar is 30 methods; this is 29 over it, 1.97\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e2c2111681fd2c462cff4852d681f828b82b4a40891488530c7b99d4be37b0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/DailyRollupStore.swift: FileTooLong \u2014 973 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 473 over it, 1.95\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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85c24c62179ebfc25feca2ed828cad4b03f5022113b5d8d8ad9499776478ebc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.scheduleLongWearSupervisor: MethodTooLong \u2014 scheduleLongWearSupervisor runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25154}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda981b42097462d0a74666e955dd405f8e5df74e625505a30fa901ebb399f0d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.sendCommand: MethodTooLong \u2014 sendCommand runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33373}}}],"partialFingerprints":{"codehealthFindingId/v1":"74bf206c92db2cbce6c73fc9d34c8dc11bd5774097d2b2339a43c006345b5afc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalAggregateReader.streamedWholeArchiveDigest: MethodTooLong \u2014 streamedWholeArchiveDigest runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90\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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"789373d5ee733e5b33a0da303d9db713df113cc4df42b7ecd4659483f123e043"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4MotionTickCompactStore.latestNightEpochFeature: MethodTooLong \u2014 latestNightEpochFeature 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa57869b5f23e9bf5543859aea97ef22b3034040b5f345698cdf799b89656749"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.compactHistoricalArchiveIfUseful: MethodTooLong \u2014 compactHistoricalArchiveIfUseful 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28569}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1a20c39835b2f58d8de8733825136f479ec9fe34590f23fe152c0c8d5b5a18"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.handleSacrificialFastDrainPayload: MethodTooLong \u2014 handleSacrificialFastDrainPayload runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43423}}}],"partialFingerprints":{"codehealthFindingId/v1":"16035884917a8987217ff0d14ce8d41c8288785d74df10c8557208e4a61ea124"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaStressMonitorStore: TooManyMethods \u2014 56 methods. The bar is 30 methods; this is 26 over it, 1.87\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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2886}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a850f2a7d2f4dd4e27dbb9cd0f4ef859491820ac755f58a56732c95e4c3ea6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.prepareProtectedR10CleanOwnerAtLaunch: MethodTooLong \u2014 prepareProtectedR10CleanOwnerAtLaunch runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5076}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2da1b7f50649ae6536dd62f47e41f60b425d610bbaae3ce5e3ff7c3b1e87fbf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalVerifiedConsumerReader.readSource: MethodTooLong \u2014 readSource runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83\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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6da447795c35fd8137151974d67c716fb14bfce74adba539532fbeb1587fba7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaTodayScreen.body: MethodTooLong \u2014 body runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83\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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"096c7dd952915f58c8a21d9247b1d4589727269e7e473001a3d11d63456dbd09"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.evaluatePendingWorkoutHistoricalMotionBankOffload: MethodTooLong \u2014 evaluatePendingWorkoutHistoricalMotionBankOffload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38805}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfe8af32b91798f175829141428d56389575c83126d9e30902293282f2aea14"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.applyEarlyHistoricalLaunchConfiguration: MethodTooLong \u2014 applyEarlyHistoricalLaunchConfiguration runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7773}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c0d23206de3d11dedee3c4ec3cd85f78e3f65722c03bdcd6507b72dc4e83bf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4ExactRangeTrialHarness.swift: FileTooLong \u2014 904 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4ExactRangeTrialHarness (19-1175). The bar is 500 significant lines; this is 404 over it, 1.81\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":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1418489980089fa258607551dbd6a46716b3f8cace701d03b4ab949f9f7730d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaLiveWorkoutView: ClassTooLong \u2014 723 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 323 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2505}}}],"partialFingerprints":{"codehealthFindingId/v1":"887e60002fb3c718437939d5adab360071ccf97a139ecc732681a156e592176c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWidgetEntryView: ClassTooLong \u2014 718 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 318 over it, 1.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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"824cd959c9c2b20164330c6d3d8491dc11e090458f7145919c3f33ce6bb2d806"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WidgetSnapshotPublisher.liveWorkoutPatchedSnapshot: MethodTooLong \u2014 liveWorkoutPatchedSnapshot runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74\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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e861da4cbc31532db1aef20dc3228ef5422d733c28a75dc99cb8f4f034811aa9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalSleepWorkoutProjections.swift: FileTooLong \u2014 868 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 368 over it, 1.74\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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95734bbf8dcc6d529bd8f7f6b2d24138e44fe808bcfd2cf29c4db6c63442593"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaTodayScreen: TooManyMethods \u2014 52 methods. The bar is 30 methods; this is 22 over it, 1.73\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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecfddd51a96aba38ca4bcd88805d4cc90753fd1cf0186bb9c9190fc104d57d2a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaOnboardingFlow.swift: FileTooLong \u2014 865 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 365 over it, 1.73\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":"Atria/Atria/AtriaOnboardingFlow.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd123daa6d3ebffc35fc20947d99d7b74ba1ae41d779ffe26a3b19e56e237bd0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Recovery.estimate: MethodTooLong \u2014 estimate runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2000c55275815645aa4a134f9c14734cbee95704c26300d36375331c63a5e71"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaFullFidelityColdSessionStore: ClassTooLong \u2014 680 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 280 over it, 1.70\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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb6a8f8988c7444ab396a5d01b29846c3cdf7a35fe33c32e96cc83903aba5e3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.centralManagerDidUpdateState: MethodTooLong \u2014 centralManagerDidUpdateState runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":53006}}}],"partialFingerprints":{"codehealthFindingId/v1":"612b328ffb52180e51b9b2cfd9869f14a556790feda80f20fddd32595ea29313"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaPhysiologicalCycle.canonicalMainSleepsCancellable: MethodTooLong \u2014 canonicalMainSleepsCancellable runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6965e7dd5158c9b62710dcfa87181240e8805dfcf7c679492635487f2b0b348"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaLiveWorkoutTRIMPAccumulator.metrics: MethodTooLong \u2014 metrics 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39aeaa7733b95d84e89b2cc390d168c0e73fc5f420368401b363f09d25b1900"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaApp.body: MethodTooLong \u2014 body runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68\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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f17d5b74f81390fe55d1e2490b358a36ce3eaa0c3526fcc6f934f7a14dc09cb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.init: MethodTooLong \u2014 init runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":25245}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda833b12c9d30451bc8f9d5f9f720a60370b46f21caf6bc0b37ffdab442a004"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WidgetSnapshotPublisher.durableStepPatchedSnapshot: MethodTooLong \u2014 durableStepPatchedSnapshot runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c8ecd1a6d1b24b2e7d122aa3878fa1540f7a8ca5c40997a22f40fdff00bcd8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4MotionBankCoverageLedger: ClassTooLong \u2014 664 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 264 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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee605b36ca51d0bab9c65f51e1eaec21c32291e9df768e1b0e330a7361d372d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHeroConnectionSections.swift: FileTooLong \u2014 828 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 328 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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b00b011bac3afe7e6e3907c749d2b6ac885af72d0734479646765901f753e71"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.prepareRecoveredProjectionInstall: MethodTooLong \u2014 prepareRecoveredProjectionInstall 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14991}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c252b246cd039f11f14a650174774a3079712de2f53ab692cdf6b451fe1cbe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaStressMonitorStore.update: MethodTooLong \u2014 update runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64\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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":4275}}}],"partialFingerprints":{"codehealthFindingId/v1":"20de4c9290c43a383a49ea57e255550cb8720fccddb76fd490149480e34dc97f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.scheduleCurrentCycleSleepReviewAdmission: MethodTooLong \u2014 scheduleCurrentCycleSleepReviewAdmission runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40167}}}],"partialFingerprints":{"codehealthFindingId/v1":"a72ba226bf11900076ae1d486ecab64a473a743f847d00dd03ff6c03726d6338"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalLongTermRollup.swift: FileTooLong \u2014 819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 319 over it, 1.64\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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2ce365d056374fcfa595c3c0ebea7a2f596bad9168ae8bd03abd4335023398"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.settleConfirmedMorningAuthority: MethodTooLong \u2014 settleConfirmedMorningAuthority runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":57826}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8a1be1fe26233e086cca8fc4f706d2febb1262343f3dc69a46f78c17131761"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaR10MotionPipeline: ClassTooLong \u2014 648 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 248 over it, 1.62\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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e634dfd9e32c233ec9ee5ba667f08266b6433ebbb9766321526b2a613ba673c6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.startOneShotHistoryTrimIfNeeded: MethodTooLong \u2014 startOneShotHistoryTrimIfNeeded runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41546}}}],"partialFingerprints":{"codehealthFindingId/v1":"334959dd764ee295b487a1d1eee378f2166e59317da74d16ad1f633bb92f3fbf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Night.reconciledHROnlyDisplaySegments: MethodTooLong \u2014 reconciledHROnlyDisplaySegments runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59825}}}],"partialFingerprints":{"codehealthFindingId/v1":"886c8c85413d69b771c97e1c79a6d44ff592c541070deefdd1acf102bf6a7488"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaResearchBundle.swift: FileTooLong \u2014 807 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 307 over it, 1.61\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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4882e071cbad09b351110073c7f2ba840cef1a0c50b0601b60e70881d5f61677"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalActivityProjection: ClassTooLong \u2014 642 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 242 over it, 1.61\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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1894c10ef48a0038d5dc5332a213cf89bb8086af6aba8671b4f1aef7c86b44"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.scheduleConfirmedWorkoutStepEvidencePublication: MethodTooLong \u2014 scheduleConfirmedWorkoutStepEvidencePublication runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20190}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd4afd7b5db69fc2e79da9263fe2bd5c87c2eb11404fef915398f5598c36b4a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.sendWorkoutMotionActivationPair: MethodTooLong \u2014 sendWorkoutMotionActivationPair 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39764}}}],"partialFingerprints":{"codehealthFindingId/v1":"09724317cd0231225088c1f639b9963f78dd0f396a6ab2ddbaf83861aa2ec85c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.scheduleTerminalConsumerMaterializationIfAuthorized: MethodTooLong \u2014 scheduleTerminalConsumerMaterializationIfAuthorized 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49004}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f47019b35c4ae3367bbe1e793fc979f256d9dd3688fa74c31f31de58ccab14b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalStressReplay.evaluate: MethodTooLong \u2014 evaluate 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2125}}}],"partialFingerprints":{"codehealthFindingId/v1":"a235259499b68a2e723dede3a5339920c48c8f06dff7a75e820e84f30c3ab8e4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.mergeDailyMetricHistoryCancellable: MethodTooLong \u2014 mergeDailyMetricHistoryCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23768}}}],"partialFingerprints":{"codehealthFindingId/v1":"18045b1af67e0430ed18c0823f0ece28834202dbfc67a3883937b303793e8d1d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.motionQuiescenceRefinedBounds: MethodTooLong \u2014 motionQuiescenceRefinedBounds 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49726}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e94c87f71b0bc5c98569aab311ea796e833b7cb7eb420164f87cfccb4078d27"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalAggregateReader: ClassTooLong \u2014 632 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 232 over it, 1.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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f287ffd9a5294d64336b0a8353486aaa62ebd693724974182dd93074caaae55"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.readAutomaticRecoveredDataBootstrapCheckpoint: MethodTooLong \u2014 readAutomaticRecoveredDataBootstrapCheckpoint 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4725}}}],"partialFingerprints":{"codehealthFindingId/v1":"0011b3aaa2f949e44e7215413dcabafb0eb76642ae8ced7bbd808a11aee70463"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.compactLatestNightSessionSlice: MethodTooLong \u2014 compactLatestNightSessionSlice 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38605}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ff553b4c50b5bd4bca6c20c49e4d21d94a2a172561a4754ab48c51e83b13dd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalDailyConsumerProjection.swift: FileTooLong \u2014 789 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaHistoricalDailyConsumerProjection (8-996). The bar is 500 significant lines; this is 289 over it, 1.58\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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c10f2dad6f69f02d8b351e2793a45d1db5474dc7e495a95efc27b36aac73fc1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.sendProtectedR10ResponseEventDataSequenceIfReady: MethodTooLong \u2014 sendProtectedR10ResponseEventDataSequenceIfReady runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15640}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e694e494d0ebf4f8c915c982c88a0ff65da2fe6bebc28048b7e91bffbcda706"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.restoreRecoveredDataMutationSnapshot: MethodTooLong \u2014 restoreRecoveredDataMutationSnapshot runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":17595}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0820ba61528668c595cb43775cafe6e65227b13ca818b668b3813b189a7b40"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.legacyCompactArchiveDisabled: MethodTooLong \u2014 legacyCompactArchiveDisabled 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10644}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6bcc56d35e060b54497c48c1d1614161858bdc0fdde579106d44d1a985806c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaLearnedInsights.swift: FileTooLong \u2014 768 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: AtriaLearnedInsights (233-1014). The bar is 500 significant lines; this is 268 over it, 1.54\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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62a4b8c53de7b8e1dca005b1fa8019bc8c90721f9adba263f310b98bb75ad3c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalFullDrainCoverageStore.validate: MethodTooLong \u2014 validate runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c884bd454e81c96dfc164c7cce72c8f267f17433418839265475d06dda3369"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaSleepHypnogram.swift: FileTooLong \u2014 764 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 264 over it, 1.53\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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8bdb5b37c57b8e41b13df41a173c232129db34665d716b6f67a61613bb91aaf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmSleepHistoryNight: MethodTooLong \u2014 confirmSleepHistoryNight runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38198}}}],"partialFingerprints":{"codehealthFindingId/v1":"7837c5a1b860172c07ee68715673ac1dec57f1253e4e5c77c73198f8691991f5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeHistorySnapshotsCancellable: MethodTooLong \u2014 makeHistorySnapshotsCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20953}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9df3c91e7f144ec0ddaae0b8527da89ee1ba5a198e3ba12faa6827a230c5d4d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaLearnedInsights: ClassTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 202 over it, 1.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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fba35b9b44d7924e663b082261780b41e6f6c599f4e9da2d99882d326dd2b29"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AutomaticRecoveredDataBootstrapCheckpoint.init: MethodTooLong \u2014 init 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9da9e49b84d9fe73d1ee665410a5d14f0db39121b339787ac2ef1aedb061bf"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalConsumerProjectionCoordinator: ClassTooLong \u2014 599 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 199 over it, 1.50\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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"44931fbf1cbe73dfcc473224b94b5a695c85fe0e92f7f9025505103dce96a85c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.evaluateWorkoutMotionLease: MethodTooLong \u2014 evaluateWorkoutMotionLease 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39514}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca6457135130719acf082ec77e1fbfe2da86d06b1e08dd4e802ed11722428ad"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalRetentionTransaction.commit: MethodTooLong \u2014 commit 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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"141cdf13491d468dd48d97c15f38d1ec379466fbb85ec075ee713f7b54faca71"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.requestDeferredLaunchCardSettlement: MethodTooLong \u2014 requestDeferredLaunchCardSettlement runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":57572}}}],"partialFingerprints":{"codehealthFindingId/v1":"72addee86e330fa3109d7715a66a57dd2e0c59bcc2803c43f34ffedc40909c9a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeDailyMetricRollupPreparationCancellable: MethodTooLong \u2014 makeDailyMetricRollupPreparationCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec79eaf4a1411109a229057fae484b894841328c59801f24e242e09e14401b6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmBestWorkoutCandidate: MethodTooLong \u2014 confirmBestWorkoutCandidate 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33666}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b71714e9a00359e9cd0970e3003059bc2b354ce14db7338ca70052093869554"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaDailyStepPresentation.swift: FileTooLong \u2014 733 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: AtriaDailyStepPresentation (135-899). 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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee3ae7160284fd267a65d906124ac47df1b7492ce7dcf9810343165e4dde9d4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaSleepWakeResearch.epochFeatures: MethodTooLong \u2014 epochFeatures 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cd10480c7509436cfc582b8602afef60fb217397ae0d3721e0910a02b430af2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaManifestedColdSessionCompaction.compactAndRetire: MethodTooLong \u2014 compactAndRetire 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1cdfad2462bd01e24cba01d375b8fea2892f7d2a677303208901cda231b9fc8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe: MethodTooLong \u2014 scheduleBoundedLegacyCurrentCycleStepMigrationIfSafe 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":12099}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea659440c2f47f64c883b6c371ee28066781884828e2929f695a15c98892f19"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.prepareConfirmedSleepSave: MethodTooLong \u2014 prepareConfirmedSleepSave 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":45283}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03a5974c9551eeff680b3ab498dd92c92b498c04c1d88add05a99c28776ef9c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.workoutReplayWindowSummaries: MethodTooLong \u2014 workoutReplayWindowSummaries 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47702}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1938a45a3b70556c1573243f51a22a143a1f5e83530cd37167c3962cc9ae982"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.logSleepValidation: MethodTooLong \u2014 logSleepValidation 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53559}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f72a740424ea31ab2da75d0c159ca4db3ae609a3e85fa087e8c1461d5d360a6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.completeHistoricalACKAcceptance: MethodTooLong \u2014 completeHistoricalACKAcceptance runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":49388}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a82c4022ecc4eeb31868d45cba766116490f5d02455c5f54b9ee49a8283fe81"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaColdSessionMigration.migrate: MethodTooLong \u2014 migrate runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4f15a84fad3261f4e7af51f6ae855249ed4b9bfd950382a89c240d54eed927"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.awakeSplitSubClusters: MethodTooLong \u2014 awakeSplitSubClusters runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51200}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5f16119fdcc450547837239243affbc3f2bd5164c37fbaa40cb9ee72a34f26"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4SacrificialFastDrainReceiptVerifier: ClassTooLong \u2014 569 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 169 over it, 1.42\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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc23f03690a9678179d3e686247987d5ccb384319931d900755419258f77914"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalConsumerReceiptLedger: ClassTooLong \u2014 567 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 167 over it, 1.42\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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e86835f3332a74f4ffe342e1fbdd3bbe04a255aabe2a37e2210d0b4bf09605"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaGraphGrammar.swift: FileTooLong \u2014 706 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 206 over it, 1.41\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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1db9ee8b79608af9db5bbec0b2bc5229734e55c8e868db148809f259a37f17"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.drainNextHistoricalTransportEventBurst: MethodTooLong \u2014 drainNextHistoricalTransportEventBurst 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45253}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f053ec5fbb1523cf093e0f40e775c4af7983fa89a62db53ce2b6293a1f250a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ActiveSessionJournal.saveIncremental: MethodTooLong \u2014 saveIncremental 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ce4863b3f9fbbb3e1b937fea123eddacf68ffe11ba89818df6deef649989c1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaFullFidelityColdSessionStore.adoptStreamingSourcesLocked: MethodTooLong \u2014 adoptStreamingSourcesLocked 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"5db0c66c5b7185ffc2cf239901f2a9398e78da63e12e89c40900b61d5f4d5030"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.motionTickWindowRead: MethodTooLong \u2014 motionTickWindowRead 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3488}}}],"partialFingerprints":{"codehealthFindingId/v1":"930704ef1d6567b2156dc6fe3713b5a5bcfa3d3e8038e6fcf4a74e1747e4fd46"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWorkoutRouteStore: ClassTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded), 35 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e750a2e65262b4fc27188f3fca18b98439604d017c17380e021ebb040863ea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4HistoryArchivePipeline.prepare: MethodTooLong \u2014 prepare runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39\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":"Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33e47c97b1c4e0c1ab46dc0b4a4038348875cac821e618a91fe29ea0ddb5ed4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.snapshotSession: MethodTooLong \u2014 snapshotSession 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51508}}}],"partialFingerprints":{"codehealthFindingId/v1":"bedf68785afcccd9695b9f2c5b259abecc1f3abe41a555747d4ca529a19319a8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalActivityProjection.detectCandidates: MethodTooLong \u2014 detectCandidates 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b675c189898fc2a4de163103e4b8ed1a47d1b21646dcb1c405c0a7d2fbd5ec8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible: MethodTooLong \u2014 startOrResumeIfPossible 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":"Atria/Atria/AtriaOnboardingHistoryBootstrap.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"94aeeae2fcc031133f998dcc75ee74fd0079680ee94b6e0f2ff9b060052d5b38"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LocalNotificationScheduler.makeSleepReviewDecision: MethodTooLong \u2014 makeSleepReviewDecision 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"221579ab152bb197f093a9dd4aa0d1eca2313944e1fef75b1ea17a2aa5127f8b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaFullFidelityColdSessionStore.swift: FileTooLong \u2014 682 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaFullFidelityColdSessionStore (13-940). The bar is 500 significant lines; this is 182 over it, 1.36\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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8b554ff5e50aa5fbb7a87b92e1404583de8333415e53eb9fc81c3ab1f7709b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaLiveActivityCoordinator.swift: FileTooLong \u2014 680 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: AtriaLiveActivityCoordinator (224-967). The bar is 500 significant lines; this is 180 over it, 1.36\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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b903b48e81ccacaed6d25e58838c6bfd9734f0e9a0c4377b5a91a7a4d8a31a5f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.kickZombieProprietaryStreamIfNeeded: MethodTooLong \u2014 kickZombieProprietaryStreamIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":9973}}}],"partialFingerprints":{"codehealthFindingId/v1":"853af72c2b2d2dacf96ae86114c799ca740585bd3a6a2877ac634df49d6c7798"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.aggregateWorkoutCandidatesUnshared: MethodTooLong \u2014 aggregateWorkoutCandidatesUnshared 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49141}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d1e95bf94e3f78c374d482c8e5694d917a41d4d9186778754c8084d73d43dd3"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4MotionTickDailyStore: ClassTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 138 over it, 1.35\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":"Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d670df9552000eb3a5defead1876ecfe400954f8ba02c44fed3ce74fd24641"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaLiveActivityCoordinator: ClassTooLong \u2014 537 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 137 over it, 1.34\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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee3c3b32d4e6d2c1ab25c0257ed0ca59941d70467f5218c2a65d63f20f4211f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaStressTimelineChart.body: MethodTooLong \u2014 body runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b1518c3498632a89eb9750c7a34689a82e17cf4205e9ac9537e6cd2c5f39beb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaStrapCalibrationArchive: ClassTooLong \u2014 533 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 133 over it, 1.33\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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"96fd20a48a2d27f90bf7a6e8470c30edccd7689e87bb3e0a8bbec7ab57db6ddb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalAggregateReader.swift: FileTooLong \u2014 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: AtriaHistoricalAggregateReader (6-864). The bar is 500 significant lines; this is 165 over it, 1.33\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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad171c97783f8968d31f4cc40ea9403b45bfc6d266f221477c4b36e353393238"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4MotionBankCoverageLedger.swift: FileTooLong \u2014 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4MotionBankCoverageLedger (9-961). The bar is 500 significant lines; this is 165 over it, 1.33\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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4bf08fe8b0175fd7f06c35c3f236820b63060adb4badff7958dac1b1b34a2b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalRetiredReplayIndex: ClassTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 128 over it, 1.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":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4cfd5a3cf8b8529e40694287aaf47374960fa486db5ea4e3b11f0e5dca9e04"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.applyPersistedInterruptedFullDrainAuthority: MethodTooLong \u2014 applyPersistedInterruptedFullDrainAuthority runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":12023}}}],"partialFingerprints":{"codehealthFindingId/v1":"18141932ed5084f112d110cbec17b0228084c28664838fdd2f6b17304d082c25"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmMetadataOnlyWorkout: MethodTooLong \u2014 confirmMetadataOnlyWorkout runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34589}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe0e8a96b8c3865662d073c76106d0cd2e43766023aae38885779f16b4fc96ad"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalArchiveCatalogStore: ClassTooLong \u2014 527 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 127 over it, 1.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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6173464b3f108311f2201d5c2568f114c5fcc191bf0d03dfe6cac1cf9ec679"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaActivityMonitorMemo.timelineSpans: MethodTooLong \u2014 timelineSpans 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3469}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38ceb603a00727d79b96799e4d0bf30f877b65c4e6419b2bd26551c8112c96c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaAddWorkoutSheet.body: MethodTooLong \u2014 body 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5063}}}],"partialFingerprints":{"codehealthFindingId/v1":"54545a8143c76dbf77072d53c74f9135d82ecfa4cb034605671361ae91652ec0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaApp.handleBackgroundTask: MethodTooLong \u2014 handleBackgroundTask 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"99ded97ff87d9712b0635ac103ead3f7823b901d7614b791de14c59b8355c04f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.recoverRRPresenceWatchdog: MethodTooLong \u2014 recoverRRPresenceWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26243}}}],"partialFingerprints":{"codehealthFindingId/v1":"640b0b931f43b63eb27a804c083c38a8ef3be5499c4ea114c934087d288f04cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalConsumerProjectionCoordinator.swift: FileTooLong \u2014 647 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: AtriaHistoricalConsumerProjectionCoordinator (80-983). The bar is 500 significant lines; this is 147 over it, 1.29\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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8378be169b81259f01c4777510addb67bdf275474ac1f290c37c2661c9d96562"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalSealedJSONLCompression.commit: MethodTooLong \u2014 commit runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"c69da32f44a32b1bb65d816c94b607dcb9088bce5425c9381f8eda801bf0f231"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.compactRespiratoryRateEstimate: MethodTooLong \u2014 compactRespiratoryRateEstimate runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5abeb349013f8e4cbbad9c992cb00162043c53b89bce760bd9364a390ce49ee"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.refreshedUserAdjustedSleepEvidenceIfNeeded: MethodTooLong \u2014 refreshedUserAdjustedSleepEvidenceIfNeeded runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46169}}}],"partialFingerprints":{"codehealthFindingId/v1":"d09bfca0554a1a4ec59e382b8c8ce75ab6cd6ba8919bb681858987a7cf638aa0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoryView.body: MethodTooLong \u2014 body runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":58755}}}],"partialFingerprints":{"codehealthFindingId/v1":"db33e502d468b9d82875f4e42ae4bb7b2d2740f5b5f63aea60bbdf7bb3240d10"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalActivityProjection.swift: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaHistoricalActivityProjection (8-809). The bar is 500 significant lines; this is 144 over it, 1.29\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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b65563b54c0908311676ae6941a7f925dc349ed43155d3fed29fc225258c01f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaShareCardRenderer: ClassTooLong \u2014 512 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 112 over it, 1.28\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2670}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b10142c019397972ded7c48acad2f88d38c513cfc80584c9ba7f7c118d520f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.recoverAcceptedHRWatchdog: MethodTooLong \u2014 recoverAcceptedHRWatchdog runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26490}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf45434fc816d162a77f7df61f5f361a69966395c30536c4a9aeb478bfb5e26"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalAggregateReader.loadPage: MethodTooLong \u2014 loadPage runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"0978e9b7c3f6420424a866ee7b025cf4b8989e5a0521b3e69b41a06e0e7f5555"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaBreathworkSession: ClassTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 110 over it, 1.28\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":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e9452d749401cc2da1de2429f39b2d45544b9e722aea2360519175d29e1111"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalVerifiedConsumerReader: ClassTooLong \u2014 508 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 108 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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"797786aa17a90c1e5cb31f7d73c4395935ab3b48d11629b2af658af378e4ebae"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.observeProductionHistoryCursorRange: MethodTooLong \u2014 observeProductionHistoryCursorRange runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42566}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d185250beacf76c9ab74f87bb89e341061c3a875e00d949009c5fc1fdc71b6e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection: MethodTooLong \u2014 motionTickDayEvidenceProjection runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2252}}}],"partialFingerprints":{"codehealthFindingId/v1":"37ff87ca90006221b86ae7cc7d00243d1376aa1ba9a79862fa85ae3e93457369"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.logExecutionPriority: MethodTooLong \u2014 logExecutionPriority runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":31979}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ba64fd5c57e31c72d15aaaf91a711ef048cdc4ed73703223565261cbec087c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaHistoricalFullDrainCoverageStore: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"c069398718bd652e67dac79c0b5c3ed7a8673b0d65987461c11c1a2b68dd6455"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaOnboardingFlow: ClassTooLong \u2014 506 significant lines (blank, comment-only and punctuation-only lines excluded), 18 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":"Atria/Atria/AtriaOnboardingFlow.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"9160756394d57ab7abac492de7c51a7bde610c62b6c4832a128ada662df84a5c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.startReconnectWatchdog: MethodTooLong \u2014 startReconnectWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28655}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff6cd37123350ff11c2a034d5b95ed9fb27aa60b2bb868f12861ae321e760ad"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.acceptHeartRate: MethodTooLong \u2014 acceptHeartRate 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31145}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7930b9e519776ee8844256fccb3d17ffbc749bc02e7b87b7beb5969cfb4382"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.handleUnknownProtocolPayload: MethodTooLong \u2014 handleUnknownProtocolPayload 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43712}}}],"partialFingerprints":{"codehealthFindingId/v1":"202eb87c15ab3a67d57f441bac7bfa412c68b73e7b8d099f0a231a9f073a5e79"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaDiagnosisReport.discrepancies: MethodTooLong \u2014 discrepancies 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":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b7980c149e11decaf18bd4a98d19045e371236853e6f11031c44ee7f6fd3565"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.homeSavedAggregateCancellable: MethodTooLong \u2014 homeSavedAggregateCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27053}}}],"partialFingerprints":{"codehealthFindingId/v1":"85963c55e269a42cd50f52d33cbcdb4b4fe781fdcba03cf00fa2217652309297"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeBehaviorCorrelationSummariesCancellable: MethodTooLong \u2014 makeBehaviorCorrelationSummariesCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47378}}}],"partialFingerprints":{"codehealthFindingId/v1":"0251aa14ee68a68c4b80d18280d5b2a01a3020c7184bbe45367166f464817684"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ActiveSessionJournal.applying: MethodTooLong \u2014 applying 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"928c997400cdcc99ac9a1e0471402381c89c9e860aa339f72bcf43f4bc98fafe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaFullFidelityColdSessionStore.persistLocked: MethodTooLong \u2014 persistLocked 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d20e49c41cb2072b3089aadd97d29684f979b7f2936eef8b038fb03291a643"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaStrapCalibrationArchive: 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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"8206845c061df8d5203f8682f15a3c5cc64fff11e719edaebe471024335872b6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.resumeProtectedR10FromRestoredCache: MethodTooLong \u2014 resumeProtectedR10FromRestoredCache 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16487}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f82c2a256931e94b7191b3e2245da1de443ff8a92dde9378fe648576de44ba"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt: MethodTooLong \u2014 markCurrentPrefixArchiveDurableWithReceipt 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb53c4126f63c4681b984e56b4c75d3a57a3d0862781b681bd554ddd98b518e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaSharedUIComponents.swift: FileTooLong \u2014 613 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 113 over it, 1.23\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":"Atria/Atria/AtriaSharedUIComponents.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98245419b18dc1610f926de134566713642648eea8a05c12b4730c0860e1559f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.gate4DailyBankRearmPolicyInput: MethodTooLong \u2014 gate4DailyBankRearmPolicyInput 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36640}}}],"partialFingerprints":{"codehealthFindingId/v1":"463feacadd13543bac2eb83778a267875bff3d38554ec85dd64dbac7dcfc0cb6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWhoop4HistoryDrainState: ClassTooLong \u2014 486 significant lines (blank, comment-only and punctuation-only lines excluded), 20 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":"Atria/Atria/AtriaWhoop4HistoryDrainState.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"61caf4d94f52c839188cf623edbceec49565b95bc8941464952a06a8c0134df8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalArchiveCatalog.swift: FileTooLong \u2014 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AtriaHistoricalArchiveCatalogStore (113-849). The bar is 500 significant lines; this is 106 over it, 1.21\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f751e9d40f8b521532f8432b7425f21cb61dfa289eb74053bbe96cdac0d78fd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaActiveSessionRestorePreparer.prepare: MethodTooLong \u2014 prepare 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":"Atria/Atria/AtriaActiveSessionRestorePreparer.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d03793c6eab099403a573737e17457c574ea019a5974e8168492c2eaf6c141"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.armConnectedRealtimePreservingHistoryBudget: MethodTooLong \u2014 armConnectedRealtimePreservingHistoryBudget 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37410}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cd4ee3cc4303414b93f8cc9a65ff1e1a4df5b78f5998148e43a6d2c9fcc628"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalActivityInspectionProofFactory.swift: FileTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: AtriaHistoricalActivityInspectionProofFactory (302-844). The bar is 500 significant lines; this is 102 over it, 1.20\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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a427b2a6bba8e431ebc1151a085885631153f37e4ca25ffb8a2a364bc5c822b1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaWhoop4ExactRangeTrialHarness: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d1c0e04e1498d9b9cf02b8ad1c82cb9239a7baf9c4e37adbcf9868ab695f92"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaDiagnosisReport: ClassTooLong \u2014 480 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 80 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd290f211d28c8118c7fca47fe73648e7aaed019c42a3205cd529d529146709f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeHistoryTrendSummariesCancellable: MethodTooLong \u2014 makeHistoryTrendSummariesCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22456}}}],"partialFingerprints":{"codehealthFindingId/v1":"225d05185b7d250ac7e1b31255edca5a38c3eb4f0e5d952867a65e972fc00d0d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.mergeDailyMetricHistory: MethodTooLong \u2014 mergeDailyMetricHistory 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23591}}}],"partialFingerprints":{"codehealthFindingId/v1":"9477960fa1b36bd0a48ba721176406bfa00c3a3578ae435274730ed108df299c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWorkoutStartSheet.body: MethodTooLong \u2014 body 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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1728}}}],"partialFingerprints":{"codehealthFindingId/v1":"38552826ee703c72dbf192a4ce88855e57fcefe55d89a3db53fc5c907c7f2c9a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeCompactLatestNightSettlementPreparation: MethodTooLong \u2014 makeCompactLatestNightSettlementPreparation 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38919}}}],"partialFingerprints":{"codehealthFindingId/v1":"97bcbc2899955a34d55bf72bf7dc61085b1a24ed5379cd35659029b955c6730e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmSleepWindow: MethodTooLong \u2014 confirmSleepWindow 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42634}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ad98c0a2b03f3eef7d4731ac72d8b1a993b9b540401e559c9bb4c2e3d2ffe7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.confirmedSleepRespiratoryRateCore: MethodTooLong \u2014 confirmedSleepRespiratoryRateCore 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43488}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a8fcc7ab099d800baf61ec70249b834ad286b8ceda9e879d74c58fe2fcb3a9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaTrendChartCard: ClassTooLong \u2014 473 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 73 over it, 1.18\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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"af71e3409152d80c5696846f6ba82326a0a79bd45b4e7e268b332f960862c39d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalArchiveDurableStore.init: MethodTooLong \u2014 init runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85e96d0ca990232b05125085586b0a793895dddd8e580e7abee1a7f7f1aa47b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaRecoveredMotionProjection.projectCancellable: MethodTooLong \u2014 projectCancellable runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"91353aae4126729da30d18bce1ea97ac45b7f002d2e132d0f9ed1f18533ed56d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaSleepWakeResearch.stageSegmentsCore: MethodTooLong \u2014 stageSegmentsCore runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"0514ca2a2cfb2561c3a4f9ecbc5ae9cd31d6fd335aa94a140fb0c0b1ee4f1615"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.readVerifiedCanonicalConsumerSourcePage: MethodTooLong \u2014 readVerifiedCanonicalConsumerSourcePage runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6122}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5c97d383a376248aa398ba19da7f789fe88ca72fc49814435328605f93b54c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.attachRecoveredSkinTemperatureCancellable: MethodTooLong \u2014 attachRecoveredSkinTemperatureCancellable runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22768}}}],"partialFingerprints":{"codehealthFindingId/v1":"32f97a6d900876c65007aaa71c5f3801201ccf5b0c5a8af4bb6128a49e1b7c8c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.scheduleInterruptedFullDrainReacquisitionIfNeeded: MethodTooLong \u2014 scheduleInterruptedFullDrainReacquisitionIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":11723}}}],"partialFingerprints":{"codehealthFindingId/v1":"04b0390f6489c8e807afd38184a8d1a66c034f66f700d6b7eaf079d8d60b2607"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.loadPersistedSessionsDeferred: MethodTooLong \u2014 loadPersistedSessionsDeferred 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56797}}}],"partialFingerprints":{"codehealthFindingId/v1":"88cf0a3c6df79560868df4ea1b3721ab535c323a5588fdd1872253598fb47b7c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.evaluateR10Liveness: MethodTooLong \u2014 evaluateR10Liveness runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34931}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cb5e0c4b786b9c05e7de67ff393db888d132544ade6bf33440499b0c8757f5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.sendGate4OfficialGen4CompactMotionSequenceIfRequested: MethodTooLong \u2014 sendGate4OfficialGen4CompactMotionSequenceIfRequested runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39304}}}],"partialFingerprints":{"codehealthFindingId/v1":"864539ea5eec63df441acc1293a57e65910814ce7db2b6d7d3b86f60bf87b14d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HRVAnalyzer.analyze: MethodTooLong \u2014 analyze runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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":"Atria/Atria/HRV.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"3931d4115c29becd07d1b18db752a8489f6d90d96288bb11afc60fb713872bcc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HealthKitExporter.writeAuthorizedSessions: MethodTooLong \u2014 writeAuthorizedSessions runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c301716b0e1c10fa20e3f5d2a816e34c9fe0eeef0df15ec9b6abe8239626f1f1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaWorkoutRouteRecorder: ClassTooLong \u2014 460 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 60 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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4ec1f8432e8f48430fa03cf41bb401e65b26375a49464c716ff94b54e236b60"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift: FileTooLong \u2014 571 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4SacrificialFastDrainReceiptVerifier (7-734). The bar is 500 significant lines; this is 71 over it, 1.14\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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1041f81340aa55105c46d7930f1581760682039c76f9c5961213ed1f440df79"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalConsumerReceiptLedger.swift: FileTooLong \u2014 570 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AtriaHistoricalConsumerReceiptLedger (10-749). The bar is 500 significant lines; this is 70 over it, 1.14\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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"422c041e57b62af46db3c72f04f2b2863d5a3c2fff33b8e749931c8e09797c00"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.stopWorkoutHistoricalMotionBankIfPossible: MethodTooLong \u2014 stopWorkoutHistoricalMotionBankIfPossible runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36884}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d8f64be9448c27a365f970710d3545169a0313eaf6dcf8355a32baf18275fe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SavedSession.workoutReadinessCore: MethodTooLong \u2014 workoutReadinessCore runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7665}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c9e3aee2729fa621ca2f75577025a43795ba66caad9d97ffa8a5c2524dbe552"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.maybeScheduleDaytimeQuiescenceReview: MethodTooLong \u2014 maybeScheduleDaytimeQuiescenceReview runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":39774}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb38214b7fdad21cdce7a9afd65b51d5aac92ffd8be2d711b32d093e444e1a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaBreathworkSession.swift: FileTooLong \u2014 567 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AtriaBreathworkSession (86-793). The bar is 500 significant lines; this is 67 over it, 1.13\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":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"697b3e6c6f91c024fa90a30a842bcd06c45702a9051ea295f806cdfc5360e48d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaR10MotionPipeline: TooManyMethods \u2014 34 methods. The bar is 30 methods; this is 4 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42b2f0031e15949e20d00120c81914978a53bce8de3146496e088739912ed11"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.startCurrentCycleStrapStepReceiptRead: MethodTooLong \u2014 startCurrentCycleStrapStepReceiptRead 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":12544}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4020baabeb3a18d1a3c8599eec75a463bb2f65d832c1d6e318a95a71db8699c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.homeSavedAggregate: MethodTooLong \u2014 homeSavedAggregate 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26910}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a99eff15f0d8c5e0c86439ef62b3ebef979ff9a7608ffcb7774dd6d65877b72"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaAdvancedTargetsSettingsView: ClassTooLong \u2014 451 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 51 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1933}}}],"partialFingerprints":{"codehealthFindingId/v1":"83209bdfee6f40aaf3665ab9c90e4e36bd5123766ddd2f353e86cc1d35302580"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaExpandedChart.swift: FileTooLong \u2014 561 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: AtriaExpandedChartView (55-679). The bar is 500 significant lines; this is 61 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":"Atria/Atria/AtriaExpandedChart.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b374765bf93fade921e4319533d3c24d326e9983758c6be7ef49ae80740474"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ActiveSessionJournal.saveLocked: MethodTooLong \u2014 saveLocked 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"7491ae9f686a4f5ba87c270cd335b54627f43d8a37d8a11a2868f9efeb6cacff"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.recordHeartRateMeasurement: MethodTooLong \u2014 recordHeartRateMeasurement 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31545}}}],"partialFingerprints":{"codehealthFindingId/v1":"521a37e3e1a5377e18223a652a9210e26a4c172ec8216a210dbbd6c1596ada34"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4GravityCadenceStepModel.estimateCoveredActivity: MethodTooLong \u2014 estimateCoveredActivity 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"0009a7458af8ddc7a43a71320ecd6bb6252edc978707ee47f9a7e29440f41e07"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.scheduleRecoveredLifecycleRollbackPersistence: MethodTooLong \u2014 scheduleRecoveredLifecycleRollbackPersistence 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":17827}}}],"partialFingerprints":{"codehealthFindingId/v1":"b178c3dfca9583b4204b281088d726aa42c2feae1a172866d53967ef173dbfaa"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeOverviewTrendPointsCancellable: MethodTooLong \u2014 makeOverviewTrendPointsCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20568}}}],"partialFingerprints":{"codehealthFindingId/v1":"53007db1db90ae3cb96cf39ca9aace310fd2a6a8fa62597528832ece0c89c791"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.handleProprietary: MethodTooLong \u2014 handleProprietary runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43176}}}],"partialFingerprints":{"codehealthFindingId/v1":"618854f536186d055718ab48acf58d80473f6fbe945f43023cb5708204826f55"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.processAdmittedHistoricalFrame: MethodTooLong \u2014 processAdmittedHistoricalFrame runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45443}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7dd13be541e1f59cda75a9699577093110c0fe7b6df6670cf578c8c8b2bb12"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaResearchBundleBuilder.makePayload: MethodTooLong \u2014 makePayload runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c74f387e98df488765f554d7e98fb58eb6b0ad30fcf8beb535739fdce3ee1a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWorkoutPromptEvaluator.evaluate: MethodTooLong \u2014 evaluate runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/AtriaWorkoutPromptEvaluator.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"884dba312c6c4510950cd58f229e06773b27e7b8c29f5445962d39bd5ac0ef77"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HistoricalArchive.exactMetricHeartRatePoints: MethodTooLong \u2014 exactMetricHeartRatePoints runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7564}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d082ef531d28401c3092ed338b33999f60c1514b0430b342faccb3488b8811"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.dailyRollups: MethodTooLong \u2014 dailyRollups runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48949}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ebeb92ba93b15134cae1bba6ee1fee4f4ae84d482b767b5b099432db1332db"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaDailyStepPresentation: ClassTooLong \u2014 442 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 42 over it, 1.11\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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"f34b0f2eb31cbc088b333e34ed4445e65852c7fadda392124e388cb642635949"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaLiveWorkoutView: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2505}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf4641d14d160dd0c018f15cf3e0933c8f1cf5e5633e051eefe402f9f31d816"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.evaluateIdleWindowHistoryDrainIfNeeded: MethodTooLong \u2014 evaluateIdleWindowHistoryDrainIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13144}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62ebd15db19ef8e3ad958d3c92d4c2e5ee5be17b61520655dd25ae73f3a0b4a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalAggregateReader.load: MethodTooLong \u2014 load 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e61398e8c0da58a753348eed722b5112ef9d7c37a047e8a060243662671287"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LocalNotificationScheduler.makeMetricDecisions: MethodTooLong \u2014 makeMetricDecisions 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"934ad30a51ab20526362e1ed8576d6cb6a2fc4f1ac04c98c0286e63499d08c16"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.recoveredSkinTemperatureProjectionCancellable: MethodTooLong \u2014 recoveredSkinTemperatureProjectionCancellable 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23037}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eac7edef5dfc9c274938a0c2a9cdbabee01c8b119fd7709cf2ea78d355d5df0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalSealedCatalogMaterializer: ClassTooLong \u2014 436 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 36 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":"Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78ed6c66b82b22a9f5c4b0c96b01f176ecf7531ea2070c6780a74cacf66f8a4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4GravityCadenceStepModel.autonomousGaitBouts: MethodTooLong \u2014 autonomousGaitBouts 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"775d62d50bd25da550e5d2df210949366a2367ec5baef2972cdcd172550e96dc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.makeNapReviewNightsForCacheCore: MethodTooLong \u2014 makeNapReviewNightsForCacheCore 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37537}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b5536a2d656413a811176a900ac7ca8fb2d0899fce9de2572d857c4ac76d26"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.restoreSessionBackup: MethodTooLong \u2014 restoreSessionBackup 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55587}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bb626ac56f086b508a5a327838675ad5094e4675bf86b3607164ad010f3a9d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaWhoop4MotionTickDailyStore.swift: FileTooLong \u2014 540 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaWhoop4MotionTickDailyStore (10-763). The bar is 500 significant lines; this is 40 over it, 1.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":"Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05a0f77ec52cf71801d3f86d30c5cdad8f9819702f22f747f7e90f53c0410f45"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaRecoveredHeartRateProjection.recoveredSessionsCancellable: MethodTooLong \u2014 recoveredSessionsCancellable 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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eece0fb9d3970f619b0f9cee888ea1f32e5ae278e31b79e28110383aabd5c93"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.completeRecoveredDataComponent: MethodTooLong \u2014 completeRecoveredDataComponent 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19685}}}],"partialFingerprints":{"codehealthFindingId/v1":"b686c3dcf5b8f79a60b914f626f92395db355a216e1466c459c34d7c0c172e20"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaStrapStepLedger: ClassTooLong \u2014 429 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 29 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7eeb22240c946e2372ab9990aeaf22ed27a57376ee975e55c00022aebe29828"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHistoricalRetentionTransaction: ClassTooLong \u2014 428 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 28 over it, 1.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"615a87429482150fcd77da944c834581127c5cb1c7878f49965f091f0b76d2b8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaPhysiologicalStressModel: ClassTooLong \u2014 428 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 28 over it, 1.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"da957d1a4ba6810a2d76a13747fdf6b4f0f5e07d3411b4f1bf8495fd1f5f832f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.requestFreshScanReconnect: MethodTooLong \u2014 requestFreshScanReconnect 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23996}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a147ea3d6a6ae6182ddf3cc22ee4a604d2dabf26c5879227d5f0b10110aeb83"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaTodayScreen.todaySection: MethodTooLong \u2014 todaySection 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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f91be5be84b46caddc8faaf624b29d76a31a3e1ce3f606594a2a38e7653879"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.dumpSleepCandidateDiagnostics: MethodTooLong \u2014 dumpSleepCandidateDiagnostics 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13216}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead0b20eee809b038a3cade3d3db186f7d8ea0f177505c0d83447c7e7516f765"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalRetiredReplayIndex.swift: FileTooLong \u2014 534 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AtriaHistoricalRetiredReplayIndex (12-694). The bar is 500 significant lines; this is 34 over it, 1.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":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"695bb5c347bc4186644ff89510e5949ef1bb61ca96f02d74e6786abcd10f752d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaStrapCalibrationArchive.swift: FileTooLong \u2014 534 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AtriaStrapCalibrationArchive (5-734). The bar is 500 significant lines; this is 34 over it, 1.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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d64a7c60fdebb5a67617bb673cf5eefef3e80fc277e2417855e83cf4e384e0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaHealthspanDetailView: ClassTooLong \u2014 427 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 27 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":"Atria/Atria/AtriaHealthspanDetailView.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f8198a52088a82eae748bc2f8857bf78ea924af36524e073455777ed545c56"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AtriaWhoop4HistoryAdmissionLedger: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fbae44a689c9fb6670e292814e99fcfaa1e23e72824236cd8859f1193113f9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SleepHistorySnapshot: TooManyMethods \u2014 32 methods, declared across 2 files: Atria/Sessions.swift (31), Atria/AtriaHistorySection.swift (1). The bar is 30 methods; this is 2 over it, 1.07\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59498}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df511331de367000d2a9a6a46ca95f9fa9764bd5f874de010fba9d42d0a055c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaRecoveredRRProjection: ClassTooLong \u2014 424 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 24 over it, 1.06\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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"851ba1e795579072ee4bfc6c7c9913fc166ad5e3d0c7acf08de82ab73a658c54"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.requestStrapStatusRead: MethodTooLong \u2014 requestStrapStatusRead 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10451}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c994383b113167924cffd6f3d68f9f694062eb6ef64316c4a5122588b756478"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.sendProtectedR10ActivationNowIfReady: MethodTooLong \u2014 sendProtectedR10ActivationNowIfReady 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15948}}}],"partialFingerprints":{"codehealthFindingId/v1":"16de8cf9eabf8084ae555e55c05b8fda9cb89aac40002cbe43d304501d25a48f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry: MethodTooLong \u2014 decodeCanonicalIndexEntry 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1651}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea64fb81fea025bc42eb0988540fbeddc62a1a719bde3a7e29171325f542b1ba"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaPhysiologicalStressModel.evaluate: MethodTooLong \u2014 evaluate 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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"db3402bce4cce6eb9b3ed84f445a6c22ba7a414204b42e2081142a2e6d51ba9c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.persistRecoveredCurrentCheckpoint: MethodTooLong \u2014 persistRecoveredCurrentCheckpoint 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16682}}}],"partialFingerprints":{"codehealthFindingId/v1":"2690b21cb32a19dcf1b989ddb8a086a6121d0d470f118c1398eba56e48339f16"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaActivityWorkoutDetailSheet.saveAllAsync: MethodTooLong \u2014 saveAllAsync runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4336}}}],"partialFingerprints":{"codehealthFindingId/v1":"e10d627285ca0df7354cfa2fbfb3d0e6d2739d9561f57711aebc1da9383e4098"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.armRealtime: MethodTooLong \u2014 armRealtime runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":40087}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3d98e0cce2cfa729a75d34c379f6d3cce8d70c1c97e87902116f7bd1df0bcc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalArchiveDurableStore.flush: MethodTooLong \u2014 flush runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa7847997e346572d61408a42a55a9018b7c906f2238a88e463978861110aea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.archiveOnlyHeartRateSegmentsCancellable: MethodTooLong \u2014 archiveOnlyHeartRateSegmentsCancellable runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27378}}}],"partialFingerprints":{"codehealthFindingId/v1":"c615973a4c5c30f9077b862e4be47b8270411ed4d8f5ef03a0c66d9986b943ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/Dashboard.swift: FileTooLong \u2014 524 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 24 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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9178ee86da72a931bf6eccee494e0f1cf2eb7e3d69b8f92c4058b60d80929457"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaRecoveredMotionAnalytics: ClassTooLong \u2014 419 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 19 over it, 1.05\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a3998d09448d8a94e2006735d8c1e4826471c62e2b673ac7f254c97ad30b4a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AtriaExpandedChartView: ClassTooLong \u2014 416 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 16 over it, 1.04\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaExpandedChart.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32feab257ba65ad60c7894cf657e19da02d71c7fcb516062b76eb0f6a94be30"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaColdSessionFacts.swift: FileTooLong \u2014 520 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20 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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d360bd8d483f92e0930594d93eafacbd6c60406c585538a7ea69c596d4e79e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaRecoveredMotionAnalytics.sleepProvenance: MethodTooLong \u2014 sleepProvenance 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e27d1fcd1eb8da8f9141218fe9fcd1b9315a88448666245585aac0e868852fd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Night.init: MethodTooLong \u2014 init 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59556}}}],"partialFingerprints":{"codehealthFindingId/v1":"62bd00e955883c8b58c57b5afb875e852b552cbb8b0629a2fa65637536c294d7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.releaseConnectedHistoricalSliceIfNeeded: MethodTooLong \u2014 releaseConnectedHistoricalSliceIfNeeded 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":18259}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d94d2096dec3807a814c07cd6d3f1918fa49170b9fad977bc1f54d797b7c08"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.reconnectToSavedPeripheralIfPossible: MethodTooLong \u2014 reconnectToSavedPeripheralIfPossible 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27965}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cfdd58a7f2ab96046ca20d8f8f13d543804bccf177597f0cb1a3cd998a8efe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaHistoricalVerifiedConsumerReader.swift: FileTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AtriaHistoricalVerifiedConsumerReader (12-659). The bar is 500 significant lines; this is 14 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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11fb80008179796995785b4f36b8532f0051fb317bbfde251fd1cad7afb8d813"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.recoverNoDataWatchdog: MethodTooLong \u2014 recoverNoDataWatchdog 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25601}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f2facf81d8afb2ae2bed8112c165810cb8c6f1093b7f582f92fd2544a2ea3c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaHistoricalStressReplay.materialize: MethodTooLong \u2014 materialize 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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"c39da7e5a377c8b7ea27560665debffa046b7ca59fdc6906e2418fae7bbd513c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionStore.commitPreparedSessionBackupRestore: MethodTooLong \u2014 commitPreparedSessionBackupRestore 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55268}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae336c32594ee6ea0afb2ba8c2f972d42b3370bde5b8e72c6f3aedfa939d225"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Atria/AtriaExerciseCatalog.swift: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: AtriaWorkoutActivityType (3-436). The bar is 500 significant lines; this is 9 over it, 1.02\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":"Atria/Atria/AtriaExerciseCatalog.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbb77cfb3791e5ee06accafe44b1426d96608356b8250b7b9e4da8da40cf1aa1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaBLEManager.reconcileCentralUnavailableRecovery: MethodTooLong \u2014 reconcileCentralUnavailableRecovery 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":29982}}}],"partialFingerprints":{"codehealthFindingId/v1":"5936a8bb0d32e1ce5bee7c25286df92fbfa9bab0d24d4ce32800587a280a6d76"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWhoop4HistoryDrainState.receiveFrame: MethodTooLong \u2014 receiveFrame 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":"Atria/Atria/AtriaWhoop4HistoryDrainState.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f07da9a70d9c48a019c5fb76ade09682d4af40125cb50ea6c3c86235b161e38"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AtriaWidgetMetric.statusText: MethodTooLong \u2014 statusText 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3653}}}],"partialFingerprints":{"codehealthFindingId/v1":"c112704661c2a65c8de53adffaee4980bcad93515750a5570c3b9ea3fe4740b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (70 shared lines): Atria/Atria/Sessions.swift:52084-52166 | Atria/Atria/Sessions.swift:52168-52246 \u2014 These two members are variants of one another: 70 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52084}}}],"partialFingerprints":{"codehealthFindingId/v1":"e67fe6bfdf7eb9811c70f87f6f82e0947f17ce3a01fca9e0f875cc286711a3f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (60 shared lines): Atria/Atria/Sessions.swift:22768-22916 | Atria/Atria/Sessions.swift:23037-23170 \u2014 These two members are variants of one another: 60 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22768}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba79d303460ca222ba382b88109fa1fd60d81247f687ceb071ec0fed88b7d316"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (59 shared lines): Atria/Atria/Sessions.swift:22366-22454 | Atria/Atria/Sessions.swift:22456-22594 \u2014 These two members are variants of one another: 59 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22366}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a096d86afe8d06d035f8c74a89a07aa3a65e6f78bf08b7c57811ec7933047c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (53 shared lines): Atria/Atria/Sessions.swift:14000-14103 | Atria/Atria/Sessions.swift:14105-14267 \u2014 These two members are variants of one another: 53 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14000}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7d21e373c2099c0a02490a7b7b54aa1c0c44ed2e345b7f46a9bf2421c0a156"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (48 shared lines): Atria/Atria/Sessions.swift:23992-24071 | Atria/Atria/Sessions.swift:24073-24186 \u2014 These two members are variants of one another: 48 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23992}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e7aa37ebc2608c788b57ebf21e673a32adfabbf7b104082b9892119a9bd5d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (48 shared lines): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:141-213 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:88-163 \u2014 These two members are variants of one another: 48 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"9136df4353922fc0d67b756d1ef98e993a3d74ab66c416014aa99e6fe5e97fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (30 shared lines): Atria/Atria/AtriaBLEManager.swift:57667-57742 | Atria/Atria/AtriaBLEManager.swift:57744-57799 \u2014 These two members are variants of one another: 30 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57667}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1afe1ef95c4fe7b6ec57ae98dfe42e7c7dee9cf622c036858cb1400398ebc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (26 shared lines): Atria/Atria/AtriaAnalytics.swift:5-55 | Atria/Atria/AtriaAnalytics.swift:57-135 \u2014 These two members are variants of one another: 26 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"184aa27238873ebc5ff73e5d52b073c6100aae810441216b99e404f989d8c36f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (24 shared lines): Atria/Atria/Sessions.swift:21351-21389 | Atria/Atria/Sessions.swift:21391-21467 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21351}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e46ac91121acb791d331d0445fac19d5e368d634b8744965672803b85efee2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (18 shared lines): Atria/Atria/AtriaBLEManager.swift:25399-25441 | Atria/Atria/AtriaBLEManager.swift:26829-26912 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25399}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3ff59788b959d505d968c4db0a7d69d3518f7d8e9333dfb81fa3ea463f510e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:212-238 | Atria/Atria/AtriaOverviewSections.swift:9850-9877 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"71cb8b5d6f4882180d15281ec0418ac4b8bfeb5b8d765ea8fce59c374f791ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaBLEManager.swift:24292-24320 | Atria/Atria/AtriaBLEManager.swift:24324-24352 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24292}}}],"partialFingerprints":{"codehealthFindingId/v1":"398c63672b332130f7c49b3cbba73d184bace906919fa9d8f0f1544e292babc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1333-1340 | Atria/Atria/AtriaVitalsCollectionSections.swift:293-300 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e29333dea28faa7b1bc0914ba3e728cafd9fcb4fb6f3b80a17238497907120"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): Atria/Atria/AtriaEventNotificationScheduler.swift:317-323 | Atria/Atria/AtriaStrainPacing.swift:18-21 | Atria/Atria/LocalNotificationScheduler.swift:2388-2394 | Atria/Atria/Sessions.swift:3395-3401 | Atria/Atria/Sessions.swift:14523-14529 | Atria/Atria/WidgetSnapshot.swift:1465-1476 | Atria/AtriaWidget/AtriaWidget.swift:111-119 \u2014 These 7 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 7 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 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaEventNotificationScheduler.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bf855761635d5c888fed0fe1c240d093e41249979a339b05618247acd3d7016"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:291-307 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:265-281 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1039-1055 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:1044-1066 | Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:55-93 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:569-609 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3bf0ab322e50d2ae11ea311915d87d1ac322087b457269d62c8b5c052de2d85"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Atria/Atria/Sessions.swift:13571-13604 | Atria/Atria/Sessions.swift:13609-13643 | Atria/Atria/Sessions.swift:14105-14267 | Atria/Atria/Sessions.swift:23465-23541 | Atria/Atria/Sessions.swift:23591-23766 | Atria/Atria/Sessions.swift:23768-23975 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":13571}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3593d5d0f31caf4078bdc8bc5c06d8a2bbe502ab902a85aa7964c42036090d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Atria/Atria/AtriaAboutMetricSheet.swift:57-70 | Atria/Atria/AtriaAboutMetricSheet.swift:88-101 | Atria/Atria/AtriaAboutMetricSheet.swift:122-145 | Atria/Atria/AtriaAboutMetricSheet.swift:164-209 | Atria/Atria/AtriaAboutMetricSheet.swift:211-240 \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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"714c99849d658fcd701d4f2c07d62f218835273d9407a0f736de69b4b6e953b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Atria/Atria/AtriaActivityMonitor.swift:5335-5446 | Atria/Atria/AtriaHealthScreen.swift:3284-3475 | Atria/Atria/AtriaStressDetailView.swift:1442-1616 | Atria/Atria/AtriaStressDetailView.swift:1764-1840 | Atria/Atria/AtriaVitalsCollectionSections.swift:3249-3381 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5335}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd87b54ab9fb3efe1cc4b8ca7543aedfd49ce99326c63fba1a336c972547a18a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Atria/Atria/AtriaSleepWakeResearch.swift:8-55 | Atria/Atria/AtriaSleepWakeResearch.swift:57-99 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1057-1280 | Atria/Atria/Sessions.swift:2055-2104 | Atria/Atria/Sessions.swift:56701-56748 \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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"6144d974b5f08fbcec0624aac3dd1bf64c642bc889116d35d41de04d55cd8f7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/ActiveSessionJournal.swift:1326-1335 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:723-732 | Atria/Atria/AtriaStrapStepLedger.swift:538-547 | Atria/Atria/Sessions.swift:7218-7232 \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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1326}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce721df544151e0e9ee442cd0ffcc79d73ae5ce297f87829f7b4fc5f591c34b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:353-358 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:393-398 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:292-297 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:351-356 \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":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce23a35a02e7396b7e62d5337eca077c865245e4fbde55d2bf1da5288b11e2b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:839-848 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2408-2417 | Atria/Atria/AtriaHistoricalRetentionTransaction.swift:592-601 | Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:529-538 \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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"14b0dff50e30941e10357a6df026faf5f3024ece95917149343c447a6d78ce62"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:480-485 | Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift:344-349 | Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift:382-387 | Atria/Atria/AtriaHistoricalReplayPayloadCompaction.swift:161-166 \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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4c8af787430818d994ddaa0959228840feb607a303c368e3540a8a47a0ef84b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:257-437 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:456-561 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:567-631 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:638-743 \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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4ef4f612dd588afce2826e25a88e2d7a9b5f427717566b8feb9a98196e01d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaOverviewSections.swift:1859-1903 | Atria/Atria/AtriaOverviewSections.swift:2504-2538 | Atria/Atria/AtriaSleepPlannerCharts.swift:521-578 | Atria/Atria/AtriaStressDetailView.swift:1079-1143 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1859}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf7506cf774ed3fc78e33bb1eb681c5e2d0f931051757c595aa81a2b29b7c16"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/AtriaTrendChart.swift:1736-1746 | Atria/Atria/AtriaTrendChart.swift:1748-1758 | Atria/Atria/AtriaTrendChart.swift:1760-1770 | Atria/Atria/AtriaTrendChart.swift:1792-1802 \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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1736}}}],"partialFingerprints":{"codehealthFindingId/v1":"5804a4071d320b196fb5dfa54430df92f084ee286e10e52d18a582c0bbc6b296"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/HistoricalArchive.swift:4594-4676 | Atria/Atria/HistoricalArchive.swift:8014-8078 | Atria/Atria/HistoricalArchive.swift:8539-8568 | Atria/Atria/HistoricalArchive.swift:8572-8603 \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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4594}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f17c9abf154ff3b7d6e155c9046693924020b0cd1f386c626c86cdad86a9455"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/HistoricalArchive.swift:5824-5853 | Atria/Atria/HistoricalArchive.swift:5892-5914 | Atria/Atria/HistoricalArchive.swift:5918-5945 | Atria/Atria/HistoricalArchive.swift:5950-5980 \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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5824}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ea32803718ad577747b45bc2edb88c4af340d096c9c68f274243be97429555"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/Sessions.swift:2416-2437 | Atria/Atria/Sessions.swift:2445-2476 | Atria/Atria/Sessions.swift:2557-2588 | Atria/Atria/Sessions.swift:2763-2786 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2416}}}],"partialFingerprints":{"codehealthFindingId/v1":"df00d14bb65355db65d3155b5294c4ffa3993cbb77ba50c05e0006ee2b527c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/Sessions.swift:34739-34819 | Atria/Atria/Sessions.swift:34829-34886 | Atria/Atria/Sessions.swift:35571-35621 | Atria/Atria/Sessions.swift:35971-36230 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34739}}}],"partialFingerprints":{"codehealthFindingId/v1":"baaf065ae4535c3b47c55a4e5dbcb08118f06934d6cf5fe9a840b6ed96a2c272"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Atria/Atria/Sessions.swift:50025-51166 | Atria/Atria/Sessions.swift:52294-52330 | Atria/Atria/Sessions.swift:52339-52390 | Atria/Atria/Sessions.swift:53559-53714 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":50025}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea3c1c47bcbd337dac8bf03248790aacaeb3de6b90bcb1ea3798a64a3af7967"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (112 corresponding lines): Atria/Atria/Sessions.swift:23194-23331 | Atria/Atria/Sessions.swift:23333-23444 \u2014 These two members are one piece of code written twice and then edited apart: 112 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23194}}}],"partialFingerprints":{"codehealthFindingId/v1":"49161e22189c800c1318b4943c4a5a45e8ffaa6d764945a4d2d960a1a561c88e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (118 corresponding lines): Atria/Atria/HistoricalArchive.swift:2306-2435 | Atria/Atria/HistoricalArchive.swift:2437-2554 \u2014 These two members are one piece of code written twice and then edited apart: 118 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"3676725f2bda3b037839d206316f0d7a0f61bfbc785e3c61ca53924189493309"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (95 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:2764-2858 | Atria/Atria/AtriaActivityMonitor.swift:2860-2958 \u2014 These two members are one piece of code written twice and then edited apart: 95 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":2764}}}],"partialFingerprints":{"codehealthFindingId/v1":"f863f2a4ff28fe0818da92af16a75cf75a719c321af44dc5108715eedbbcff0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (108 corresponding lines): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:214-339 | Atria/Atria/Sessions.swift:51405-51512 \u2014 These two members are one piece of code written twice and then edited apart: 108 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"72bbd0fe6f079a306b388542f7e403db74c6e01ac5867e0321ad327607affc6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (71 corresponding lines): Atria/Atria/Sessions.swift:33001-33094 | Atria/Atria/Sessions.swift:33170-33240 \u2014 These two members are one piece of code written twice and then edited apart: 71 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33001}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0e907ce7355c98d36177af3ad9d5ee709ef0e076054d4c2af4ad8deee38ffc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (69 corresponding lines): Atria/Atria/LocalNotificationScheduler.swift:357-425 | Atria/Atria/LocalNotificationScheduler.swift:464-556 \u2014 These two members are one piece of code written twice and then edited apart: 69 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b460d9533ddc85dfe7702e7680c27a20c671a86cc8ef3bb0ce1500194549ce5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (84 corresponding lines): Atria/Atria/Sessions.swift:41541-41624 | Atria/Atria/Sessions.swift:41626-41730 \u2014 These two members are one piece of code written twice and then edited apart: 84 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41541}}}],"partialFingerprints":{"codehealthFindingId/v1":"31647dd3a75af07e2cad4f9d784f95182dd29266f35ac97c6e189019e4747fc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): Atria/Atria/Sessions.swift:44908-44963 | Atria/Atria/Sessions.swift:44982-45033 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44908}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90881d243636b24f8b009a5320ecd3acf3b431b37096b555fbf3cf9f74eac95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:385-434 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:557-604 \u2014 These two members are one piece of code written twice and then edited apart: 48 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8901fe86ae62cbad21e1b6b1c7179de8bb0cf93d56be1da49bbcb9cb24bb172"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): Atria/Atria/Sessions.swift:33921-33978 | Atria/Atria/Sessions.swift:35020-35067 \u2014 These two members are one piece of code written twice and then edited apart: 48 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33921}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd900031100466429c8e97d4d4f6550f7ea0600e335f1ebce9b5fc1ed97fb8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): Atria/Atria/AtriaAnalytics.swift:256-304 | Atria/Atria/AtriaAnalytics.swift:306-351 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d61451f8f8dd88935d7119c21f810b59dc2b8b7312c0f1d416e55b2e4637f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): Atria/Atria/Sessions.swift:4157-4201 | Atria/Atria/Sessions.swift:4203-4264 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4157}}}],"partialFingerprints":{"codehealthFindingId/v1":"79980239fd604b90812ebe99e0839db2d600d7fa7ba6d156241c36cf1f8ad18f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): Atria/Atria/Sessions.swift:56105-56146 | Atria/Atria/Sessions.swift:56148-56189 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56105}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ee230af80ca96dafbdf6b3c9d12d99aaf67d8f6584af25f7244f29957cac44"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (72 corresponding lines): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:198-277 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:288-359 \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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"87505c38c5cc74e59c66b32a7afe4fc631914c393f6ee7c0e650613879318f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): Atria/Atria/Sessions.swift:56559-56606 | Atria/Atria/Sessions.swift:56608-56663 \u2014 These two members are one piece of code written twice and then edited apart: 48 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56559}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbbdc553828cf1cb37d9c3b6ebcfeb74a788a55e74e1c547162e9c0203ef9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Atria/Atria/Sessions.swift:9063-9095 | Atria/Atria/Sessions.swift:9102-9134 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":9063}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6941dd41404d0f5e928289e0541e1efc08a02de4198f93656905d1b4eb7b458"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Atria/Atria/Sessions.swift:54692-54718 | Atria/Atria/Sessions.swift:54720-54747 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54692}}}],"partialFingerprints":{"codehealthFindingId/v1":"80d0bcc829ea364d1f6ecbb174b057e04c8157a1aa7be782ba14229835c9f77a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): Atria/Atria/AtriaHistoricalGapLedger.swift:527-577 | Atria/Atria/AtriaHistoricalGapLedger.swift:579-637 \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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"d028bb936572180431326196a3f4ae9492662a2eaf8ed8ea386298c966d97753"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): Atria/AtriaWidget/AtriaWidget.swift:3891-3936 | Atria/AtriaWidget/AtriaWidget.swift:3938-3987 \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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3891}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55e270b23d8caed2ed397dfa4fb1ed1cec74e91971f947c66842fa99176ec73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (73 corresponding lines): Atria/Atria/AtriaBLEManager.swift:41392-41464 | Atria/Atria/AtriaBLEManager.swift:41754-41831 \u2014 These two members are one piece of code written twice and then edited apart: 73 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41392}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ccf7b1e1701d9851dc3f7c733888359bcd90776582627591cccbf73ef2e1d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): Atria/Atria/Sessions.swift:44654-44713 | Atria/Atria/Sessions.swift:44715-44798 \u2014 These two members are one piece of code written twice and then edited apart: 60 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44654}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c06d09588926eeb53ef555e93372f45ed9bc9b1e86431c5f753a211aaacd592"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:6404-6441 | Atria/Atria/AtriaOverviewSections.swift:6449-6487 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":6404}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d4bc83782f9853a003ba0ec2ceda3d37a22a95c981437ebf90746da635b6ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (54 corresponding lines): Atria/Atria/Sessions.swift:13873-13926 | Atria/Atria/Sessions.swift:13928-13998 \u2014 These two members are one piece of code written twice and then edited apart: 54 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13873}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdac9e1212a178dc76cd355968d36ba7b75d61d924a3e2738c688fa3d356c313"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Atria/AtriaWidget/AtriaWidget.swift:1216-1248 | Atria/AtriaWidget/AtriaWidget.swift:1250-1285 \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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebf56855d07ac10cdd2bf2ebd0260d22eef10fe7a3371efa497d0ab5bbd0c55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): Atria/Atria/Sessions.swift:32637-32678 | Atria/Atria/Sessions.swift:32680-32726 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":32637}}}],"partialFingerprints":{"codehealthFindingId/v1":"b508f1896c723572c6774d47e3a5d9a1819fe3726c047e315eb4164a336143c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): Atria/Atria/AtriaWorkoutOnset.swift:13-59 | Atria/Atria/AtriaWorkoutOnset.swift:72-119 \u2014 These two members are one piece of code written twice and then edited apart: 47 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":"Atria/Atria/AtriaWorkoutOnset.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1cb7134486cd270275402ef88d9f90bfaea3cec4e68a6e9dbf33ac9de5e0e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (63 corresponding lines): Atria/Atria/AtriaBLEManager.swift:52159-52221 | Atria/Atria/AtriaBLEManager.swift:52226-52295 \u2014 These two members are one piece of code written twice and then edited apart: 63 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":52159}}}],"partialFingerprints":{"codehealthFindingId/v1":"155db9d48eb8ff414e46afd81e250ff92a95dfeb6893ab5f83fdf2dd2c84da49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1611-1654 | Atria/Atria/AtriaTodayScreen.swift:4704-4748 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1611}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ad160810269b58d65f0ef64ad49caf6d56b195f80c2e7cf2b6571f2fb1076d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:4554-4595 | Atria/Atria/AtriaHomeView.swift:4512-4551 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4554}}}],"partialFingerprints":{"codehealthFindingId/v1":"2016f40b6131e8c0224eb5f17a24564d1b991a0c288eafa899b43d43f2b89391"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 47\u002B corresponding lines): Atria/Atria/AtriaHistoricalActivityProjection.swift:417-474 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:682-728 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:60-111 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98980875622fc3d091ef7583b01bee0244f0e39e1fb1c2fc121d893ab4625c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:257-295 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:295-329 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"8527323d150272068fee6ca3d9924ce65989d7eb99d76ec4d362dc9c1742072b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): Atria/Atria/AtriaRecoveredRRProjection.swift:620-667 | Atria/Atria/HistoricalArchive.swift:9568-9620 \u2014 These two members are one piece of code written twice and then edited apart: 48 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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9bf275b6349c472ad009c2b478da30d31b393a8f41bbfff098299de73a51a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaAboutMetricSheet.swift:312-336 | Atria/Atria/AtriaOverviewSections.swift:6925-6949 \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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e4d7f6adea7ebaf19920590223656e15f2e2c77ad4b2a46c0b82a662da6ce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Atria/Atria/HistoricalArchive.swift:8296-8338 | Atria/Atria/HistoricalArchive.swift:8421-8453 \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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8296}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0c7a65cb5c0f26aad32b77aac52ea65f3ecce93265eda1f047f67fd5b635d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (85 corresponding lines): Atria/Atria/AtriaBLEManager.swift:7586-7670 | Atria/Atria/AtriaBLEManager.swift:7676-7770 \u2014 These two members are one piece of code written twice and then edited apart: 85 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7586}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec51664b1838a3a44f8f682ef1f4d509306b7c1a516795974d4df6ef2505bf97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): Atria/Atria/AtriaStrapStepLedger.swift:234-282 | Atria/Atria/AtriaStrapStepLedger.swift:288-349 \u2014 These two members are one piece of code written twice and then edited apart: 49 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0354f68852e4afc88fdaf40c66e95be7b7af0f08f201286e3e5100147f3c301"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaGraphGrammar.swift:754-777 | Atria/Atria/AtriaOverviewSections.swift:9050-9079 \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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8537dbcad4c1fc153a456fc22a3e6f56529260c14cee4f0db3c3a9004f9666f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:215-253 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:220-262 \u2014 These two members are one piece of code written twice and then edited apart: 39 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"c132f6ff47f3e2d2aee2d91b8359e4f93952868526aaa116a4c8eca22b6a95fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 51\u002B corresponding lines): Atria/Atria/Sessions.swift:14531-14590 | Atria/Atria/Sessions.swift:14592-14642 | Atria/Atria/Sessions.swift:14647-14709 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14531}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bd8aac23e83036226e6ea3ac687cfd19de4c0f32df5f81855dce1a1db00cddb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:959-987 | Atria/Atria/AtriaActivityMonitor.swift:989-1026 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":959}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd78bc2de44811be61668cd7caa7e56f14bff6c61d6aaf9f982d8f1986e418e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): Atria/Atria/AtriaBLEManager.swift:26741-26779 | Atria/Atria/AtriaBLEManager.swift:26781-26827 \u2014 These two members are one piece of code written twice and then edited apart: 39 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26741}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cae5a418f08327e5f9ab17034e2dbb9588d2611bd4fddb806490d951e9c90dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): Atria/Atria/AtriaLearnedInsights.swift:524-551 | Atria/Atria/AtriaLearnedInsights.swift:598-636 | Atria/Atria/AtriaLearnedInsights.swift:638-667 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"0950d00c78714db8a54cedfbed901f644805c5c024b22f3b5928f26253a77b02"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaShareCard.swift:926-958 | Atria/Atria/AtriaShareCard.swift:1559-1582 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebbe9c446baa0378fe72363dc534154fca9395ba4ec4b9a9d9731af5690ee47f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:449-483 | Atria/Atria/Sessions.swift:43692-43731 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bfd8c7e7507c4dd2b3b02e90c6979d7be89be0eacf137f3ee7a51d332e9172"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): Atria/Atria/LocalNotificationScheduler.swift:174-225 | Atria/Atria/LocalNotificationScheduler.swift:227-270 \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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc459a82cb53af23076e4c5711f0e4928c85379bd63f7e5da60cae8b31b507ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:1259-1295 | Atria/Atria/AtriaActivityMonitor.swift:1297-1334 \u2014 These two members are one piece of code written twice and then edited apart: 37 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"df2176c763519d5269ee8817fef38445dd237005c9388665452cfc07fe1f9189"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaColdSessionStore.swift:185-218 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:753-783 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaColdSessionStore.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9234a885857152dc08bb409c515f99a9ce0d3cf44bfada1374703253e8dad19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/HealthKitExporter.swift:1497-1525 | Atria/Atria/HealthKitExporter.swift:1536-1563 \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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1497}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ec0d2483ce1a41bbb501f1e444dfd75a84ee6d2e5aa9ca68e4db09234ff2f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:469-500 | Atria/Atria/AtriaHomeView.swift:8405-8436 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"886b77fff94892c33aa00a0621913481b3141c2c6a27bf24e420261756015d1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/Sessions.swift:24795-24818 | Atria/Atria/Sessions.swift:56242-56266 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24795}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e51a4ed84cbd75241de33660a15fbb10c6e6c24153c335a49d680deb4b5d4d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (67 corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:74-145 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:54-120 \u2014 These two members are one piece of code written twice and then edited apart: 67 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a62c0afed18fba8806fa16bc43e718cee4892df54a3559fd850e259117cebb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:10847-10877 | Atria/Atria/AtriaTrendChart.swift:921-945 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10847}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09d4c01ee8a7ac1c5e6182c5dae6c101744268d1afe78a8e23d375b21681441"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/Sessions.swift:34907-34929 | Atria/Atria/Sessions.swift:34956-34981 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34907}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccee36d72bed17a35d92a13378f7d1aa97203b11b635d767c176ebeddde7e99d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaSleepWakeResearch.swift:1069-1099 | Atria/Atria/AtriaSleepWakeResearch.swift:1297-1327 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6c6960aed2b59d0fc88f057203d73786e1d5aa9307b097bb54275b4e1a7d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/HistoricalArchive.swift:9407-9426 | Atria/Atria/HistoricalArchive.swift:9428-9449 \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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9407}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a76d42d16db318a768320f9c0cf3a2bfa929addccdece4d96a29517af8fe2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Atria/Atria/Sessions.swift:972-1014 | Atria/Atria/Sessions.swift:1043-1082 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"b607e6d0e5670a22c333ed31013f2dfb02d524cb39ec9ef86b56a339a5036bd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Atria/AtriaWidget/AtriaWidget.swift:858-892 | Atria/AtriaWidget/AtriaWidget.swift:940-974 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea56daafc2a0d636c0890635c2fa61efd3716d1985ddd2b6daaca7123b936fbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:532-564 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:566-596 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"867a3f9c5d6e12eddd0ce5db73aaea22caee860b61acc05e67575d61b7ff1440"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): Atria/Atria/AtriaLearnedInsightsBoard.swift:152-177 | Atria/Atria/AtriaLearnedInsightsBoard.swift:245-273 \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":"Atria/Atria/AtriaLearnedInsightsBoard.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d4169c4b9d77143aa980b276d5f61a771cc8f69f001dcf6c29aa20360facc04"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): Atria/Atria/AtriaShareCard.swift:2760-2795 | Atria/Atria/AtriaShareCard.swift:2805-2838 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2760}}}],"partialFingerprints":{"codehealthFindingId/v1":"34942f4fb6dc33b2973d7a98583394d61cfd5a52c637cc29151b8f264ca56d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:2714-2761 | Atria/Atria/AtriaHealthScreen.swift:2763-2808 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2714}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca75738654e54c965f799369fe8218daac51cb1452e0f7a526453b83d552bb54"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 25\u002B corresponding lines): Atria/Atria/AtriaOverviewSections.swift:2254-2278 | Atria/Atria/AtriaOverviewSections.swift:2284-2308 | Atria/Atria/AtriaOverviewSections.swift:2314-2338 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":2254}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c15abe4ab7c494fcf725f9dc971eb0ec8464c59c37708b4ddffe29dfd1f2d24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/Sessions.swift:16562-16593 | Atria/Atria/Sessions.swift:16595-16629 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16562}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1bbfe13719711f2f0094289d6150ff7fb1ba5764a370742f163d9495af8acc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Atria/Atria/AtriaStressMonitor.swift:3445-3475 | Atria/Atria/AtriaStressMonitor.swift:4225-4251 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3445}}}],"partialFingerprints":{"codehealthFindingId/v1":"292b087cddf5e1af04a0224370ec18aed11e6110f332fd68395273a78f724eb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/Sessions.swift:54050-54077 | Atria/Atria/Sessions.swift:54109-54136 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54050}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ef2d49a69a929d1d72118ec7ee73ccef791eed727dc1b69b4497f723d016c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Atria/Atria/AtriaShareCard.swift:1936-1975 | Atria/Atria/AtriaShareCard.swift:2287-2340 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1936}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e31c98f877a63f6fd2a69c4f0acc7b6595d1cedf33d7e3ef1869c97a9f326c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Atria/Atria/AtriaShareCard.swift:1620-1658 | Atria/Atria/AtriaShareCard.swift:2042-2077 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9dbd110082a17493d02bc9f33a2b4d00c22f4053c32f8a4ad35ca0379d619d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:482-512 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:880-910 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8a6db732d1ee18d0062871a13f49cd8feb126a3558aa1ec62dab78407c828e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 27\u002B corresponding lines): Atria/Atria/AtriaAnalytics.swift:225-254 | Atria/Atria/AtriaAnalytics.swift:553-582 | Atria/Atria/AtriaAnalytics.swift:584-610 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f45012635146557468842632a9a7e5443d8e0d6c06dcb9e1bfadf6d86e0d67"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/AtriaCivilDayStepAuthority.swift:204-234 | Atria/Atria/AtriaCivilDayStepAuthority.swift:261-288 \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":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48327654e3dc449353a4f7045e483179d6271cbc73c67f58c63cdf00acfcff8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 32\u002B corresponding lines): Atria/Atria/AtriaShareCard.swift:1699-1730 | Atria/Atria/AtriaShareCard.swift:2106-2138 | Atria/Atria/AtriaShareCard.swift:2482-2514 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c186dca50b7558defc97fbefccc5c8045e55397c7c2ddaf53c7b026069da33"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 34\u002B corresponding lines): Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:400-436 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:438-471 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:473-506 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:508-545 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:547-584 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 34 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0187a0f052b33c3dbab19bd5516ccb03db1f2b95d0d6387b314c57de33f0427"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/AtriaHistorySection.swift:1342-1372 | Atria/Atria/AtriaOverviewSections.swift:2569-2596 \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":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":1342}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c112a25f1ae6e730d1fd6528cc4fe062e23fd8b623bd04b83ae71650a5aaba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaNightTimelineView.swift:339-373 | Atria/Atria/AtriaNightTimelineView.swift:376-400 \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":"Atria/Atria/AtriaNightTimelineView.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55c2b153ee3317db472c5c69a4842edea520d2960155bde9243a49f9b98b64d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Atria/Atria/DailyRollupStore.swift:243-273 | Atria/Atria/DailyRollupStore.swift:275-303 \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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"712d81c7ed4ef8c29a1f652d605cfceb194fb5beef03905332c39954cceea945"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 24\u002B corresponding lines): Atria/Atria/AtriaShareCard.swift:1670-1697 | Atria/Atria/AtriaShareCard.swift:2079-2104 | Atria/Atria/AtriaShareCard.swift:2431-2454 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1670}}}],"partialFingerprints":{"codehealthFindingId/v1":"637147bb16bcd0ae0c9edba1a7d4c5863e4a861e94c8b9e645e307868ea41c5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaAnalytics.swift:484-518 | Atria/Atria/AtriaAnalytics.swift:520-551 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2212a3de0860a00ef372f9ebadbb782a3f88413b6976dc9936d142f0d0610df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:359-390 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:411-442 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f849daea77a0fda06b0c2080b963d00d99d8b355b0b95c614fb1e51ac0b48d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Atria/Atria/AtriaHistorySection.swift:432-466 | Atria/Atria/AtriaHistorySection.swift:468-508 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27f1331a5323ba87f3fa7c885c2973ac05e1e3d1efccde1c11fbd69666c970d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): Atria/Atria/AtriaStrapCalibrationArchive.swift:174-192 | Atria/Atria/AtriaStrapCalibrationArchive.swift:194-212 | Atria/Atria/AtriaWhoop4CompactIMUCoverageGate.swift:118-135 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f53c97fecdff47a3f6881328eb4161b06aa1dfd5aa306d3b9ecaefba97af1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaStressDetailView.swift:1629-1650 | Atria/Atria/AtriaVitalsCollectionSections.swift:3387-3404 \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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1629}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db78c00c9f643140c9e6034489298e5a232cef287e0d419299e6b243c60df0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Atria/Atria/AtriaHighlights.swift:45-60 | Atria/Atria/AtriaHighlights.swift:62-80 | Atria/Atria/AtriaHighlights.swift:82-104 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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":"Atria/Atria/AtriaHighlights.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"21aa50101da8240565374b51583f490c4a41c4da177d2d57a9d28600ad00e675"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:3723-3745 | Atria/Atria/AtriaLiveWorkoutView.swift:4078-4100 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":3723}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c51df7ccb94e06f79c0e7b2690dff8cd7c6fe169344f78a798ea42622fcdcfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaAnalytics.swift:369-392 | Atria/Atria/AtriaAnalytics.swift:612-633 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"390a5be731708789f4d57a83bd4e01a064faec835971440d0939d4a2324f9bb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Atria/Atria/Sessions.swift:28959-28998 | Atria/Atria/Sessions.swift:29000-29035 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":28959}}}],"partialFingerprints":{"codehealthFindingId/v1":"a46e34be08aa5dfbeb720e6e077cd9f448d0ca84453c59f0ac26de9dfb2dd652"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): Atria/Atria/AtriaColdSessionMigration.swift:513-560 | Atria/Atria/AtriaColdSessionMigration.swift:570-611 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"f855791761eaffeabdad71aef30aed98ee95693f3653fd949e76e853371eccd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaSleepWakeResearch.swift:1101-1132 | Atria/Atria/AtriaSleepWakeResearch.swift:1176-1207 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a2173a8bba3d67280a830012f19cfcc81e54bc28d6f49f87c00bdbaa8da515"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1910-1932 | Atria/Atria/AtriaOverviewSections.swift:2473-2492 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1910}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c0637d7286e7a42b10ce82627dffac449e7eb5076ec19335f78c02e4fcb2e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaStressMonitor.swift:499-524 | Atria/Atria/AtriaStressMonitor.swift:1215-1236 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b957bd89440f55224b2c59fe1527476d837966f4306b70dd54e5243fb97fa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Atria/AtriaWidget/AtriaWidget.swift:704-739 | Atria/AtriaWidget/AtriaWidget.swift:743-769 \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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ac80aa09ffc9329e3ffda84e0145ef3e3eb3fe96558779660d65235726a2e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/AtriaStressMonitor.swift:2462-2493 | Atria/Atria/AtriaStressMonitor.swift:2495-2522 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2462}}}],"partialFingerprints":{"codehealthFindingId/v1":"99fb5f1a21df5620f201b59afbceded324d4fcdeb0e9a6dbddda94e14b59b87d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Atria/Atria/AtriaBLEManager.swift:44014-44046 | Atria/Atria/AtriaBLEManager.swift:44053-44099 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":44014}}}],"partialFingerprints":{"codehealthFindingId/v1":"203d9cf8af6bc77787692be9907bf53d3e3cb05c03203379071321944eda1a6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaCustomizeSheet.swift:496-519 | Atria/Atria/AtriaOverviewSections.swift:10221-10242 \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":"Atria/Atria/AtriaCustomizeSheet.swift"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"090f782663a48a3037c194e0bf1bf7762135206f2df6eb7872118cbb18725913"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:426-447 | Atria/Atria/Sessions.swift:33378-33399 \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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad21a5389619d12d12d302962f96864621c813273556ef64999f0dbc38620987"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Atria/Atria/AtriaBLEManager.swift:51343-51379 | Atria/Atria/AtriaBLEManager.swift:51381-51416 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51343}}}],"partialFingerprints":{"codehealthFindingId/v1":"5470d7a6d417b20b188579b7da850dd0a675a8823a3e34eca30dcc15a0092566"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:458-498 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:500-534 \u2014 These two members are one piece of code written twice and then edited apart: 35 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":"Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5153eca5723b25521b013e47cc88e3bd2a6a3653a1cf3653a0dd96071e4034f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 21\u002B corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:484-514 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:668-688 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1395-1418 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"92529df8134107b0ad451995ac4128ebd0e8bb5e58b5a58990a1f519c83dd7ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Atria/Atria/AtriaBLEManager.swift:28821-28856 | Atria/Atria/AtriaBLEManager.swift:28861-28904 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28821}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4f87a8c33ff440924738ceed4a4ab863ff5947f9c06180e28829d32a7ec66f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:3258-3272 | Atria/Atria/AtriaActivityMonitor.swift:3274-3288 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3258}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ae5f1a3631f855dd4701258b44bf3992f7d22786f12d119587b88155b55ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 29\u002B corresponding lines): Atria/Atria/AtriaIMUDiagnosticTransport.swift:807-835 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:837-866 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:898-927 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:929-958 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9013868b3aac5581f69be5906c2dd01f7c6389c8486ce870e86a6d24d34996c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/Sessions.swift:56357-56377 | Atria/Atria/Sessions.swift:56379-56420 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56357}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19dd52afcc27f5ed27f7f0e2687830487ae2a30bff6ac4686733868de96e91a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:835-863 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:865-892 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3153c8ee29711872d97ee8bc19133c0e72f4ee9e0e944a9432e320589ca9db9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 25\u002B corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:1025-1049 | Atria/Atria/AtriaHeroConnectionSections.swift:1087-1114 | Atria/Atria/AtriaVitalsCollectionSections.swift:5143-5174 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"9261e480f26628b48262a6d4a2b8318bfe9c3f84b478df118ae01806f8e06aac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:431-459 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:831-859 \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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c27be71708fdd8d205d1471b81a2c9be848385351a99d18403e8ab53cf459c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): Atria/Atria/HistoricalArchive.swift:8083-8116 | Atria/Atria/HistoricalArchive.swift:8501-8537 \u2014 These two members are one piece of code written twice and then edited apart: 34 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8083}}}],"partialFingerprints":{"codehealthFindingId/v1":"a157e65c27e8c52d13042a1a09bf354059605c9912aac41f3280d8f2a5017d31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaHomeView.swift:2263-2293 | Atria/Atria/AtriaWorkoutRuntime.swift:612-644 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ceebbc2a7f80df12458f6c2de296e62f26da57bad08f608fcc3bf49e7804dd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaVitalsCollectionSections.swift:1820-1856 | Atria/Atria/AtriaVitalsCollectionSections.swift:1945-1976 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":1820}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c773c41088f2cede5e0e9f57afe0369fd6ab83423309a5e8a11a448fd5d05f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:930-951 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3150-3174 \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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afe27e251c806097931808f7e15059b196a3b2ef39813d3173279d4ef9c4a84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaBLEManager.swift:31852-31872 | Atria/Atria/AtriaResearchProbe.swift:382-402 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31852}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e0072dba13d045f964dae4a3286bc73331aa6981bf6be033f631c13071644a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHomeView.swift:8252-8269 | Atria/Atria/AtriaOverviewSections.swift:550-572 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":8252}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86ecb40c91c19b81aae44f62190f8776e50e505f8c483c44b4ba3aac1aff17a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/HealthKitExporter.swift:2017-2037 | Atria/Atria/Sessions.swift:54902-54922 \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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2017}}}],"partialFingerprints":{"codehealthFindingId/v1":"20bc593a90f93087f7f9d64881d8e47df658caee05c38897e1f27ef49c270db2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaBLEManager.swift:31687-31711 | Atria/Atria/AtriaBLEManager.swift:31713-31737 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31687}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7dbf2987548aa17a79980676413f0e214c308bdae5c6d9348d80ce3d337972"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:708-729 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:300-320 \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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0a5bdb224ec1b9d115e8bd2772ae0a872e44f8e951e651ff88d61cf83060ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:1932-1973 | Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:3062-3103 \u2014 These two members are one piece of code written twice and then edited apart: 42 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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1932}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d049603ae3baeccf24e66fc0ed4eaa1b783e3fe1cac5ae949539ea87031561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): Atria/Atria/AtriaHistoricalActivityProjection.swift:252-285 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:279-306 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:308-335 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c752a948b9201fe73f8ff5435923ebba6eacc6fce07f79afbb2c434a554827"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1967-1988 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2028-2042 \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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1967}}}],"partialFingerprints":{"codehealthFindingId/v1":"73d18a286577ae5061a02ac8f6ddff48436f9cccd3c8c33a1e33f20a0a932c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/Sessions.swift:42064-42091 | Atria/Atria/Sessions.swift:42093-42117 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":42064}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fd2b46151d93f2e894c711400689b9ba93264c5dfb312093d7e7c80ce13bb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaSleepHypnogram.swift:1103-1122 | Atria/Atria/AtriaSleepHypnogram.swift:1124-1143 \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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4bb3ad17745508dd31a82580d83ddbcec381ab4d46aa2c0b084b12d746e3341"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaAnalytics.swift:2229-2258 | Atria/Atria/Sessions.swift:22171-22195 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":2229}}}],"partialFingerprints":{"codehealthFindingId/v1":"801a8fd7908e1c964845518822acdd13b751ccd74955f983611541cb45a5b9b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:10244-10260 | Atria/Atria/AtriaTrendChart.swift:1488-1509 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10244}}}],"partialFingerprints":{"codehealthFindingId/v1":"9560393e1ef7948e02eeea41d2c6cffec12e4cf011c9c23cdf134e4738122561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaStrengthSetLogging.swift:283-301 | Atria/Atria/AtriaStrengthSetLogging.swift:303-320 \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":"Atria/Atria/AtriaStrengthSetLogging.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced8c1f927110d880b98ac43510d9e4ecd7e49ac27270fe7b2f6e4e907d7d95a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/AtriaVitalsCollectionSections.swift:4387-4421 | Atria/Atria/AtriaVitalsCollectionSections.swift:4429-4460 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4387}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf137b64f793a8f0afef276b180ecf0b3362b5d9567a03cee863b757b0c57e77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 25\u002B corresponding lines): Atria/Atria/Sessions.swift:27653-27677 | Atria/Atria/Sessions.swift:27797-27821 | Atria/Atria/Sessions.swift:27850-27882 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27653}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f4d75c11a45be43bda03786f8b7630bc5a3edb0d745856102ae2c3f3358f9b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaJournalTab.swift:196-212 | Atria/Atria/AtriaOverviewSections.swift:10565-10579 \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":"Atria/Atria/AtriaJournalTab.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4c3b2cc21b2363a8ab9579e1e3c8da7dd801f6f1296c401067dbac5f826046"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/Sessions.swift:30798-30811 | Atria/Atria/Sessions.swift:30824-30843 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30798}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7a40453211d77c556d80603366b86bf835fa1cfd32c7bfa69e64ff0994b94f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaSleepWakeResearch.swift:1211-1232 | Atria/Atria/AtriaSleepWakeResearch.swift:1263-1295 \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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d72914ef9281ad30231b1d8fcf85ef1db0b7264f2951260fdacd791c5cd685a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaTrendChart.swift:2144-2157 | Atria/Atria/AtriaTrendChart.swift:2159-2171 \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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":2144}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd397d12bab3b02f19e499d16dd17ce90799598e30e590dac2165e6f21a562f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:225-250 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:252-277 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c0dcccec442a73689acc1b821304452b8a8dbb61d80656326667cd683752ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): Atria/Atria/AtriaWorkoutRuntime.swift:64-107 | Atria/Atria/AtriaWorkoutRuntime.swift:112-144 \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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"2673ea1208325f35ad68bbed7bbe2a09fa874da04d852585dbceb4e6f546019b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/Sessions.swift:54682-54690 | Atria/Atria/Sessions.swift:54947-54955 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54682}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a5ea1d05be817b090792c79b3c133f18546c9636b59a3646013064050aff66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): Atria/Atria/AtriaHistoricalGapLedger.swift:641-659 | Atria/Atria/AtriaHistoricalGapLedger.swift:665-683 | Atria/Atria/AtriaHistoricalGapLedger.swift:685-707 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13605fe9631ffc532fa6f1d0ab5239d6e6a6472184ebc2b8a2eb75149631bdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/AtriaSettingsView.swift:2562-2590 | Atria/Atria/AtriaVitalsCollectionSections.swift:2396-2418 \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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":2562}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f6e0fccd0e283774da0a19e022cf5bf7f452974136d233071d32ebd1422175d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaShareCard.swift:864-877 | Atria/Atria/AtriaTriRing.swift:749-762 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c21ca287f57add97eaf5478cdb26ee82e5ede4a3949c1f7c0dbd6f7b83e2e06"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/Sessions.swift:1724-1746 | Atria/Atria/Sessions.swift:1748-1768 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1724}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76339c87dbcd2c6882b294000669469089a6595851101d11f8b4de7f6d72802"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:838-855 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:161-188 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bcb8b23dc92ce495b9c63acb85fa05095d389e9033ba2e83885a0b84339ed6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaExpandedChart.swift:26-45 | Atria/Atria/AtriaVitalsCollectionSections.swift:205-223 \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":"Atria/Atria/AtriaExpandedChart.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"e35c1bea913bb9d63fc2890762c61692d2fef7b8b493f7a82b597e486838b5fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaManualSleepSheet.swift:675-693 | Atria/Atria/AtriaSettingsView.swift:589-610 \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":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"020e0c7804d9c17e17abec1045e14d77067da2d8de74010b5f57b026b4275c1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:218-247 | Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:256-289 \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":"Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d67e7677d0a9400c8e07a83522b01f2ab624739072b868e429184fb9d428ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Atria/Atria/Sessions.swift:16133-16164 | Atria/Atria/Sessions.swift:16166-16201 \u2014 These two members are one piece of code written twice and then edited apart: 32 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16133}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b034bbb83379268448074fa683292dde06bc2e61d29a497f0c19a00f4b6e041"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaR10Motion.swift:116-131 | Atria/Atria/AtriaWhoop4CompactIMU.swift:71-90 \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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccf5225f2f86065e191c92067c074ea31234e8ab7f1c8e760cc5be34ba8b8079"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 23\u002B corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:1537-1559 | Atria/Atria/AtriaDeviceUseJournal.swift:165-187 | Atria/Atria/HistoricalArchive.swift:4249-4272 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1537}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5f7f0b4ca41bd728f56347902439176593448269174fe1fba44a4bce0db42d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): Atria/Atria/Sessions.swift:19375-19412 | Atria/Atria/Sessions.swift:19414-19451 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19375}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c62a64d7d07930d507630339cc7a74d263826704d0ecdaf9ed3026f598165b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/Sessions.swift:53518-53533 | Atria/Atria/Sessions.swift:53764-53780 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53518}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffaa0a400b61d9d4a84fb34a332362197793b757d524abc22195ab8454aa7449"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaShareCard.swift:493-504 | Atria/Atria/AtriaShareCard.swift:506-515 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb98687a8ce2148300180ae67333bab27e005506511747d70cf084e80546e051"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:600-624 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:226-246 \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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7fbdc7f7157f5ac43dd64d8875702285986782a81f637ca7cc4d899f66e80ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/Sessions.swift:60968-60987 | Atria/Atria/Sessions.swift:60990-61007 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60968}}}],"partialFingerprints":{"codehealthFindingId/v1":"c723a08488c9956500200f10b7224a23b5b13b9ff7398d32e7571dae8e462d58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): Atria/Atria/AtriaGraphInspector.swift:146-159 | Atria/Atria/AtriaVitalsCollectionSections.swift:3634-3654 | Atria/Atria/AtriaVitalsCollectionSections.swift:4867-4882 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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":"Atria/Atria/AtriaGraphInspector.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb35ec53d3c0f6d6f83f12eefa2136020f6263acff10f826f581fb9bbaa4a6b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:652-671 | Atria/Atria/AtriaHistoricalLongTermRollup.swift:924-943 \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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98d634d1d2f8d47bf482bc4e738fa242b1c7945950af48cc472f899fa6f0673"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaIMUDiagnosticTransport.swift:1097-1111 | tools/StrapProtocol/Sources/StrapProtocol/FrameCodec.swift:102-115 \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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f34170892df8cffc5e889ba5052fb20a50f4b530e0f6e4e2ec253add0b04196"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/AtriaRecoveredHeartRateProjection.swift:462-473 | Atria/Atria/AtriaStressMonitor.swift:1888-1894 | Atria/Atria/Sessions.swift:21471-21480 \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":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b67561fa06749b7475ad5b95ae4c42ab578aee657cb08bfc136a44b8660bf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:485-501 | Atria/Atria/AtriaRecoveredMotionAnalytics.swift:503-527 \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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"0999eefb7351606c30a74b34829f44d2fe008f17da8c57d7546be860e25386b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaAnalytics.swift:1202-1223 | Atria/Atria/Sessions.swift:27246-27268 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"800c15d1592353cf9447697568d14100b98617241bbf8c41eec4a7016b9d5eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaBLEManager.swift:50972-50992 | Atria/Atria/AtriaBLEManager.swift:51076-51097 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50972}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c4a28e63fe314775ad2298329e5f9c6492e7f9dde4ab2cb7dd92fbc4324b7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:123-144 | Atria/Atria/AtriaVitalsCollectionSections.swift:904-917 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2de8000a08bf0d5a8be2875b9153978645f79c1cb1ae974015e1cc0718d7b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:8029-8048 | Atria/Atria/AtriaOverviewSections.swift:8050-8070 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":8029}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c926039caf1633b0709fc705bc22b2136a33f25702049267b857ce66272b9c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1019-1037 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:1024-1042 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"2496172644d2fb0d32569318c48def169743dd43c7d7594f08a1e4f425737502"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaCustomizeSheet.swift:548-566 | Atria/Atria/AtriaMetricIdentity.swift:32-71 \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":"Atria/Atria/AtriaCustomizeSheet.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"523c243be94aa6a4a1328115e01fc5ebaa2d0b61a88db837174cedfea245385c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2086-2104 | Atria/Atria/AtriaWhoop4HistoricalOrphanVault.swift:204-221 \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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":2086}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60839e4d6c8b52b40912db60870c129e5f2a99676588305b66b15ef52701b19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaRawExport.swift:144-157 | Atria/Atria/AtriaRawExport.swift:159-172 \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":"Atria/Atria/AtriaRawExport.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"047a83844a756aa5d2be62ad06e4ff0191f008c0d415531354d22a98f33f5d11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Atria/Atria/AtriaWhoop4HistoryACKGate.swift:85-121 | Atria/Atria/AtriaWhoop4HistoryReadPreflightGate.swift:69-93 \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":"Atria/Atria/AtriaWhoop4HistoryACKGate.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"935f9909b7b3097a73ab09541563b32e4596362e533fae84a256cebd7c6cde85"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/FrameParser.swift:106-113 | tools/StrapProtocol/Sources/StrapProtocol/FrameCodec.swift:45-58 \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":"Atria/Atria/FrameParser.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"8751d753d075d0d3364ca3472b29aeacd9168236431f239a8eb54ea8583998c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaAboutMetricSheet.swift:544-559 | Atria/Atria/AtriaAboutMetricSheet.swift:561-578 \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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"94434f7945b3130ff33ab2530862252d760d486ce988b217306412f09fa063c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaBLEManager.swift:8463-8480 | Atria/Atria/AtriaBLEManager.swift:8623-8640 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":8463}}}],"partialFingerprints":{"codehealthFindingId/v1":"54bc869f4465b39ddef283b76de646c11a830b2e9c8ffdfbd5076a250ae17a66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaNutritionContext.swift:36-49 | Atria/Atria/AtriaOverviewSections.swift:6596-6610 \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":"Atria/Atria/AtriaNutritionContext.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"862e4aa3c3e2960b508a3208302517422f5ba2f9b85dac15f3e2f5aa928fd8a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/Sessions.swift:61649-61665 | Atria/Atria/Sessions.swift:61750-61764 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":61649}}}],"partialFingerprints":{"codehealthFindingId/v1":"c694daeeae69590d5979596e5fd7cb2e71398a57ab88c0ba65f5d4a0ed90bfe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Atria/Atria/AtriaHealthScreen.swift:859-873 | Atria/Atria/AtriaWidgetOvernightBoard.swift:103-114 | Atria/AtriaWidget/AtriaWidget.swift:301-312 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bbbe1e29bd1cd5bb7919dfcd64c078b94e586782ab8d57f7e5b01f099f6ee80"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:510-530 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:661-686 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c90977eec83df3ce371fc37d1390936b189ce025b9d57ba22bd974af62d610"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/Sessions.swift:24820-24841 | Atria/Atria/Sessions.swift:61915-61934 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24820}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc241f181899e4e23c134de7d3d86b583aa024d5a81643cda42c454224a794a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaBLEManager.swift:6814-6834 | Atria/Atria/AtriaBLEManager.swift:6836-6865 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6814}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf4ad74e373c4b0c756eead0a89263ded049aa7dbcd99bc399a71dd262e7233"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Atria/Atria/AtriaHomeView.swift:2885-2898 | Atria/Atria/AtriaHomeView.swift:2900-2912 | Atria/Atria/AtriaHomeView.swift:2943-2954 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2885}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b8da8e165fcbcf600528e0397d9971231f01e99154d89359be71303757dc02"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 20\u002B corresponding lines): Atria/Atria/AtriaIMUDiagnosticTransport.swift:276-295 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:297-316 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:318-337 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:381-400 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"69cb8abdb7f497da748470caaaa376fac4b8da4e270f5e963e6b62d5961c34b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaBreathworkSession.swift:777-791 | Atria/Atria/AtriaHomeView.swift:3420-3434 \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":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96c14cbbdd0251f2d4a98f6256863c3ed554529e30a673982728aa43cab8357"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:664-678 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:1078-1091 \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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50d5152a571fcb09bcb4d3002e510127313dc1d5a3f491667495bf201821229"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/Sessions.swift:48631-48651 | Atria/Atria/Sessions.swift:53171-53190 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48631}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e173bc23ff53fb0fd18edfe55dc3227419091d2624eed34c19b579cd52dc5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaSleepWakeResearch.swift:283-304 | Atria/Atria/AtriaSleepWakeResearch.swift:309-333 \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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"e12d05541b5d8f1da12dc06b9c07b66ae83ef8218c2947dc3dae88361a0ea3ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:4897-4919 | Atria/Atria/AtriaActivityMonitor.swift:4921-4943 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4897}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cbdac2e0883621683696c23c2ffc40f2d6abd4bc17ac6608f43231a75cdd59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1231-1249 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1251-1268 \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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"210a70eb4177b8133adb02940897acfc0faa593f910ab7bb16efca0eea9ac3f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:737-750 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:752-765 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba916216297226cf569dc22399bdca40efd52b22da49ddf4b985dec92ae6ed4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaLiveActivityLockPreview.swift:62-74 | Atria/AtriaWidget/AtriaWidget.swift:3219-3235 \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":"Atria/Atria/AtriaLiveActivityLockPreview.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a723ae3e9ba1e07153b210c38f461b6c942364cac1e4aa044872d1436215b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1306-1312 | Atria/Atria/AtriaVitalsCollectionSections.swift:285-291 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6dfa293f74fb34d07871e5f1baf72e3bd362d586cb9cbc75a930cd11051081e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaSleepBudget.swift:240-251 | Atria/Atria/AtriaSleepBudget.swift:335-344 \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":"Atria/Atria/AtriaSleepBudget.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19bc5397272cf8297a60bed2f87bc81b1534d442469eed8a4425ab2fd9976a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaStressDetailView.swift:1303-1322 | Atria/Atria/AtriaStressDetailView.swift:1338-1364 \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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5b1c2f3302f2e85c4e0dda0be7dbfd52b59bbcadb83a2d975373d09f2b524d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaStressMonitor.swift:1532-1552 | Atria/Atria/AtriaStressMonitor.swift:1554-1580 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1532}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ac70d9daacd0ea4d4ae6caa891190273187b57f36de4b89f0c3055d68c4ce22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaBLEManager.swift:24189-24207 | Atria/Atria/AtriaBLEManager.swift:24254-24277 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24189}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1a8561e7027e5334463b87793f66db786ce2178271499078b695e4feecf99f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift:32-45 | Atria/Atria/AtriaRecoveredRRProjection.swift:412-423 \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":"Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec94a2486875dd2b089055342b079183046cd0f9c2ec73fa08ce4c995648f3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 20\u002B corresponding lines): Atria/Atria/Sessions.swift:3063-3088 | Atria/Atria/Sessions.swift:5468-5487 | Atria/Atria/Sessions.swift:6565-6590 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":3063}}}],"partialFingerprints":{"codehealthFindingId/v1":"c154c5ee787697bce715d7ef772f224560b741adf821210747c674de9919e0cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaBLEManager.swift:31816-31830 | Atria/Atria/AtriaStrapCalibrationArchive.swift:697-710 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31816}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f724d5ce20b90f6657f9e4e011328f947d28f51bae9cda78866101644938e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/Dashboard.swift:270-288 | Atria/Atria/Dashboard.swift:402-424 \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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdce5aa507cbb654187b04120476349a6da9480e797bd697d652c5d40ce8fdf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaBLEConnectedPeripheralRetainer.swift:140-163 | Atria/Atria/AtriaBLEConnectedPeripheralRetainer.swift:174-204 \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":"Atria/Atria/AtriaBLEConnectedPeripheralRetainer.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"074e96bc87715e04f18265e9a994b738aba2bf55e686bff44b84ba1cc738cf61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaBLEManager.swift:25586-25599 | Atria/Atria/AtriaBLEManager.swift:26469-26484 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25586}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5cb53d5df14b9f612a053a9e7c6d46b1a8447c2db7e67f789d614ef29afa52e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHomeView.swift:9107-9122 | Atria/Atria/AtriaHomeView.swift:9123-9130 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9107}}}],"partialFingerprints":{"codehealthFindingId/v1":"9700e0dd77261aac5e67acca8cc2ddf6033b946fef024b7ede1578531b122aa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/Insights.swift:430-436 | Atria/Atria/Sessions.swift:22709-22715 | Atria/Atria/Sessions.swift:60828-60839 \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":"Atria/Atria/Insights.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3ad6136e19bac5723895efe9169e6e905365b12cf8818a752d02ced053ed1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaOnboardingFlow.swift:854-877 | Atria/Atria/AtriaSettingsView.swift:1425-1452 \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":"Atria/Atria/AtriaOnboardingFlow.swift"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d31a5d90dba06f5d97e07b0b93236abd84d2e3b79b6e9c35065a1d4cec48db3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaShareCard.swift:971-987 | Atria/Atria/AtriaShareCard.swift:1080-1096 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48cd8d934369b456ea34c9a9f2509c39ea0c6279b4e19d30412dc4d86db1691"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaDailyStepPresentation.swift:1125-1142 | Atria/Atria/AtriaDailyStepPresentation.swift:1178-1192 \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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":1125}}}],"partialFingerprints":{"codehealthFindingId/v1":"401e0f40a5f3d259d8e92031679675aa7d3e0b29b35aedf45f5f185e5300afb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaAnalytics.swift:452-467 | Atria/Atria/AtriaAnalytics.swift:469-482 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"0843d1a6315e14a55869486aa04547cb416a71b9d64b638d3ab59a193a9a6397"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaShareCard.swift:1977-1999 | Atria/Atria/AtriaShareCard.swift:2342-2363 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1977}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d95f2bea6f30d1682d671f390c5fb5825bb356e352da2cb7f1725e52554c5c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:1336-1353 | Atria/Atria/AtriaActivityMonitor.swift:1355-1373 | Atria/Atria/AtriaVitalsCollectionSections.swift:3690-3707 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1336}}}],"partialFingerprints":{"codehealthFindingId/v1":"083378b0be04564901687caa086dc1b0ddcfda77af6794fb93124bd166c4511f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/AtriaGapWearClassification.swift:47-69 | Atria/Atria/AtriaSleepHypnogram.swift:369-396 \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":"Atria/Atria/AtriaGapWearClassification.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f662265add38ec7797fc524839b2159a9b638080e283324c3497404beb1eef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Atria/Atria/AtriaBLEManager.swift:37678-37708 | Atria/Atria/AtriaBLEManager.swift:37756-37787 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37678}}}],"partialFingerprints":{"codehealthFindingId/v1":"77129187177e817f2de2ebc12dd9b82bc2b2c935398be8cbf12b561d2130ed67"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaHomeView.swift:11177-11203 | Atria/Atria/AtriaHomeView.swift:11212-11230 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":11177}}}],"partialFingerprints":{"codehealthFindingId/v1":"07b938874900fd11ed50a2460d3dc1ca814705ff5ca3813ba5eb83a6610d1f33"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaSleepHypnogram.swift:128-137 | Atria/Atria/AtriaSmartWakeView.swift:51-60 \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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"327a55c7644ba3859bde63619a89511c7dfb6596ba43a2d2f183e0d9ce1794aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaStressMonitor.swift:636-654 | Atria/Atria/AtriaStressMonitor.swift:2965-2983 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ad8fe00fea6e0458c5ffb3ab76bfb4e5aa4e48a4f12cae012ef69e08dd7b84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaHealthspanDetailView.swift:635-648 | Atria/Atria/AtriaHealthspanDetailView.swift:650-664 \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":"Atria/Atria/AtriaHealthspanDetailView.swift"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fc8499c6318817414d9c586bd2aba6dcf613fadd7ded3029593a2670fec72c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): validate_hrv.py:85-103 | validate_hrv.py:173-191 \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":"validate_hrv.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"c272bac91824e9c6d27c8f434d20beea5b9cce4af7422188f2319f5a430dcac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaBLEManager.swift:45845-45868 | Atria/Atria/AtriaBLEManager.swift:45873-45896 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45845}}}],"partialFingerprints":{"codehealthFindingId/v1":"943303fae55f5b668174a54b9c5c72755cb4aa70539c9c14d384eda7aa29a561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaBLEManager.swift:50863-50871 | Atria/Atria/Sessions.swift:62388-62396 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50863}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1ffa4dab32a1fc70b7889d455f57368a05370d3095659287363d1ac77135dd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaAppReviewDemo.swift:33-39 | Atria/Atria/AtriaAppReviewDemo.swift:41-48 \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":"Atria/Atria/AtriaAppReviewDemo.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f224db7b94c70531f742353f9b07486f9d6193ff758901b538355252d5b63b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): Atria/Atria/AtriaWhoop4CompactIMU.swift:534-555 | Atria/Atria/AtriaWhoop4CompactIMU.swift:576-593 | Atria/Atria/AtriaWhoop4CompactIMU.swift:614-632 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4CompactIMU.swift"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"8056ed2f2c1ce61e3e024f9b5e9c296ec4e65c33f86e40bf25df0b1c09db05e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaHistoricalGapLedger.swift:1377-1394 | Atria/Atria/AtriaHistoricalGapLedger.swift:1396-1411 \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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":1377}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a553cb773adde1b0666c62afd02a96b6e38380d7670b0c2a382f245bff5186a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Atria/Atria/Sessions.swift:30088-30099 | Atria/Atria/Sessions.swift:30105-30119 | Atria/Atria/Sessions.swift:30121-30133 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30088}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b340fcc2ceef64bf2ebf9bb42f9903400f98578673fc81d4a47bdabde977dd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:436-448 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:625-634 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1359-1372 \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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ecae8c996fe9411e4aadc2775d51bd4111a946ef61bf1ee9d4ad8a1b87ed39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/AtriaOnboardingFlow.swift:1215-1240 | Atria/Atria/AtriaSmartWakeView.swift:136-159 \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":"Atria/Atria/AtriaOnboardingFlow.swift"},"region":{"startLine":1215}}}],"partialFingerprints":{"codehealthFindingId/v1":"054e6fff406b839f190e826e86093c4eb3eaf6f514d8bd0fdf77f258642dd701"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/Sessions.swift:2994-3010 | Atria/Atria/Sessions.swift:6505-6521 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2994}}}],"partialFingerprints":{"codehealthFindingId/v1":"b503d1795cfb07db0979cc5e2dd96c9838a3afbba88aa04c09fdae5d7c888076"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/Sessions.swift:60923-60937 | Atria/Atria/Sessions.swift:61157-61171 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60923}}}],"partialFingerprints":{"codehealthFindingId/v1":"c435cdcc0403133fe55e8f456ae38cbdabf2104572f0b12719704581f17a3578"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaManualSleepSheet.swift:598-615 | Atria/Atria/AtriaWorkoutReviewSheet.swift:156-170 \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":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"c213073d23b54c6480d635b02bd460ac065f0e0bcacbc5256e0340644722ecff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaRawExport.swift:63-76 | Atria/Atria/HistoricalArchive.swift:7077-7088 \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":"Atria/Atria/AtriaRawExport.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ba81c01c574794a71461810bf08998da4b4ff5af247ba1cbba0b53fbbb5759"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaSleepHypnogram.swift:930-946 | Atria/Atria/AtriaVitalsCollectionSections.swift:5207-5219 \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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a80ca1c3c86915a80c3c105114a5384007b4b9b205bb42c8f62ab598a2b752"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/Sessions.swift:59095-59109 | Atria/Atria/Sessions.swift:61467-61480 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59095}}}],"partialFingerprints":{"codehealthFindingId/v1":"16479f41c1d9649958ed46ee971584f703ad2d517d68f252128898c153e89e57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:445-456 | Atria/Atria/AtriaActivityMonitor.swift:755-768 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a1ff2bd86aa1660cc68c6e31bf94cb476cfa356cbc4028d1dab2f9fac014d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Atria/Atria/AtriaFaceOff.swift:92-109 | Atria/Atria/AtriaRoutineCard.swift:221-238 | Atria/Atria/AtriaWeeklyReport.swift:125-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 16 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":"Atria/Atria/AtriaFaceOff.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"6414763aa88fdab7af8e1d95593ae5485a16c97f4dc1fd3ed67cac7ec19112d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Atria/Atria/AtriaShareCard.swift:2979-2998 | Atria/Atria/AtriaShareCard.swift:3019-3034 | Atria/Atria/AtriaShareCard.swift:3057-3074 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2979}}}],"partialFingerprints":{"codehealthFindingId/v1":"989d7111aa60787d9dad3f0340ce0cc3fbef07af7fcecd70a8bce076d3f48402"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaTrendChart.swift:1588-1600 | Atria/Atria/AtriaVitalsCollectionSections.swift:226-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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1588}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0082971426195c51b99d30700d8125ddc6bec172cab71a85a642c14c125dd25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 21\u002B corresponding lines): Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:284-310 | Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:319-339 | Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:348-372 | Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:399-426 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"828a263b4f6fdd4a8233c571dbe1c7c7e6fc9cf0834da2940d11afdb1720de4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaBLEManager.swift:27553-27563 | Atria/Atria/AtriaBLEManager.swift:27565-27580 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":27553}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a77349441156b066993b7fc5e56283fb0937f147efa0ee261a73b833979050"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 22\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:37567-37593 | Atria/Atria/AtriaBLEManager.swift:37655-37676 | Atria/Atria/AtriaBLEManager.swift:37733-37754 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37567}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62e43696c541dab3b8099eddc2cbbd2660b86beab3b5b1a4060f0679f06f690"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaWeeklyPlan.swift:384-398 | Atria/Atria/AtriaWeeklyReport.swift:217-229 \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":"Atria/Atria/AtriaWeeklyPlan.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd776c687d886d96e54d795741b87538f936da09fef35ac04bca74f18526e4ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/Sessions.swift:32728-32753 | Atria/Atria/Sessions.swift:32760-32777 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":32728}}}],"partialFingerprints":{"codehealthFindingId/v1":"f111dcf6a9c1a44ca24a18863831114e8f7225055f14935dc7c0d7df5bb9f50b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaSensorReferenceCapture.swift:171-183 | Atria/Atria/AtriaStepCalibrationPlan.swift:88-103 \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":"Atria/Atria/AtriaSensorReferenceCapture.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"b08b3126d670d11b6f46a7c7ffc4ba2b27abb3824194c08a8fe254681b923bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaRecoveryDrivers.swift:104-112 | Atria/Atria/AtriaTrendShift.swift:95-106 \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":"Atria/Atria/AtriaRecoveryDrivers.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e35bcf598eaac8ae2c270df53b7729994857f0edc5c8a7eecbbc83b40dc6e0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:450-462 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:636-647 \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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"71a202cbb5d63f8e0f1fc18ab0ba6bec8e765efad55ea7bd0dc60eb795a573f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaR10Motion.swift:1523-1548 | Atria/Atria/AtriaR10Motion.swift:1554-1573 \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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a0ebbe2639a57b7aaeb524183e9cb7727e2e7f68ee932e46f81ef6c825f4596"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Atria/Atria/AtriaWhoop4HistoryACKGate.swift:52-78 | Atria/Atria/AtriaWhoop4HistoryReadPreflightGate.swift:43-64 \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":"Atria/Atria/AtriaWhoop4HistoryACKGate.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"a151bfde1bb744515513fe66dcf7dbcd304ffb27b753e40eb178c312c800b5f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/HistoricalArchive.swift:11319-11333 | Atria/Atria/HistoricalArchive.swift:11335-11349 \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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":11319}}}],"partialFingerprints":{"codehealthFindingId/v1":"21088d56e3ff4d247abcb731547a2e41851f6561b7919004d26d473fabce14e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaColdSessionStore.swift:331-341 | Atria/Atria/AtriaWhoop4HistoricalOrphanVault.swift:252-260 \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":"Atria/Atria/AtriaColdSessionStore.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"874ce4b44837584b4b882eb80f43c975c34726b55be86c49a9c0636b5f598db5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:76-100 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:492-512 \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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"959e446e38caa9a6d736ad6f2658e4a82fb63373a2416b87cd4acb50eed947ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1262-1275 | Atria/Atria/AtriaVitalsCollectionSections.swift:263-273 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2794f47f4f3b712bade5f910280b1c4fd0640f7d80f43fb3286ff3e740a2420"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/Sessions.swift:26220-26237 | Atria/Atria/Sessions.swift:26243-26262 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26220}}}],"partialFingerprints":{"codehealthFindingId/v1":"d012fcfb4c8d00b5990a8c4838082a347e32727b93a316571898383694579557"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHomeView.swift:2299-2316 | Atria/Atria/AtriaHomeView.swift:2324-2343 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2299}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c176b4aa5000e10da71df99be6128258bbfd2c5ef277e0ba64b16ed18cfc299"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): Atria/Atria/Sessions.swift:48009-48022 | Atria/Atria/Sessions.swift:55844-55856 | Atria/Atria/Sessions.swift:55858-55870 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48009}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc59a693683d015a5a2c0a5daaee27e5875eff988c51fde33a62fbaf9761122"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:2206-2215 | Atria/Atria/AtriaHealthScreen.swift:2217-2227 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2206}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a0bf42b7990008ff40c091eafa7c5367fee8d23d92937ced34c4bcd0e67890"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 7\u002B corresponding lines): Atria/Atria/AtriaHomeView.swift:767-773 | Atria/Atria/AtriaHomeView.swift:4839-4847 | Atria/Atria/AtriaStepsWeekChart.swift:394-400 | Atria/Atria/AtriaWorkoutMetricPresentation.swift:170-176 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"28622231c0c161d6fabf1375b088ce3e53e18e8789f81d2a4d644a349899da9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaBLEManager.swift:23628-23640 | Atria/Atria/AtriaBLEManager.swift:52519-52533 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":23628}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09b426a1e87b73d2ef2da6a1566aaf4780520e37b3e4f7a8bc8aab39a7ae3cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:131-150 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:159-179 \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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d222f7629d8aeceba905fc454cb0ddd9fcc4f4b6701d42bd7cc1819b14a0ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHomeView.swift:9089-9095 | Atria/Atria/AtriaHomeView.swift:13397-13402 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9089}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ed81fafd9cc4f250131af4495541e70f5880878235684a6baf767086c7af79f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift:37-52 | Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift:165-182 \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":"Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8761e2400ba9af651bcade85b4d08ec5816ace5947fe9139791e4615d336c64a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/HRV.swift:238-245 | Atria/Atria/Sessions.swift:32483-32490 \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":"Atria/Atria/HRV.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cab1816763cad7d67bbb2cb17afd6f09810eae9be5f77ff9e20b6b4560e157c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:17-32 | Atria/Atria/AtriaHeroConnectionSections.swift:253-268 \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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"181a74998f634aac4a31044a4b54a34c616ffa5e996e59a763c992485f413ce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift:193-199 | tools/verify_whoop4_autonomous_step_corpus.swift:501-510 \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":"Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e1a1e6875bfe97c34e9c55fa59d1530f03383b731c3c13044cb6da9b7bd1db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/AtriaTodayScreen.swift:2461-2479 | Atria/Atria/AtriaTodayScreen.swift:2486-2504 \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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2461}}}],"partialFingerprints":{"codehealthFindingId/v1":"508316f1ac42cc40eb92769cba1c86e968fe8e7b72d48f63df6776d46bc4746f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): Atria/Atria/DailyRollupStore.swift:1188-1205 | Atria/Atria/Sessions.swift:29037-29055 | Atria/Atria/Sessions.swift:29193-29211 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd944cb0c1c16b4143a78925805677abf37deaf3eeae37b38cbe21bdb8e38c5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/Sessions.swift:4097-4105 | Atria/Atria/Sessions.swift:4135-4143 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4097}}}],"partialFingerprints":{"codehealthFindingId/v1":"f841d1a94d6ba6fae76066644bbc0bd98c9d1d74047f9a20c013b1723ff55218"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Atria/Atria/Sessions.swift:37200-37219 | Atria/Atria/Sessions.swift:37517-37535 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37200}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba035effb870adc31d478083da4b287b97313a509ff934b09aa97b1289b945e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/Sessions.swift:1961-1972 | Atria/Atria/Sessions.swift:2272-2283 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1961}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aff73f6e2dcb22456820bf6c8d0f3a24c5707c8461a94081ea844dc4f63c770"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:211-227 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:231-242 \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":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e430d4da687fa021886e0cc4684a04732e674054b9e73d302c586c2720d4e91"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): Atria/Atria/AtriaStrengthProgress.swift:351-358 | Atria/Atria/AtriaStrengthSetLogging.swift:50-57 | Atria/Atria/AtriaStrengthSetLogging.swift:59-66 \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":"Atria/Atria/AtriaStrengthProgress.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"34fb17960fa3feb9a724c0a27ff01160194159b887dc2adf8eb25ae3c3a8dabb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaTodayScreen.swift:4254-4258 | Atria/Atria/AtriaVitalsCollectionSections.swift:1790-1795 \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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":4254}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd94967d8fe613c438bb9531de027877d11abb02d6f1db8a4d3eb6d4230f6d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/Sessions.swift:2382-2388 | Atria/Atria/Sessions.swift:8225-8230 | Atria/Atria/Sessions.swift:56691-56696 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2382}}}],"partialFingerprints":{"codehealthFindingId/v1":"0042ab829175b64480d788f898cc0fcfb7501b758d648b875ddd2e81609e39b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/Sessions.swift:43154-43167 | Atria/Atria/Sessions.swift:43169-43183 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43154}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f206761e3cea97ed408207f902427d9f6e03ae4e5867826642071e259b54b12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaBLEManager.swift:3336-3345 | Atria/Atria/AtriaBLEManager.swift:3347-3355 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":3336}}}],"partialFingerprints":{"codehealthFindingId/v1":"53864d2007b8719d0c5eb0a8359a2d4b94759a13a12274f8c447c8b0a4f4a5d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Atria/Atria/AtriaBLEManager.swift:51048-51070 | Atria/Atria/AtriaBLEManager.swift:51187-51209 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51048}}}],"partialFingerprints":{"codehealthFindingId/v1":"f694050e7a414ba99f1d67381b1ad3871aa6d960e4d39783635b0c9472e905fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:1468-1477 | Atria/Atria/AtriaOverviewSections.swift:5977-5986 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c165ef8de99db85602edbda9c34bbc6849c8184627d89dd50935fc96657a144"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:912-922 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:924-934 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"83ac95fe639d807f2f04d298a57f51b12095ca0619b6a0ba621e314dc6da4cb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): Atria/Atria/Sessions.swift:3125-3148 | Atria/Atria/Sessions.swift:6624-6647 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":3125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41fd065ae1e75926213e659e71ea225da29875083028b9ba5279fc01e357c41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaGraphGrammar.swift:710-717 | Atria/Atria/AtriaGraphGrammar.swift:719-726 \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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5dc77b3116ce362205044e258d285b6dc8af239b2f21765c37904ab7138602f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaHapticAlerts.swift:539-555 | Atria/Atria/AtriaHapticAlerts.swift:557-569 \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":"Atria/Atria/AtriaHapticAlerts.swift"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7636b8bd64538506bf016136f533be412d4b9199b5d03dca74e08d467d83dde"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaHomeView.swift:8645-8650 | Atria/Atria/AtriaLiveWorkoutView.swift:3501-3511 | Atria/AtriaWidget/AtriaWidget.swift:2881-2889 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":8645}}}],"partialFingerprints":{"codehealthFindingId/v1":"c50a8a4bfe47df4d7917a6a761cfcd7ddfd934aaf82984ad4629d8bea3f4619c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaHomeView.swift:12507-12521 | Atria/Atria/AtriaHomeView.swift:12523-12535 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12507}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a47baa3aacb1256a3cd3824676f2fbd8279fa1b2e770b926dad25731a90d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:6897-6911 | Atria/Atria/AtriaOverviewSections.swift:9761-9774 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":6897}}}],"partialFingerprints":{"codehealthFindingId/v1":"13dbe06842431b32581d4884eebd7673fd2aab4eb2752d78385f4a5ce73dcfe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaTodayScreen.swift:1965-1974 | Atria/Atria/AtriaTodayScreen.swift:3601-3614 \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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":1965}}}],"partialFingerprints":{"codehealthFindingId/v1":"daaad732b37cf7d88aede828493aa44d45c71b2a2f21b527d0df9064e26212e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/Sessions.swift:20549-20566 | Atria/Atria/Sessions.swift:20786-20803 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20549}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6befa24426fd26930cd278811cf58f78dc7bfe6444766f8944eda448d3442e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaAICoach.swift:494-508 | Atria/Atria/AtriaAICoach.swift:510-524 \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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab319665d2a32d5db53f5edcc63d6fb6b29fc8e0017dafb542ad7a598a99f885"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:187-203 | Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:459-481 \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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"7368453463e4f05bfdedb3da3e753bd5ecbf29163feba0d2d50bcee6c7e440d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:2370-2380 | Atria/Atria/AtriaTodayScreen.swift:673-683 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2370}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4497a5a79408030d83905962a54acf486d9621fc78b63f5559834126e5dae23"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaHistoricalActivityProjection.swift:505-519 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:267-276 \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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ff510300904a49b6e8acc2bd3d6e57d3110879038261a6573d6be309639e9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalRetentionTransaction.swift:511-524 | Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift:437-442 \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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d80d993a9180e1f9eced2e5c2a9996e86bc490da8457190a7085f58d18b6b7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 6\u002B corresponding lines): Atria/Atria/AtriaHomeView.swift:2091-2098 | Atria/Atria/AtriaHomeView.swift:2100-2105 | Atria/Atria/AtriaHomeView.swift:2107-2112 | Atria/Atria/AtriaHomeView.swift:2114-2119 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2091}}}],"partialFingerprints":{"codehealthFindingId/v1":"21467b5cf4f2272a8d3d5fe7f532974c9f259702134d6b434e6a599581e034dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Atria/Atria/AtriaOverviewSections.swift:5409-5417 | Atria/Atria/AtriaOverviewSections.swift:5427-5436 | Atria/Atria/AtriaOverviewSections.swift:5438-5446 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":5409}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ccf93ec5f02f6ddfdadd0b8db2b511bb112d96fc5091d9c1a9e76d85179bb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Atria/Atria/Sessions.swift:41443-41462 | Atria/Atria/Sessions.swift:41464-41487 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41443}}}],"partialFingerprints":{"codehealthFindingId/v1":"87740ae218edc16806f18a698c4f7e6f713db53fc365f15b1043e1cf2a63b651"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaBLEManager.swift:33942-33954 | Atria/Atria/AtriaBLEManager.swift:34012-34024 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":33942}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3f0faf27311930fd07caa8b43ef9054402df89542fa7853ba2c345b78c058b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:567-582 | Atria/Atria/AtriaManagedStorageInventory.swift:315-329 \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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c2999af56ed36bacd6de7f9a4e9a7484a6ccab06f9996058fa8f897dd206be9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:337-357 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:392-409 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"62974e6adc5d34e97375a55e743059a28e27584a8d1e6c3da1928568102ca4b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHomeView.swift:5417-5426 | Atria/Atria/AtriaTodayScreen.swift:2712-2719 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":5417}}}],"partialFingerprints":{"codehealthFindingId/v1":"f809891be7aa8015787e67f019d2886480f086762517a2d78aace61bc49c85d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaMetricTargets.swift:272-286 | Atria/Atria/AtriaMetricTargets.swift:288-302 \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":"Atria/Atria/AtriaMetricTargets.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc6438dab4715da2177b3ce2bb91d855a065ded23c887280864be375a908910"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:434-443 | Atria/Atria/Sessions.swift:4115-4120 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"e81f0b5285150f2fe4c012d0ed9a05ebd6a1d754cee0ae672cafe2ee6a5cc4d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:52803-52808 | Atria/Atria/Sessions.swift:24787-24793 | Atria/Atria/Sessions.swift:56750-56755 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":52803}}}],"partialFingerprints":{"codehealthFindingId/v1":"da98d632e1a9d728127a4490b1939c635d9646c5cf28b63bf370d8f792b84e6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:476-481 | Atria/Atria/AtriaHistoricalGapLedger.swift:1168-1173 \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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d974432a390cb1ff0344ad0fde5d2dd7ca61c61238e65524ac66c513f80c14"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:949-965 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:999-1017 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe95a358fb1f3af21efef4b117718a63e95c13546055611fc242f11af615284"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/AtriaHistoricalActivityProjection.swift:790-798 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:952-958 | Atria/Atria/AtriaStrapCalibrationArchive.swift:666-674 \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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"316bd7c11a5adc6aa2d562db163b3d52095123225fc00c0505b83afd22d8b807"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaRecoveredRRProjection.swift:609-618 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3021-3029 \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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5a6a044f71c1121a5b650d87bc9f41b41f3fec013fd9aad8d9c9aaf4d174fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/Sessions.swift:30135-30143 | Atria/Atria/Sessions.swift:30145-30153 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30135}}}],"partialFingerprints":{"codehealthFindingId/v1":"2400b5aaa07d6961fae43305b072d44c22ebc810114b942b4777cf5673d2c96c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaAnalytics.swift:2114-2128 | Atria/Atria/AtriaFitnessAge.swift:265-277 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":2114}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c6ac1c2c54e8965945034e48ad3605564cb7168e80a000119ffd5058dc17ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaBLEManager.swift:30802-30808 | Atria/Atria/Sessions.swift:54997-55003 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30802}}}],"partialFingerprints":{"codehealthFindingId/v1":"febc28f9dcd2dfb11da768087a55cf3bed03cc1fc8d3b1509726386cfc248420"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 22\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:37609-37630 | Atria/Atria/AtriaBLEManager.swift:37632-37653 | Atria/Atria/AtriaBLEManager.swift:37710-37731 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":37609}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a157cabdc21862ddb1f0357ae7616c5748c458b60561048f53402452573dbf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/Sessions.swift:33561-33572 | Atria/Atria/Sessions.swift:43031-43038 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33561}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba5e4d86f6e773b201cf7500978f985cfaf04a14ea6d89eaa074829c5f1f566c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/AtriaBLEManager.swift:4254-4274 | Atria/Atria/AtriaBLEManager.swift:4286-4303 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4254}}}],"partialFingerprints":{"codehealthFindingId/v1":"621c5ef13c73736e391b1a97fc6bbe4ab905729c2f9b40d33165777ab81178ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaDetectionLog.swift:140-149 | Atria/Atria/Sessions.swift:40069-40080 \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":"Atria/Atria/AtriaDetectionLog.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a3c813ffe7609120e11be5110860f5ee773c743d535d061c0e899a9afae036"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaHealthspanDetailView.swift:567-575 | Atria/Atria/AtriaVitalsCollectionSections.swift:779-789 \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":"Atria/Atria/AtriaHealthspanDetailView.swift"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a126fa357b7a976bfd9566d6d77957b2da9517e6ba46a60393bac5882d77d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/Sessions.swift:5162-5168 | Atria/Atria/Sessions.swift:5374-5380 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":5162}}}],"partialFingerprints":{"codehealthFindingId/v1":"71bd8662384d00169b799f7d704a290345bf631649f2c155c9e302333660cb73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:180-190 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:752-765 \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":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec27c4ce1a7aa6c632f840b8bc29cfd1283d965ac1f9829a9cc4ddd40ffd56f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1152-1161 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1165-1172 \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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1152}}}],"partialFingerprints":{"codehealthFindingId/v1":"50619deb6df83d5596b209c42b06179a25d06d2c32b9b6d0170d6ab42485442c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaShareCard.swift:960-968 | Atria/Atria/AtriaShareCard.swift:1321-1329 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"02fbdf2f1bc9d97b805f37e74ed40fa0b0d4e91e6d882df906289c65ff6ef2a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/Sessions.swift:22732-22738 | Atria/Atria/Sessions.swift:56230-56236 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22732}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e52a26b47e4179699da72b38f51ae032eddaf70c2c9b07d234736a6c2816f6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:100-104 | Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift:264-270 | Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift:472-476 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dd50c3bf25c9dc9378194eff3a1ad7be8d488527f7a878c69c37c0cdb462b72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/ActiveSessionJournal.swift:1027-1033 | Atria/Atria/AtriaBLEManager.swift:52581-52587 \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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca94370b5a807f190c975399241e67704d863e605b418de3e77568a38e5d9fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaAnalytics.swift:2300-2310 | Atria/Atria/AtriaSleepWakeResearch.swift:1334-1340 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":2300}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f729819d48ecdb4d5f093de0c2030beb0909987ce5d7c8dbaead9c2c89274c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaDefault.swift:171-184 | Atria/Atria/AtriaDefault.swift:196-211 \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":"Atria/Atria/AtriaDefault.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d605785566236ce5ba0e67043db93ae7a3805bd22a3cb3f0af1852c0e4a2210"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Atria/Atria/AtriaHealthScreen.swift:1961-1971 | Atria/Atria/AtriaOverviewSections.swift:5294-5303 | Atria/Atria/AtriaTodayScreen.swift:2289-2299 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1961}}}],"partialFingerprints":{"codehealthFindingId/v1":"3378584a6c543f34e2034a44b69e51a6548919b2053ffbf959cf0236952993db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:5452-5460 | Atria/Atria/AtriaOverviewSections.swift:5462-5470 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":5452}}}],"partialFingerprints":{"codehealthFindingId/v1":"8705798b6832112293fbce19b3481ed137d5d19fc65eab56ca0b619a068374be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaVitalsCollectionSections.swift:358-367 | Atria/Atria/AtriaVitalsCollectionSections.swift:749-758 \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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c9eb70058da9f2d088a64a88a4e1de7713f6a4915b9756228dba8d05d29aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/AtriaAppIntents.swift:139-150 | Atria/Atria/AtriaVitalsCollectionSections.swift:3038-3048 | Atria/Atria/Sessions.swift:62416-62422 \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":"Atria/Atria/AtriaAppIntents.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"882a0b59c5d7704c3761719a82fc13f81f961186c7329929107d24c9212adb4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:32979-32994 | Atria/Atria/HistoricalArchive.swift:8957-8968 | Atria/Atria/HistoricalArchive.swift:8970-8981 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32979}}}],"partialFingerprints":{"codehealthFindingId/v1":"41990a161148a2cc9e717012f2d572eb6f2dcfdc33420799c0471c348a1cf3e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaHomeView.swift:337-348 | Atria/AtriaWidget/AtriaWidget.swift:3483-3493 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"3045370f07375c36f20e342cc1b04aadf496193779af844b85eeb15ee94ca6f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaTodayScreen.swift:215-233 | Atria/Atria/AtriaVitalsCollectionSections.swift:155-170 \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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde755311607bed2eaefbf7ca7e795b6aec203cc08d3c134245b5e059927e85a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/Sessions.swift:1171-1181 | Atria/Atria/Sessions.swift:1250-1260 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1171}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d0e2d85e87eb66535a2d6090c994257034a48e670f07cd1103184421b09167c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaBLEManager.swift:4937-4948 | Atria/Atria/AtriaHomeView.swift:12776-12787 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4937}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05da67b6e6595558e8271aaaaecb9be805632223816ec623d0cebdd5db1f060"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHistoricalActivityProjection.swift:387-394 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:941-950 \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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c68b0b9041a5c0a08ca0ab6085d9d11bc6b31b54960f57d01cbf198e7c5c9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaOnboardingPersonalization.swift:72-83 | Atria/Atria/AtriaTodayScreen.swift:1445-1454 \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":"Atria/Atria/AtriaOnboardingPersonalization.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"946381ea9a599a92718618a66b7c669bf6d48c205a79159b2b27f82c9c31095e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaShareCard.swift:2964-2977 | Atria/Atria/AtriaShareCard.swift:3044-3055 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2964}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18b4c8e1e23abd364395a7c7381b9f3961634bb4e58fcb1a121968ac50bca82"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaWorkoutRuntime.swift:299-315 | Atria/Atria/AtriaWorkoutRuntime.swift:468-480 \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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"22170449884ed8387cf9ec1dcae3e7704b3ccac232ba20c6a2aa5abb6207c468"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/Sessions.swift:61445-61451 | Atria/Atria/Sessions.swift:61453-61460 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":61445}}}],"partialFingerprints":{"codehealthFindingId/v1":"6465e43a8cda6aa742ffa0d5b714478715a5ae3054169c1148fec60ee681f63a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaCivilDayStepAuthority.swift:66-81 | Atria/Atria/AtriaUnattributedMotionRuns.swift:238-249 \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":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa04433c58e2893844933c35339a7796fab535cb6c3ec16547bf35a04caa9325"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:499-513 | Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:515-527 \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":"Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ada9afef00cc9adc7fe77467d960c20250b42441ac68b5ae57b1977acebf8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaPhysiologicalStressModel.swift:666-672 | Atria/Atria/AtriaStressMonitor.swift:3327-3333 \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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"68feab5789f83cad2533f53061d6969f6f85060fa105a486a68258b8b1e8b832"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/Sessions.swift:10035-10047 | Atria/Atria/Sessions.swift:10058-10070 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":10035}}}],"partialFingerprints":{"codehealthFindingId/v1":"c443c335fb1fc5344ebc6294d6ea8498b0bca5a724c6b8fc64bddee83be8d106"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Atria/Atria/Sessions.swift:49984-50001 | Atria/Atria/Sessions.swift:50003-50023 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49984}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4a5c4ae3c802d84b0098dc7a1381e0af3dfb80d7155f8e1e50e3f06293ed4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 8\u002B corresponding lines): Atria/Atria/AtriaActiveSessionRestorePreparer.swift:397-404 | Atria/Atria/AtriaHistorySection.swift:55-63 | Atria/Atria/AtriaWhoop4CompactIMUCoverageGate.swift:152-160 | Atria/Atria/HealthKitExporter.swift:2045-2053 | Atria/Atria/Sessions.swift:54930-54938 | tools/replay_step_calibration.swift:484-491 \u2014 These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActiveSessionRestorePreparer.swift"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcfb9250a8998d55bd112ff670d6f855f900bd7c7ba145be53f5c837e9d07da4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 3\u002B corresponding lines): Atria/Atria/AtriaBLEReadOnlyHistoryCapture.swift:150-155 | Atria/Atria/AtriaR10Motion.swift:137-142 | Atria/Atria/AtriaWhoop4CompactIMU.swift:100-105 | Atria/Atria/AtriaWhoop4HistoricalIngressSpool.swift:403-406 | Atria/Atria/AtriaWhoop4R10Record.swift:96-98 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEReadOnlyHistoryCapture.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b9b4ff9c1f2d16ff4c0e659138e69e120dae10768eaaf3de564b097bd846971"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaDeviceUseJournal.swift:189-194 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:953-960 \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":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53c9598453f0031b978232fea748bc3fd1394a5877a5d1d27d89b1cb48b4fc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaHealthScreen.swift:1846-1851 | Atria/Atria/AtriaHealthScreen.swift:1857-1862 | Atria/Atria/AtriaVitalsCollectionSections.swift:1410-1415 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1846}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db0893543cb039aa847d7f7210f817ba4f4e379b89e6e48523b68aca82c5276"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaHomeView.swift:3468-3476 | Atria/Atria/AtriaSettingsView.swift:387-391 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3468}}}],"partialFingerprints":{"codehealthFindingId/v1":"f772024f9906d74191890716aa46a85192504967cc91c13c518b73119ac6a1ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Atria/Atria/AtriaRecoveredMotionProjection.swift:425-433 | Atria/Atria/AtriaRecoveredMotionProjection.swift:435-443 | Atria/Atria/Sessions.swift:29217-29229 \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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d9c2bf9feb9a951a734e54ecf1a8e767cf8956849656c05c31ada097032956"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): Atria/Atria/Sessions.swift:33401-33407 | Atria/Atria/Sessions.swift:35393-35397 | Atria/Atria/Sessions.swift:47596-47600 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33401}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef83a28420040b870c0cec01cf9d95ba69e882daa4cce3d30481e87add61cef2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:3777-3791 | Atria/Atria/AtriaBLEManager.swift:3796-3809 | Atria/Atria/AtriaBLEManager.swift:3813-3828 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":3777}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca53e6e497266467ffc4d926b1f4beb83170a08fb0ddda0fbb817111f89554da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): Atria/Atria/AtriaHealthScreen.swift:1868-1876 | Atria/Atria/AtriaOverviewSections.swift:1816-1823 | Atria/Atria/AtriaOverviewSections.swift:2540-2547 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1868}}}],"partialFingerprints":{"codehealthFindingId/v1":"107544edb28b09dd4a536e7bf5fedffe00647bb8a6eb5bf60c710b6ef4b2c7a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift:540-558 | Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift:336-343 \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":"Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f3bf500c6898337ea50778c16998586350623eaf6ae12f90bbb28d7af105f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaManualSleepSheet.swift:140-147 | Atria/Atria/AtriaSharedUIComponents.swift:798-804 \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":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e83abd867f0d654eee619ef4676b5e13fd461327fbb814e0947e3728c0d3bf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaShareCard.swift:3080-3091 | Atria/Atria/AtriaShareCard.swift:3102-3111 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":3080}}}],"partialFingerprints":{"codehealthFindingId/v1":"253fd55cfab70271db08039e0be988acf4e96199a33406f986fe231e0b95a025"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaTriRing.swift:129-138 | Atria/Atria/AtriaTriRing.swift:140-147 \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":"Atria/Atria/AtriaTriRing.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bf0f1c24d33c2e9e9f82b0ae429285d924cc069f1995205fa94ff778730b23"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 10\u002B corresponding lines): Atria/Atria/AtriaVitalsCollectionSections.swift:1771-1784 | Atria/Atria/AtriaVitalsCollectionSections.swift:4310-4319 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1707-1722 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1724-1739 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":1771}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15b00cf3beb5111ff1fd11db0bcae60ee67bbb04ca98392c4cb2d9373ab61b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:355-371 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:382-399 \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":"Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a727a7fca16e9d0b8591b33696999c976d722b472522f675eca2b4b98f1892"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1994-2002 | Atria/Atria/Sessions.swift:2126-2133 | Atria/Atria/Sessions.swift:61106-61113 \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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1994}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec76ab29f5635ae1ac28b3ede6ce7020fbf07a152bf6b63d8dac018ab799d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/Sessions.swift:47547-47553 | Atria/Atria/Sessions.swift:47576-47582 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47547}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a31642f8934c16641e60a709a7f8f96497cadafc5086a5db5813b600af2a285"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/Sessions.swift:47555-47562 | Atria/Atria/Sessions.swift:47584-47590 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47555}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bfa7c1f6c803a4d8d2d81db0f8a187db55d598318fab96a4098e28698b5844c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/Sessions.swift:54079-54086 | Atria/Atria/Sessions.swift:54088-54095 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54079}}}],"partialFingerprints":{"codehealthFindingId/v1":"3391ed06223801b373bec5d74e8f38044c3fb3818082999d5961c55354cc43e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaShareCard.swift:1832-1845 | Atria/Atria/AtriaShareCard.swift:2267-2277 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1832}}}],"partialFingerprints":{"codehealthFindingId/v1":"755036ba5772d6588398a8d0cd26a2efe427b28281880ae446e83f0e18204a57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 21\u002B corresponding lines): Atria/Atria/HistoricalArchive.swift:4468-4489 | Atria/Atria/HistoricalArchive.swift:4495-4517 | Atria/Atria/HistoricalArchive.swift:5766-5786 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4468}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8547a345c9f273e3178d73280b33e4b33bfe076cb4904cce8095c5ee4157142"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaBLEManager.swift:22386-22393 | Atria/Atria/AtriaBLEManager.swift:22395-22402 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":22386}}}],"partialFingerprints":{"codehealthFindingId/v1":"c182c076091252d1eb769abb0c045c0ee06689a05189a521e11a5ad38e0d9031"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaCivilDayStepAuthority.swift:373-381 | Atria/Atria/DailyRollupStore.swift:1155-1161 \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":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"97dc8cbcc84edc19a34ba6beda8f05e37e5af86de8c71f69f5d5385321f5b485"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaExpandedChart.swift:817-829 | Atria/Atria/AtriaExpandedChart.swift:831-843 \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":"Atria/Atria/AtriaExpandedChart.swift"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1e959110bce1499f0bf82790bacebd65ba3729db53c93f557dfc427e81d38e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:2817-2823 | Atria/Atria/AtriaStrapScreen.swift:343-349 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2817}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15ac12cd019de77173bf4ffc7b8e4d468ed6516a5e26174b09d00bcd6b8ea51"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:400-408 | Atria/Atria/AtriaHistoricalArchiveCatalog.swift:693-704 \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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f71ff14cce7823acccceb1cd35129a952d328386b41fca8fd8ad53aef69494"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:420-433 | Atria/Atria/AtriaLiveWorkoutView.swift:435-448 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"598fd9c1b72dc169d45b12d7047354968a2c3e482ed748b584ad130d41ce977c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): Atria/Atria/AtriaNightTimelineLoader.swift:166-170 | Atria/Atria/Sessions.swift:4089-4095 | Atria/Atria/Sessions.swift:4127-4133 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"Atria/Atria/AtriaNightTimelineLoader.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c9c6cb7862c1ddf87181e49f5714e29715ad8eac21889ab602e7766bd6cc639"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaSmartWakeView.swift:69-81 | Atria/Atria/AtriaSmartWakeView.swift:83-92 \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":"Atria/Atria/AtriaSmartWakeView.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"98692e931d297fb6c1288bbbe30a2dc71e7873c785b8a767fba92b9c6757096d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaStrengthLog.swift:384-394 | Atria/Atria/AtriaStrengthLog.swift:396-404 \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":"Atria/Atria/AtriaStrengthLog.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b1ea13b9100272dd48797e43fcf485986243fab3241a3dceed1a2abe51c8a24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 7\u002B corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:3440-3446 | Atria/Atria/AtriaActivityMonitor.swift:4834-4840 | Atria/Atria/AtriaSameDayMainSleepSheet.swift:131-137 | Atria/Atria/AtriaSharedUIComponents.swift:789-796 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3440}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc8650df49af5e07840283193fdd8678ec179b7b32923baaa058a7008735780c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:718-725 | Atria/Atria/AtriaHealthScreen.swift:796-803 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"eafd2a57af5b3afb61afcf419a2ada378ce89f63df1aaf2f5ddf004fb204e757"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:519-527 | Atria/Atria/AtriaSharedUIComponents.swift:246-253 \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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c496dc13d4839668f41b57a50d4a648ce0f1386e8d74ad794ad52851fca10dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 8\u002B corresponding lines): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:258-265 | Atria/Atria/Sessions.swift:7238-7245 | Atria/Atria/Sessions.swift:56062-56069 | Atria/Atria/Sessions.swift:56221-56228 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc99af476d711ec2474866f30919cbb9062164669240f860e3e2d8bc6331daff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Atria/Atria/AtriaMetricProvenanceCard.swift:93-103 | Atria/Atria/AtriaOverviewSections.swift:8799-8811 | Atria/Atria/AtriaSleepHypnogram.swift:807-816 \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":"Atria/Atria/AtriaMetricProvenanceCard.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e37500f397f685375d540da882149c718023a69ed2d599a11a627ad5958cc25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 13\u002B corresponding lines): Atria/Atria/AtriaOverviewSections.swift:5488-5502 | Atria/Atria/AtriaOverviewSections.swift:5547-5559 | Atria/Atria/AtriaOverviewSections.swift:5561-5573 | Atria/Atria/AtriaOverviewSections.swift:5599-5611 | Atria/Atria/AtriaOverviewSections.swift:5613-5625 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":5488}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f0b4b42ea8cab047fb32fdd2c32efe269153cc2c89e272082c1f511de84e2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaAICoach.swift:152-164 | Atria/Atria/AtriaAICoach.swift:166-178 \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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"33cdb746570e8c24743dc61a55be4b1aa1fae162f83d404d08850bc660b606b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageCoordinator.swift:72-89 | Atria/Atria/AtriaHistoricalFullDrainCoverageCoordinator.swift:106-121 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageCoordinator.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5fea5febde66a6342adfd5199970217964419d80062e0f466d7f3ce335fd43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaWorkoutSegmentAttribution.swift:172-178 | Atria/Atria/Sessions.swift:61766-61772 \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":"Atria/Atria/AtriaWorkoutSegmentAttribution.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b579f5b350c6953730171f652041e06977e33a10857e4623897b2d85d6c1fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/HealthKitExporter.swift:2039-2043 | Atria/Atria/Sessions.swift:54924-54928 \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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2039}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24177a01e415ec3c9c21d00b5934702220c1754ccb81f536dc42359f90f4a7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:170-178 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:738-750 \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":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e31647fd82ee9addbd4504c1310178e652ee3697e0c047b65add836475082e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:184-198 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:202-218 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:227-244 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"c04c97000a7bafc37e1687833fa9f449828696a464006a8f5365d15b03687cd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift:184-187 | tools/verify_whoop4_autonomous_step_corpus.swift:492-499 \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":"Atria/Atria/AtriaWhoop4HistoricalRecordDecoder.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"8098b107bebdc33b1ed8ddab3d4f920dfd21b42045aaa33d988a291abd1d06f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/Insights.swift:316-323 | Atria/Atria/Insights.swift:329-333 \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":"Atria/Atria/Insights.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"d65692c9540f27b439ef3bde577428497e658b5df78c83cbd6037e10207393d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:3234-3247 | Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:3253-3266 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":3234}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1cdd1cfd55bb932b3bb2d93d35a9118513e60cbd5de5f4b0db85287ec85f5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/AtriaHomeView.swift:11425-11439 | Atria/Atria/AtriaHomeView.swift:12067-12081 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":11425}}}],"partialFingerprints":{"codehealthFindingId/v1":"934ec2052cf82b31e8987646035e6857fbbffb8e69174ff5bf963b92694449c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaRawExport.swift:128-134 | Atria/Atria/AtriaRawExport.swift:136-142 \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":"Atria/Atria/AtriaRawExport.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"047ea7aa4bb17c53bb8ed1b3687749d25480f86b0cc38f5de1a9cc1742038155"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Atria/Atria/AtriaWhoop4CompactIMUCoverageGate.swift:162-171 | Atria/Atria/FrameParser.swift:93-102 | tools/StrapProtocol/Sources/StrapProtocol/FrameCodec.swift:4-13 \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":"Atria/Atria/AtriaWhoop4CompactIMUCoverageGate.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"68206e4e1e64f2bd73a8ce6daa5975368d3dbfbca8053f451b1b96a282da9102"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/ActiveSessionJournal.swift:1318-1324 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:271-276 \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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1318}}}],"partialFingerprints":{"codehealthFindingId/v1":"636e5744e07080bd58badd432c1d5d6cf9e92c4134313b5000be61b49dbbd7db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaCycleTracking.swift:137-146 | Atria/Atria/AtriaJournalStore.swift:126-134 \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":"Atria/Atria/AtriaCycleTracking.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"879bb340a50ff32f5b0a9e071bd1e9c52dd1c857e0ba62bd0218a0eeda5dbfed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): Atria/Atria/AtriaIMUDiagnosticTransport.swift:622-635 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:637-650 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:666-679 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9b08eac0cd2b56f9ac7e58877d4b78463d22a59c02109e0fda45a226dde56f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaNotificationCategories.swift:282-291 | Atria/Atria/AtriaHistoricalShadowCompactionCoordinator.swift:174-182 \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":"Atria/Atria/AtriaNotificationCategories.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf18319f2e15c49ef2cd2c0dc8fbf9977f49af3a58e408c00e6b7c0053fe1dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaAboutMetricSheet.swift:526-533 | Atria/Atria/AtriaSharedUIComponents.swift:352-359 \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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c58e58316034dc1030790b3d40652e57fab2ba7d08c320fc15550f12badc198"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): Atria/Atria/AtriaAnalytics.swift:865-876 | Atria/Atria/AtriaAnalytics.swift:878-888 | Atria/Atria/AtriaAnalytics.swift:890-903 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa99cf9df66fbfe2bdc2e6b9b6b0735bb0010087cef819aeaa8f5e65f9daf46"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaAnonymousDailyUploadSchedule.swift:39-42 | Atria/Atria/Sessions.swift:24375-24379 \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":"Atria/Atria/AtriaAnonymousDailyUploadSchedule.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"563e39d40d336cf22fee23fae7869662570b9fafe4e74047ec8909138b6d2806"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:32599-32614 | Atria/Atria/AtriaBLEManager.swift:32616-32629 | Atria/Atria/AtriaStressMonitor.swift:3213-3223 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32599}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ffd055159571b45579712ec91160bbdbf28537cf91d18604672f8207d17f035"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaHomeView.swift:12453-12459 | Atria/Atria/Sessions.swift:27601-27607 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12453}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7ab649da7daa57bf23913e6129fd033673f31e947e6b68c34d700cd35100eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaJournalStore.swift:136-140 | Atria/Atria/AtriaJournalStore.swift:190-197 \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":"Atria/Atria/AtriaJournalStore.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"534cf6980a623d3cdb75cbf18ddba22175963e6e189526bf247719f07d861bee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1586-1589 | Atria/Atria/AtriaTodayScreen.swift:4679-4682 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1586}}}],"partialFingerprints":{"codehealthFindingId/v1":"af439c03f3a0b7af116e1a3bf558f48b03fb2388708b9c8ccea0068e3ac2ed98"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaRecoveredRRProjection.swift:594-601 | Atria/Atria/AtriaBLEManager.swift:6941-6949 \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":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b52da8146a62bb936801065e4d3491e18aa077ea3d5c2bac2a9226bfbfd43d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaVitalsCollectionSections.swift:3956-3966 | Atria/Atria/AtriaVitalsCollectionSections.swift:3968-3979 \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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":3956}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f51f337bb3e9cc23c6d43c119672fa7da209d4e43f5735736b8ee004448821"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/AtriaWidget/AtriaWidget.swift:176-184 | Atria/AtriaWidget/AtriaWidget.swift:186-194 \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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e50ab88dbaacb61521be3d67b0f23e0aa4c463639fc78441848ae41f4f12dd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): Atria/Atria/ActiveSessionJournal.swift:1550-1553 | Atria/Atria/AtriaBLEEvidence.swift:232-235 | Atria/Atria/AtriaStrapCalibrationArchive.swift:676-680 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"01e7a34c3711834fab7d26f17f6f566e70e85654a03cf267917e244b56d3d63c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Atria/Atria/AtriaBLEHistoryTransportPhaseFence.swift:131-147 | Atria/Atria/AtriaBLEHistoryTransportPhaseFence.swift:149-170 \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":"Atria/Atria/AtriaBLEHistoryTransportPhaseFence.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb92201530ffcdf7e5726d42742c2aeba1c7f79a8007b595e6f2d7ef95bfba5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaColdSessionStore.swift:374-381 | Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:455-462 | Atria/Atria/AtriaWhoop4HistoricalOrphanVault.swift:284-289 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaColdSessionStore.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"f049b81639599948dec22b630bdf56ed0bb3bda1835d230e28fab591293d29ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaHomeView.swift:453-462 | Atria/Atria/AtriaOverviewSections.swift:5475-5486 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70597c1d83e252806a2bf1326c0da5bf0d026e4f2a79ea57e83ad7347aba00a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:683-694 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:699-710 \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":"Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"6361f14186b0c566eeef155e612bd739994a01f111b805229be63a97f2c1901d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:832-837 | Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift:272-277 \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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"fafe789eafbbb921b43995b5aeeba3ecfdc0bd2a0c6bc03d6a141ed212c7194c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHistoricalLongTermRollup.swift:1018-1025 | Atria/Atria/AtriaMorningCheckIn.swift:161-168 \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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9f404b012a2fbd1c0e1befe1d03fc0458562b8486f4c86e5e66838926e62a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3113-3118 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3120-3125 | tools/replay_whoop4_compact_steps.swift:107-111 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":3113}}}],"partialFingerprints":{"codehealthFindingId/v1":"453da32bb94c360944a6ae83b2a1f9e85422ed3911ab9d913bd8a304ccab4189"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaWorkoutReviewSheet.swift:327-335 | tools/StrapProtocol/Sources/StrapProtocol/StrapProtocolApp.swift:133-142 \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":"Atria/Atria/AtriaWorkoutReviewSheet.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"35598833da3810d7bf538a0d1392a812ded54f35c7483f13648b53beccb97b74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaCycleTracking.swift:129-135 | Atria/Atria/AtriaJournalStore.swift:110-115 | Atria/Atria/AtriaMorningCheckIn.swift:214-220 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaCycleTracking.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec08ae6249f77b71adbfcf1c27d1341d3efc48b76a3a3e415d74395c629820c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:282-292 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:211-219 \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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"28aa6f57e87ad0bf0af36ef3de3ba591e128955c2cc75700868017673cea2b5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaTrendChart.swift:2209-2213 | Atria/Atria/AtriaVitalsCollectionSections.swift:4669-4674 \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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":2209}}}],"partialFingerprints":{"codehealthFindingId/v1":"55124915017f68de89a3fb50b4838285844f44d01536581b7f9b966560fcd7cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:1036-1047 | Atria/Atria/AtriaBLEManager.swift:5752-5763 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"d643b0e0c89ee179264000b3ebb5944ceb94f81b431b341180d2660503d10750"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3699-3707 | Atria/Atria/AtriaVitalsCollectionSections.swift:5296-5304 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3699}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa6aa7e5530476b4ece1dc9349ab83425255cce5bd440c422e835d76a37dc01"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaShareCard.swift:260-273 | Atria/Atria/AtriaHomeView.swift:4565-4577 \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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"5adbf165f6dfdc71097a80902e6d4b0b691ba88dc915ce50ec9aba13dde68bf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaApp.swift:1385-1396 | Atria/Atria/Sessions.swift:36624-36633 \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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dde2ad50ab327b47c5ae5c68d457092f2325f9153646fc0f38d3f70f76d4876"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:877-884 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:229-236 \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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa2486610c46b6805f1ece835e05bad43e63278560b22c958a96c35c1f49c99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:734-747 | Atria/Atria/AtriaHomeView.swift:5471-5489 \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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0858738735830f5942549dce27c1eac2c01291d7f1b22dd5fb3053d9d85daea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:212-216 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1373-1377 \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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d5c9d5ce69b004d0dca0d4bf9721c4ed6435ff99d951d584e2a4a23c00dfc6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:4336-4344 | Atria/Atria/AtriaLiveWorkoutView.swift:4351-4359 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":4336}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5b0ef6d5d408ebcc1909d518d3d496eeee6a70b741b409bf2e02b2bb6660061"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Atria/Atria/Sessions.swift:41273-41287 | Atria/Atria/Sessions.swift:49341-49355 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41273}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f7ce839659b64a998d1ac992d6595f73f3ca54fa0568d83b306bad05dddc95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:675-684 | Atria/Atria/AtriaBLEManager.swift:6302-6311 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d48e70eb741ed2b870cddfc5d7cbbef35875c60489c77267f1eaaf04b47058"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Atria/Atria/AtriaBLEManager.swift:35780-35796 | Atria/Atria/Sessions.swift:38175-38190 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":35780}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7fa6327c3415f4e553268bf9ead72ed57bc4162da37bbb238c7a4b84d949063"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): tools/monitor_long_wear.py:43-49 | validate_hrv.py:38-44 \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":"tools/monitor_long_wear.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"b653ce0b16031ce4d5d52e4315e738016f69bda91a391d5bca53f0cbd4a08f00"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaBLEManager.swift:35868-35888 | Atria/Atria/AtriaLiveActivityCoordinator.swift:500-509 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":35868}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e70f550b694402d23ed5b29d3e3ec2d7ae286a412065bdf4d80ce83740f0d62"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaFaceOff.swift:111-115 | Atria/Atria/AtriaWeeklyReport.swift:142-146 \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":"Atria/Atria/AtriaFaceOff.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cfa9cdd190def04e4c67be90f90b4062c27b4ce978e9c2069ab67051c837104"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/AtriaFullFidelityColdSessionStore.swift:147-153 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:65-72 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:75-86 \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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eaee96963dc1ce03d9ec3e8010f484c92b31987471eeca23d6af2985a2c5f9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaTriRing.swift:196-204 | Atria/AtriaWidget/AtriaWidget.swift:3527-3536 \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":"Atria/Atria/AtriaTriRing.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"a59a3c1170e5c7198f0f9aa93929c2e7746bd093168a413157de9cfde9197f2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): tools/summarize_step_archive_coverage.py:51-56 | whoop_codec.py:16-21 \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":"tools/summarize_step_archive_coverage.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b5cef12d42a36a01fc9ad7fa5509dc38087bb69929cf0bee96d713f12d740a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:4546-4548 | Atria/Atria/AtriaHomeView.swift:4579-4581 | Atria/Atria/AtriaLiveWorkoutView.swift:2485-2487 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4546}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e30f1bae3c2c32c61cffb36c5768283a8f83bf576d9d6905f77fa1bf458e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaActivityMonitor.swift:4550-4552 | Atria/Atria/AtriaHomeView.swift:4583-4585 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4550}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fd313e50b4d2ec14fb2b488a11bb75d7dafaabc5092e246e2f2f0c3ac522e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaAppIntents.swift:379-383 | Atria/AtriaWidget/AtriaControlIntents.swift:27-30 \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":"Atria/Atria/AtriaAppIntents.swift"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3759190ef903c7c2d94eb5fa10c2caada73079ff74acc3c05fbe753618105e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalLongTermRollup.swift:559-564 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:454-459 \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":"Atria/Atria/AtriaHistoricalLongTermRollup.swift"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7936c48a548151b8e0259632810fd9d3409c8a44f7ddb777aafc6f047fc4b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaNightBaseline.swift:208-213 | Atria/Atria/AtriaRecoveryDrivers.swift:134-139 \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":"Atria/Atria/AtriaNightBaseline.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f77fef829d1f88361d2b479c0729ec0cbcf39ec6dfee25b123ec4a000865992"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaWeeklyPlan.swift:278-281 | Atria/Atria/Sessions.swift:61298-61301 \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":"Atria/Atria/AtriaWeeklyPlan.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"26574620f9120b98d6e53f93faaadb77ffc30d31483c35891fbbeab71117c3ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaWorkoutReviewSheet.swift:417-419 | Atria/Atria/Sessions.swift:4292-4294 \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":"Atria/Atria/AtriaWorkoutReviewSheet.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fdfbe3ef46e8c8302c9325023788b559a7e8d2e229282c94b49de1f7f99bd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaBLEManager.swift:6390-6401 | Atria/Atria/Sessions.swift:11569-11577 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":6390}}}],"partialFingerprints":{"codehealthFindingId/v1":"98368a003165cc800f6e8d15778e85c67f564fcfb7ae2ce1d208193f956ac2e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaDeviceUseJournal.swift:152-155 | Atria/Atria/AtriaMotionBankDutyCycleDiag.swift:72-76 \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":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4940fb82582d2bd887f2ca0aae09ffed215bf18cec20a5d60390c61869911764"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Atria/Atria/AtriaHeroConnectionSections.swift:538-543 | Atria/Atria/AtriaSharedUIComponents.swift:206-211 | Atria/Atria/AtriaStrapScreen.swift:447-453 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4faa10512b1d048a6d8f6d30f4a16f4ae2aa7bde2c3341001696a786a805bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift:338-342 | Atria/Atria/AtriaHistoricalHighVolumeStoragePlanner.swift:258-262 \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":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"8732693da9b1c3f797cc1bb65d578f81958c5df96ba573685cab17146692fc81"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:1418-1422 | Atria/Atria/AtriaWorkoutRoute.swift:918-926 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1418}}}],"partialFingerprints":{"codehealthFindingId/v1":"03017702f330d5a8d27b18a8f3ef93e6f0d16916c4feb89784c07265ba9c3f5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:1300-1304 | Atria/Atria/AtriaVitalsCollectionSections.swift:279-283 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c30ee321bb6fa283d2dac13103547769c1fa7618f38957b324ad2f2ff2d7024"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 4\u002B corresponding lines): Atria/Atria/AtriaAnalytics.swift:2378-2381 | Atria/Atria/AtriaMonthlyReport.swift:200-203 | Atria/Atria/AtriaSleepWakeResearch.swift:1329-1332 | Atria/Atria/AtriaTrendChart.swift:462-465 | Atria/Atria/Sessions.swift:47529-47532 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":2378}}}],"partialFingerprints":{"codehealthFindingId/v1":"198fda079de8c92e86f51cceaff4cca4f777589587cafca49660d14271ee4585"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaAssistantScreen.swift:222-225 | Atria/Atria/AtriaStrapScreen.swift:112-115 \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":"Atria/Atria/AtriaAssistantScreen.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a66c244862a96702419ffa63df4634ba02e55555d70a76b2795347307273cb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 4\u002B corresponding lines): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:287-290 | Atria/Atria/AtriaHistoricalActivityProjection.swift:804-808 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:639-643 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:988-991 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:367-370 | Atria/Atria/AtriaHistoricalLongTermRollup.swift:1013-1016 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1bae5588026004747bc27a0921e760622851c1b367974756558d9f555fb2958"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): Atria/Atria/AtriaHistoricalAggregateReader.swift:860-863 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:694-697 | Atria/Atria/AtriaWhoop4HistoricalOrphanVault.swift:247-250 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa5b3e3faebcb900895cd66bfdb1d1543bc4d9ff7debbf3daed8fb1c4fd1ea7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): Atria/Atria/AtriaMainThreadWatchdog.swift:35-39 | Atria/Atria/AtriaReconnectLeaseTrail.swift:25-30 | Atria/Atria/AtriaWorkoutRoute.swift:928-932 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"Atria/Atria/AtriaMainThreadWatchdog.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a39adf36ea4477c7b21d6df231d0ba7524b984bbcdb135759227c1dc280f6ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:31919-31922 | Atria/Atria/AtriaWhoop4CompactIMU.swift:96-98 | Atria/Atria/AtriaWhoop4R10Record.swift:92-94 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31919}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ff169d6e21564eb52ab220b43f91b237ea8835490965720eb1501c31105e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1362-1367 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:238-242 \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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4f2161fef4131bfc17110a448f94a3786ef9c96a39d5bc84d1f344d97410887"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Atria/Atria/AtriaR10Motion.swift:133-135 | Atria/Atria/AtriaResearchProbe.swift:323-325 | Atria/Atria/AtriaWhoop4CompactIMU.swift:92-94 \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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"709c716b4d4b62fb817ce9cc8e46b5554959be77b7145e5bd907e2992beb2342"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaTrendChart.swift:1191-1194 | Atria/Atria/Sessions.swift:56332-56335 \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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc743cedbad0bf327f226c854db5a6bbd3780d9ecffcadc59533fc998d131197"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:2999-3016 | Atria/Atria/AtriaBLEManager.swift:6673-6682 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2999}}}],"partialFingerprints":{"codehealthFindingId/v1":"483a1b169455197430494dc93a0f33d8c58e2feaa0af534b478e7c8ae765241c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaCivilDayStepAuthority.swift:156-160 | Atria/Atria/AtriaTrendChart.swift:1816-1819 \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":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1b6b6aecba20fb14adc43b57ec1c431e383a0abeee8a0dcfe5d79340a77638"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:370-373 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:419-424 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:445-448 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3057837a287ea2c8ff98c52b0d2fae21c576b3dade71fb63be47244ff35985e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:10262-10268 | Atria/Atria/AtriaTodayScreen.swift:3381-3385 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10262}}}],"partialFingerprints":{"codehealthFindingId/v1":"001089a9c1e84eed44cb2a63129ed727261a14f5869fcc5cb4569465d13134fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaAppIntents.swift:219-222 | Atria/AtriaWidget/AtriaControlIntents.swift:49-52 \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":"Atria/Atria/AtriaAppIntents.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad818fd362ab48a3aa1086fbddc3aaf0a31c4c079fe3ec651d1c8cf0924a030d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaBLEManager.swift:835-840 | Atria/Atria/Sessions.swift:30605-30612 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8c0d42eba835e3fa1a1243c827e33148a89243a25fd5320fe9c7dbfa0eb7e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaAICoach.swift:46-49 | Atria/Atria/AtriaHapticAlerts.swift:54-57 \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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"e440618b2e390ae332109ca4599dc2b775919b021208690b6a68394a091cbfb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:447-461 | Atria/Atria/AtriaBLEManager.swift:6765-6777 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d67fea2181f68709202faf9077931cbb86986fff6c3cea25e52b0ba109703c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaCycleTracking.swift:213-216 | Atria/Atria/AtriaJournalStore.swift:204-207 \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":"Atria/Atria/AtriaCycleTracking.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff401ebd49884cf27756c87e89e880c254a273f47358ae8354e4f47cc6da485"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): Atria/Atria/AtriaLiveActivityLockPreview.swift:107-110 | Atria/Atria/AtriaLiveWorkoutView.swift:3368-3371 | Atria/Atria/AtriaStrengthSetLogging.swift:69-72 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"Atria/Atria/AtriaLiveActivityLockPreview.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3bfef81c5b15523db10ca15eb79041b738848b0d93927fd0392e7e3e00085fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaMainThreadWatchdog.swift:155-159 | Atria/Atria/AtriaStressMonitor.swift:566-569 \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":"Atria/Atria/AtriaMainThreadWatchdog.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cfb791443ca7de095ef3739120b15b174c32d01038ebc1b13ebf84f4d519a39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaSyncHealth.swift:86-88 | Atria/Atria/Insights.swift:239-242 \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":"Atria/Atria/AtriaSyncHealth.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"459a39a16bc4027bd3b0c8371fd51f2751b97b7ada003d21c0cc43da34dd548b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaResearchBundle.swift:583-586 | Atria/Atria/AtriaWorkoutRoute.swift:84-91 \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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"477cb552cde28a5d6a13792bcb57d78ffcd79dc9d40617d84030a4abb276e277"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Atria/Atria/AtriaStrengthProgress.swift:39-47 | Atria/Atria/AtriaTrendChart.swift:1724-1734 \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":"Atria/Atria/AtriaStrengthProgress.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa50b3955b6c7cd12bda4d3201cba6746aec6054ed7325139ff1c9883de94a6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:173-180 | Atria/Atria/AtriaBLEManager.swift:32782-32788 | Atria/Atria/AtriaStrapPowerPolicy.swift:530-537 \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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a6172691d9bbf2f553b21a83cd67067d6fbb358335fbcf2ad12547ac05ef6ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3625-3628 | Atria/Atria/AtriaSettingsView.swift:2099-2102 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3625}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc31f62819e08585fee8fdc4c3832c7fc4601b03545da797108e5240dd84f84"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift:303-313 | Atria/Atria/AtriaBLEManager.swift:12412-12422 \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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1497f88768b0d7192ac142688b45108f52b4975d357892e2994ee5bfa8de478"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaHealthScreen.swift:2301-2307 | Atria/Atria/AtriaTodayScreen.swift:3578-3584 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2301}}}],"partialFingerprints":{"codehealthFindingId/v1":"4198054ed48674f4cffab8699015e3e039963aeed9134a625d5828f5003d670f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:910-917 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:586-591 \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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"a59b6d212ffe19b2435916e025a0e6fd4b206015e41edaf2769451b7b54eaa39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3565-3568 | Atria/Atria/AtriaSettingsView.swift:2035-2038 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3565}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e710ecf8583db521413cc0c8846b65ee38bb42fecb7cc68bff620b338d9b848"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3570-3573 | Atria/Atria/AtriaSettingsView.swift:2048-2051 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3570}}}],"partialFingerprints":{"codehealthFindingId/v1":"976f8edd31a2b2e3ebf57d342583f7a9500557706abdc291274f7b7789d7ef5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3596-3599 | Atria/Atria/AtriaSettingsView.swift:2070-2073 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3596}}}],"partialFingerprints":{"codehealthFindingId/v1":"50366467d351ab0725f95038557bdd035d33960ccc233d779d8dad1c2b2289c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3601-3604 | Atria/Atria/AtriaSettingsView.swift:2075-2078 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3601}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ef458a7a8586620e56d5cad4fddc746403c5aa45003a7389dd8769e9180167"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3606-3609 | Atria/Atria/AtriaSettingsView.swift:2080-2083 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3606}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dc18bb4b0366c84eec346da0dafcb61c7b9721d04cd4148aa18187a74bbb34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3611-3614 | Atria/Atria/AtriaSettingsView.swift:2085-2088 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3611}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa4280ccef748c71ff886ce6b62d24ac3e45cbca3edece29f307e0b84e3218b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3616-3619 | Atria/Atria/AtriaSettingsView.swift:2090-2093 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3616}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f0789c5ec81c9e8b647a024ad9f13cd36b1e11578b4c48bded5e5f5b65260e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaOverviewSections.swift:3630-3633 | Atria/Atria/AtriaSettingsView.swift:2104-2107 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3630}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ef4dcbd4dad1a56454964656153f52149c58ec4aa6347e665db7c1bd492bd37"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:1188-1200 | Atria/Atria/AtriaBLEManager.swift:5983-5990 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"6446eee3546031a38351d142bac649acbc0676a3400b5960280885ea885c14ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaBLEManager.swift:31908-31910 | Atria/Atria/Sessions.swift:56785-56787 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31908}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9f2c8d93e746792a71ca33126451e4bd1c2fa14b60c7cbc7214840ca6dbba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 3\u002B corresponding lines): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:375-377 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:426-428 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:600-602 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:450-452 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"be69f4d3067ce48722d13d1e3f2f0eedae68eeb11a3c5e39c84e1b7779092c44"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaHistoricalGapLedger.swift:1463-1467 | Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift:448-452 \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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":1463}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8758b5080a60f3d23fa826302b9908b1e61d87fdca747cbb71fbb5dfcae19d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHistoricalRetentionTransaction.swift:498-503 | Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift:478-483 \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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bd278cdf1dff8799b311e26e132e68228846636c2ccad08dd66d2ce96d3b7c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Atria/Atria/AtriaHomeView.swift:8271-8276 | Atria/Atria/AtriaLiveWorkoutView.swift:3747-3752 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":8271}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ad4588dea328b4817256c4797c0fe026ebb10006731ebdb5ad9f15d2ab33ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaMetricConfidencePresentation.swift:164-167 | Atria/Atria/Metrics.swift:324-327 \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":"Atria/Atria/AtriaMetricConfidencePresentation.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2817641eddb6472ba707bf86a3c7b8f5f3af960fd0d194415d0362946272137"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift:320-330 | Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:344-356 | Atria/Atria/AtriaBLEManager.swift:29082-29094 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84f96be13ce548b84775ebc0c17fd2cc547ebd903305c2083fadc4d59449021"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaCustomizeSheet.swift:570-576 | Atria/Atria/AtriaLearnedInsights.swift:53-60 \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":"Atria/Atria/AtriaCustomizeSheet.swift"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"04819bd2adf2d17549b94fca5fc03980c6012ff5a8743e4a058dec53514d25c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:278-281 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:358-361 \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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc000f9cd9e1241c28c1815d9cff43758ab2df74fd41e5e36bc5c5e2f1f3705"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaWeeklyPlan.swift:400-402 | Atria/Atria/AtriaWeeklyReport.swift:231-233 \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":"Atria/Atria/AtriaWeeklyPlan.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f1011ee84c441e62542cfc1171c133546819d5ca0a3693d0a339e1616259ebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): Atria/Atria/AtriaColdSessionMigration.swift:272-275 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:711-716 | Atria/Atria/AtriaMorningCheckIn.swift:112-114 \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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a2e612b51d794939e84dd21927d316c5cfd60855b644443bdbcfa2d6c19fed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaHomeView.swift:6060-6063 | Atria/Atria/AtriaShareCard.swift:915-918 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6060}}}],"partialFingerprints":{"codehealthFindingId/v1":"a092f103f2be4cd7ddb1617c8978ba175070789ade010fd0884bba57a014ff60"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:3429-3432 | Atria/Atria/AtriaStrengthSetLogging.swift:93-96 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":3429}}}],"partialFingerprints":{"codehealthFindingId/v1":"bff6dea1e322a671ecde16ff4b72000358ebc74f1624c9904366b23e53978f5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaNightTimelineLoader.swift:13-15 | Atria/Atria/AtriaSleepHypnogram.swift:155-157 \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":"Atria/Atria/AtriaNightTimelineLoader.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"412468260584f1f53b9cf7ffa8442e64d78478092292187bcb33bf99f213a335"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 3\u002B corresponding lines): Atria/Atria/AtriaBLEManager.swift:31832-31834 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:1898-1900 | Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift:283-285 | Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:731-733 | Atria/Atria/HistoricalArchive.swift:9540-9542 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31832}}}],"partialFingerprints":{"codehealthFindingId/v1":"2636b237e5211ab467d6780413da42523c7e09e543e2c59e49f9405446cfa089"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaBLEManager.swift:32476-32481 | Atria/Atria/AtriaWorkoutPromptEvaluator.swift:305-308 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":32476}}}],"partialFingerprints":{"codehealthFindingId/v1":"a627461033bb339903bc2c1ee30444c355992a9e9b2fe8b170ac9b42588e94fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaLiveWorkoutView.swift:3626-3629 | Atria/Atria/AtriaNightTimelineLoader.swift:349-352 \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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":3626}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3ab73cef3e1ccc958fffa281e3168031be455e48067882203b8f2979cd931d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): prepare_reference_rr.py:51-60 | tools/replay_sensor_reference.py:191-197 | validate_hrv.py:68-74 \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":"prepare_reference_rr.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef4d9421378c2c85b9b348f540e397d1bf3ac591b7d5616f33d923d003b0d671"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift:221-232 | Atria/Atria/AtriaBLEManager.swift:35856-35866 \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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec7ce9adad7fbd560dbf190817f5c84ed4775f3f6a683878fbf7ece0a540acc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:3202-3215 | Atria/Atria/AtriaBLEManager.swift:5344-5351 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":3202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a334a02a959e37276785e52f1d08af490b5c133b06c945a44909401a7a2bc562"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:516-521 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:690-693 \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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b99d86e120ad591a84ad76ca4875275b624f1ebcf295b7826df4e57371c13a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/HealthKitExporter.swift:196-200 | Atria/Atria/LocalNotificationScheduler.swift:7-11 \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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe0262faf6b152449e73f0d77652a9c1a221096db519597f94fc773f5e5ff48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Atria/Atria/AtriaBehaviorImpact.swift:167-169 | Atria/Atria/AtriaOverviewSections.swift:8980-8982 \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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8886662b52ffab4147a6da5b3aa75cd0f689e0d75307d4354174e359cf914af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift:2509-2519 | Atria/Atria/Sessions.swift:16207-16213 \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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2509}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b25bdd53669c7007652066e4fbf09f21ec5c208e6331db86c8d4e0ee108c31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:225-229 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:894-898 \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":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"555bc450c875a77ed6ac315b894a7b98b11a479572561710e2162a4477635d55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (61\u201362 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:4054-4114 | Atria/Atria/AtriaActivityMonitor.swift:5091-5152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:4054\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4054}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cf77d23e9c5b6f47bb4a0f28facacbb5fbd920c1e363cfe3429c54bc1f3df81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47\u201349 lines \u00D7 2): Atria/Atria/Sessions.swift:2056-2104 | Atria/Atria/Sessions.swift:56702-56748 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:2056\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":2056}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df0e84fbd6e7824a3beed8e0f681c27bae5ec5eb0d68d5aeb911feead76ad86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201348 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:7609-7656 | Atria/Atria/AtriaBLEManager.swift:7714-7758 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:7609\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7609}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c379cdf694d605116055d789c7933db3f36cfd8401295aac7f1bb766a5afcf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43\u201344 lines \u00D7 2): Atria/Atria/Sessions.swift:23659-23701 | Atria/Atria/Sessions.swift:23853-23896 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:23659\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23659}}}],"partialFingerprints":{"codehealthFindingId/v1":"c106047a696ba73167c8236b8286ce209ce896275dfb597d3df99adc569d4273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201345 lines \u00D7 2): Atria/Atria/Sessions.swift:33020-33064 | Atria/Atria/Sessions.swift:33181-33215 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33020}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3b807ff92945322a6b85f079b2ac298331accf0bdefa0078353a1769b2c596"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201341 lines \u00D7 5): Atria/Atria/AtriaAboutMetricSheet.swift:57-66 | Atria/Atria/AtriaAboutMetricSheet.swift:88-97 | Atria/Atria/AtriaAboutMetricSheet.swift:122-140 | Atria/Atria/AtriaAboutMetricSheet.swift:164-204 | Atria/Atria/AtriaAboutMetricSheet.swift:211-235 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaAboutMetricSheet.swift:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"efbae8db932b7b1a090e5d45beb656b16d6ef284876844d090a7f7faca3b019d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201341 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3277-3312 | Atria/Atria/AtriaSettingsView.swift:2254-2294 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3277}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf7feaacd1d270400259fcdcc8d7f88eafcc83284178c82136024ffd911e83d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201340 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:47036-47075 | Atria/Atria/AtriaBLEManager.swift:47243-47274 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47036}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aea71d2a8d7665142155b70cec7b3c4547a1444280e4a1783de10488f8733c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:356-394 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:756-794 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"4282a2f23305dfc7f92d35b609500fc0a2ad29cd1f889c819002c41015390a3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201336 lines \u00D7 2): Atria/Atria/Sessions.swift:56565-56600 | Atria/Atria/Sessions.swift:56624-56653 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56565}}}],"partialFingerprints":{"codehealthFindingId/v1":"616cc7d9b1a91f65162ff4778ba10b546267522a539d13b2ce8b856e0db12dd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201335 lines \u00D7 2): Atria/Atria/Sessions.swift:22426-22452 | Atria/Atria/Sessions.swift:22556-22590 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:22426\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 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22426}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e819f869167b64392630eb9f9e5613983ec4227596700a3be95ffe6853f32b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201335 lines \u00D7 2): Atria/Atria/Sessions.swift:33803-33836 | Atria/Atria/Sessions.swift:34549-34583 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:33803\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":33803}}}],"partialFingerprints":{"codehealthFindingId/v1":"a996af672f4aa545de29776839bda12415dc2844de88888480a089e6166c25d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201332 lines \u00D7 3): Atria/Atria/ActiveSessionJournal.swift:527-550 | Atria/Atria/ActiveSessionJournal.swift:750-781 | Atria/Atria/ActiveSessionJournal.swift:903-934 \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 \u0060Atria/Atria/ActiveSessionJournal.swift:527\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e417d8a606a8273aa5666446a9b4215c8dd72e2038719c01d026c8e5114eee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201332 lines \u00D7 2): Atria/Atria/Sessions.swift:986-1013 | Atria/Atria/Sessions.swift:1049-1080 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:986\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b44433daf822fd5f9dc787d780b305bc6937dabad0f5400f9e6940d667bc578"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201331 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:639-669 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:248-273 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"e13dd728433024ad6750c0a60374afa754d2abe96f46b9ebfa98673b7704c61d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:10146-10176 | Atria/Atria/HistoricalArchive.swift:10292-10322 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10146}}}],"partialFingerprints":{"codehealthFindingId/v1":"62011b0602a78ea4a5a2d9e11826a786f5224a853f2aeb03ae89ea2915cc0b17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Atria/Atria/Sessions.swift:32641-32670 | Atria/Atria/Sessions.swift:32689-32718 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":32641}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a842ed19307de79245ae440b6714159f37c0cb4e99ae8fa9c208a9e8fe103c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:26878-26905 | Atria/Atria/AtriaBLEManager.swift:26944-26971 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:26878\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaBLEManager.swift:26876\u0060 calls \u0060set\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:26942\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26878}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9aac8287eced7b0d57c556fdbfbe52f2f0501bd1971b17791a39126b82a9e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:28829-28856 | Atria/Atria/AtriaBLEManager.swift:28877-28904 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:28829\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 \u0060peripheral\u0060 to \u0060CBPeripheral\u0060 in one and \u0060systemConnected\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28829}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3b9c6a6ce5f1592e9f3beb8b0332b541c60562bf2a34be48f395e834aff025"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:38898-38925 | Atria/Atria/AtriaBLEManager.swift:38955-38982 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:38898\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":38898}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47c2ed2bb3279be00b88c8064d83cead0536a39f3265617158a473281634432"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:46782-46809 | Atria/Atria/AtriaBLEManager.swift:46825-46852 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:46782\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46782}}}],"partialFingerprints":{"codehealthFindingId/v1":"0831fca4942b453f6cd478bd653f9ba1ca8144288fa0f77398a16ca00b3ea742"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): Atria/Atria/AtriaFullFidelityColdSessionStore.swift:412-438 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:593-620 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7f67fb942166963ea814a7d6c72a144831d930910460c2e75b5c7de7e73dd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:14872-14899 | Atria/Atria/AtriaHomeView.swift:14903-14930 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHomeView.swift:14872\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14872}}}],"partialFingerprints":{"codehealthFindingId/v1":"6522f20e1a2a786a0c407f93cbfb015fdbced7ca71d4bc907079e99db6f4a29b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201328 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1620-1643 | Atria/Atria/AtriaTodayScreen.swift:4712-4739 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:1620\u0060 it does not close everything it opens, so those exact 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 \u00604\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f55fd151f3b3b0f5e4e148819a80aeb3088665a2f6c33e663f643dc6f49170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainPolicy.swift:111-138 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimPolicy.swift:56-83 \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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainPolicy.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3ae6bf89be479605e92659f107be1483303c9a3534744fa139618a19aad065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 2): Atria/Atria/Sessions.swift:23722-23747 | Atria/Atria/Sessions.swift:23922-23949 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:23722\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23722}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e2ee15b7afad1f5de4fca79bb335a0b813f20b9d910b94bb599268271ff082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:13332-13357 | Atria/Atria/AtriaBLEManager.swift:16972-16998 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13332}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf0e9c87707d09f1de211b74362775e4b455ea940d8f7c0276f4bb58210e2b6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:26284-26310 | Atria/Atria/AtriaBLEManager.swift:26347-26373 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:26284\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26284}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71c7dc2716be0523ef19175427bc9f4c67e75abd6dfa210371d7dac233cc09a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Atria/Atria/AtriaFullFidelityColdSessionStore.swift:341-367 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:523-549 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaFullFidelityColdSessionStore.swift:341\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaFullFidelityColdSessionStore.swift:339\u0060 calls \u0060UInt64\u0060, \u0060max\u0060 and \u0060Atria/Atria/AtriaFullFidelityColdSessionStore.swift:522\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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d42640eeeaa678fa87518b29bd017110df4d02650427b8080a9d9fa2757c6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 2): Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:297-323 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:389-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e803f3edc508ca51509dde2e2a1dae734f96134126280349a7bcdd7cf3faf6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionProjection.swift:374-398 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1237-1263 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1cdcbb643921e2fec604849398dc65a887385ec10cbf157ac029e58c49d7688"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201327 lines \u00D7 2): Atria/Atria/Dashboard.swift:500-526 | Atria/Atria/Dashboard.swift:599-621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Dashboard.swift:500\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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060recovery\u0060 to \u0060Int?\u0060 in one and \u0060Int\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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b898226c9db966ddaf16528aa396cc672edcfda63e9811d68a012c961b3866b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201327 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:8744-8764 | Atria/Atria/HistoricalArchive.swift:8795-8821 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:8744\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8744}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a586d5da3188c0abd457afb7d5a54a4c8f40101e71ff804a23970f6d6fad53c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): Atria/Atria/Sessions.swift:15267-15293 | Atria/Atria/Sessions.swift:15302-15327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:15267\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15267}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b829d59550daa1f2f554a3cd11b089ce6da182cceb9cbcc7aa1d5ba9dc6d57c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201327 lines \u00D7 2): Atria/Atria/Sessions.swift:34769-34795 | Atria/Atria/Sessions.swift:35594-35615 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:34769\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34769}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c116deb68a176ad0c1adbf7437e745f4a039ceed3513c0d90d8d909bc21721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): Atria/Atria/Sessions.swift:22000-22025 | Atria/Atria/Sessions.swift:27110-27135 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22000}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf25747e7c799daf17e768ce22935ec3affd4766fddb3cdda322adc2492d26d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25082-25106 | Atria/Atria/AtriaBLEManager.swift:25122-25146 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25082}}}],"partialFingerprints":{"codehealthFindingId/v1":"f896d30255e7ddbeacd2e8f0bdfe912f5ad2085d4b94bd5ff806b642b7655da9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 2): Atria/Atria/Sessions.swift:19113-19137 | Atria/Atria/Sessions.swift:19421-19443 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:19113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c28566633e8b80c34ca80bdab6c9e0ee30e5a88345a451e755cb7c4dbcaffa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): Atria/Atria/Sessions.swift:22774-22798 | Atria/Atria/Sessions.swift:23044-23067 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22774}}}],"partialFingerprints":{"codehealthFindingId/v1":"4590fced4fe7283b1665bcc30cdb7117f4212dbdc671a5869713e2a6474e7539"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:1635-1658 | Atria/Atria/AtriaShareCard.swift:2054-2077 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:1635\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaShareCard.swift:1633\u0060 calls \u0060UUID\u0060 and \u0060Atria/Atria/AtriaShareCard.swift:2052\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1635}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7000e12bc3a4316fe6038de5b543b735b4e63947bbda7cb1fcd68d847ade32a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201324 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:2364-2387 | Atria/Atria/HistoricalArchive.swift:2490-2509 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:2364\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2364}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f2e0862f1eb47678d5377098b52fc2a2f22418304d39d6cbd705f44a0dae2df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201324 lines \u00D7 2): Atria/Atria/Sessions.swift:44690-44711 | Atria/Atria/Sessions.swift:44767-44790 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:44690\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 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44690}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ee8579a4afc8416b7c7261610dc6bb24f5efb98b2a671348cb7adc86e4fa66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41435-41457 | Atria/Atria/AtriaBLEManager.swift:41803-41824 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41435\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41435}}}],"partialFingerprints":{"codehealthFindingId/v1":"7214f0c48dceb4ab594b130478a904d09f1596804e261d78b1d60126f39fd1b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201323 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:54289-54311 | Atria/Atria/AtriaBLEManager.swift:55106-55125 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54289}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0208a2edb593ca160c9c295d78383229cc608f61a2a58eedc328374d08d162"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9731-9753 | Atria/Atria/AtriaSmartWakeView.swift:325-347 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:9731\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9731}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9d4d138ff07d2aecdf91c24cda5c8ffb6636e5be3ccb2f78b49d553c027e5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): Atria/Atria/Sessions.swift:17246-17268 | Atria/Atria/Sessions.swift:17348-17368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:17246\u0060 it does not close everything it opens, so those exact 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060budgetSeconds\u0060 to \u0060TimeInterval = 240\u0060 in one and \u0060TimeInterval\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":17246}}}],"partialFingerprints":{"codehealthFindingId/v1":"002975484cfd363375c05a5079948e6cb3acac01f7893aa5ffaf947e62379673"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:3048-3070 | Atria/AtriaWidget/AtriaWidget.swift:3129-3151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:3048\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3048}}}],"partialFingerprints":{"codehealthFindingId/v1":"770d5549cd9e79ef35719d84963d7c4c79855018b4b4d68231c386bc5fed56d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201322 lines \u00D7 4): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:292-307 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:266-281 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1040-1055 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:1045-1066 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. 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":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e1802a81e9cc09501ee3d3e9e5dd708979b62363e59193c5d1374beb14e5e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:967-987 | Atria/Atria/AtriaActivityMonitor.swift:1005-1026 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:967\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"898631a29fdefce1f78cf0043605460ff8e75c0d4eefeb9c0b1feef57ef41781"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201322 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:2810-2831 | Atria/Atria/AtriaActivityMonitor.swift:2916-2931 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:2810\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":2810}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6c7c66ccb5863ab18dcff865d640364b99cf32243df10254989ccd680de0dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Atria/Atria/AtriaIMUDiagnosticTransport.swift:446-467 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:1412-1433 \u2014 both copies are in the same file, so extract the block 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, \u0060Atria/Atria/AtriaIMUDiagnosticTransport.swift:445\u0060 calls \u0060isSoftwareResetRequested\u0060 and \u0060Atria/Atria/AtriaIMUDiagnosticTransport.swift:1411\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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"684e2d428fd5d8e550e5636a443c3a7eb11281651553b492d1828afa0833b1bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): Atria/Atria/AtriaNightTimelineView.swift:352-373 | Atria/Atria/AtriaNightTimelineView.swift:380-400 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaNightTimelineView.swift:352\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaNightTimelineView.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e53e5dbca6d612fa2fc00cbb40ca04757343ca0f1838440ecb380b1352b0ea3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Atria/Atria/AtriaWorkoutOnset.swift:28-49 | Atria/Atria/AtriaWorkoutOnset.swift:88-109 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWorkoutOnset.swift:28\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWorkoutOnset.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20ff9cbf3cae198567a4da7e4e68d2d661b75dfcb1206b2ea3aacf93169d9e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201322 lines \u00D7 2): Atria/Atria/Sessions.swift:24026-24047 | Atria/Atria/Sessions.swift:24136-24152 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24026}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed51a8b09ff6da945200f4218a35a01aa4d826979268e3d7daa1696a4d11adb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Atria/Atria/Sessions.swift:27654-27675 | Atria/Atria/Sessions.swift:27798-27819 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27654}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e5d7a449e016336180b46336c80e38e17e97c79b42d16bf4192a0fc5fb3ebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201322 lines \u00D7 2): Atria/Atria/Sessions.swift:33066-33087 | Atria/Atria/Sessions.swift:33218-33234 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:33066\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33066}}}],"partialFingerprints":{"codehealthFindingId/v1":"587e780df19e40d0f99c0769a77bfecde88d97403fb9f40f5310f26202a6d2b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Atria/Atria/Sessions.swift:37245-37266 | Atria/Atria/Sessions.swift:37547-37568 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37245}}}],"partialFingerprints":{"codehealthFindingId/v1":"df0bfbf7635c5f4dac010ac1430dbb3a38c9b676845d137e9f86429afa3375e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 2): Atria/Atria/WidgetSnapshot.swift:293-312 | Atria/Atria/WidgetSnapshot.swift:1105-1126 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fc50b959ef766bb2645634dcdd1240d9a13745f820aa27cf12e4b558e6f773"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:10153-10173 | Atria/Atria/HistoricalArchive.swift:10299-10319 | Atria/Atria/HistoricalArchive.swift:10462-10482 \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 \u0060Atria/Atria/HistoricalArchive.swift:10153\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10153}}}],"partialFingerprints":{"codehealthFindingId/v1":"588ebccc207a4397a5c23c831c6829806256fff152a24d4c6de493911a883977"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201321 lines \u00D7 3): Atria/Atria/Sessions.swift:34758-34777 | Atria/Atria/Sessions.swift:34839-34859 | Atria/Atria/Sessions.swift:35583-35601 \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 \u0060Atria/Atria/Sessions.swift:34758\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34758}}}],"partialFingerprints":{"codehealthFindingId/v1":"a437e43900b263402ad1c3d2d323f34842169e39de5d416951a72e55c9966bcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201321 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:24302-24320 | Atria/Atria/AtriaBLEManager.swift:24332-24352 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:24302\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24302}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0042fff8acddbbfb2e51ae628895ef64b0b7e32317afaddc2b9b8e390ecd18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41020-41040 | Atria/Atria/AtriaBLEManager.swift:41562-41581 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41020\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41020}}}],"partialFingerprints":{"codehealthFindingId/v1":"49bbcd37ee5f70d32639be474265cebd561d19a7c227329f536eb7473e5e884f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:145-165 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:96-116 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift\u0060 and \u0060Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:145\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. 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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba0df09517e0ab621a18c9aa7fc9ef2c4c19b111f5e1947fa46a3949bfd1e8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201321 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:476-496 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:838-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:476\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5627efd9b8d5c0e167863e81e349f8825ba164d5181e0ce02be07a0909ec97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:409-429 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:809-829 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cfdfd61dbeb3be0b90382bae1dbee639efb77a2987e54dce3d0d1e97f12b591"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/AtriaStrapStepLedger.swift:242-262 | Atria/Atria/AtriaStrapStepLedger.swift:299-319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaStrapStepLedger.swift:242\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. 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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"5205f4d1ad4fa5173468af7c076a79192361df8a17f3bf70ac0841ce5b492f4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/AtriaStressDetailView.swift:1481-1501 | Atria/Atria/AtriaVitalsCollectionSections.swift:3275-3295 \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 \u0060Atria/Atria/AtriaStressDetailView.swift:1481\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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1481}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcedf8b1cb8ff00d0ae555bc794ea3495738300e1aca2f7b2503c2fa28558409"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/AtriaWidgetDayFence.swift:37-57 | Atria/AtriaWidget/AtriaWidget.swift:149-169 \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":"Atria/Atria/AtriaWidgetDayFence.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ca996501d8ed694e4e4377d51b91ad31c3f0a748af0be592d002ccf7b58f9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:3550-3569 | Atria/Atria/HistoricalArchive.swift:3838-3858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:3550\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3550}}}],"partialFingerprints":{"codehealthFindingId/v1":"93247ed4227f212fc754a09704d7ada842d554d56e5eeb5f0f89635f15d7d834"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:5539-5559 | Atria/Atria/HistoricalArchive.swift:5696-5715 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5539}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5469c81d8052d4b1f4f502b476bbe0d48febc4fc5b2472a673dd4f4c569b998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201321 lines \u00D7 2): Atria/Atria/Sessions.swift:4170-4185 | Atria/Atria/Sessions.swift:4223-4243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:4170\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":4170}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee35612ca604075ccdbf69cf68a6e8fff45304d5c53ecd84b61b93ca7e208259"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201321 lines \u00D7 2): Atria/Atria/Sessions.swift:16572-16592 | Atria/Atria/Sessions.swift:16610-16627 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:16572\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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":16572}}}],"partialFingerprints":{"codehealthFindingId/v1":"22f7fbf678190e00992c8bac30428968e5fa77dce8bbdef78a83e72dd75ce812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/Sessions.swift:21654-21674 | Atria/Atria/Sessions.swift:21695-21715 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:21654\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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, \u0060Atria/Atria/Sessions.swift:21694\u0060 calls \u0060shouldContinue\u0060 and \u0060Atria/Atria/Sessions.swift:21653\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21654}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a9b5b45a7cdfa0cf9143104e6423986a3264a9b248cc92e65ad64c76d9a428"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/Sessions.swift:22028-22048 | Atria/Atria/Sessions.swift:26955-26975 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22028}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd07d3e9a108b0e4e879585ba211b748412c67690b4f0835a5de695cccb54f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/Sessions.swift:27090-27110 | Atria/Atria/Sessions.swift:27139-27159 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:27090\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":27090}}}],"partialFingerprints":{"codehealthFindingId/v1":"575958e5c90347e0a3144f2b9d0b286284c2baa878c6b4c9b85690429c9ba224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Atria/Atria/Sessions.swift:46283-46303 | Atria/Atria/Sessions.swift:47073-47092 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060Atria/Atria/Sessions.swift:46305\u0060 calls \u0060confirmedSleepRespiratoryRate\u0060 and \u0060Atria/Atria/Sessions.swift:47093\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46283}}}],"partialFingerprints":{"codehealthFindingId/v1":"847050040d13ed13f977eb1866d1816d261186b3e139055e43b62657f6463bba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/Sessions.swift:47770-47790 | Atria/Atria/Sessions.swift:47826-47846 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47770}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a037f7a479ed008a07a09d5fafa13ef8642b5547df44c306d5a128c3c5a9141"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Atria/Atria/Sessions.swift:52092-52112 | Atria/Atria/Sessions.swift:52172-52192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:52092\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":52092}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e62d0579157cfae055767408f67047d799d99991a9c18bd4f8a68d1b3bf948"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:4900-4919 | Atria/Atria/AtriaActivityMonitor.swift:4924-4943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:4900\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4900}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5847e30140e86c046554037faa417fcdf9eab802c54d55645a7f99ba22cba1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:57694-57713 | Atria/Atria/AtriaBLEManager.swift:57773-57792 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57694}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4859770beaad4bce29592f7e29064c28eff71bb471d4415644af28512ce655a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:455-474 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:709-728 \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 \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:455\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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec9139d040ce0f4ca38ef2ffb98cbf3b524a8c377304f20ea3ae7243e2b7d7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:612-631 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:724-743 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:612\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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3cb0ff88a27fd33549fc791dad3a28d6345a39cc26b64440f216608d46b1445"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/AtriaHistoricalRetentionTransaction.swift:355-374 | Atria/Atria/AtriaHistoricalRetentionTransaction.swift:392-411 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalRetentionTransaction.swift:355\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaHistoricalRetentionTransaction.swift:391\u0060 calls \u0060decodeManifest\u0060 and \u0060Atria/Atria/AtriaHistoricalRetentionTransaction.swift:353\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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f90efed2f71e58d5c5552e618155540f501ef6b477e939449f9818ddc79a85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:461-480 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:861-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa5f2dec43ad1a9509dcc6b2c164866a7f7b62e2e22ef2134661dfd7c448dd92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): Atria/Atria/AtriaHistorySection.swift:447-466 | Atria/Atria/AtriaHistorySection.swift:490-508 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistorySection.swift:447\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"7df7cf7eb2794de501f7642731fd27c88ea7f32b7c93d96bdf38f31d8d5d1ded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201320 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:3892-3911 | Atria/Atria/AtriaHomeView.swift:12612-12627 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3892}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3f0a868cb2810b016a9da2e96df4b07e5f982210000ada504f58424aca2664"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:1986-2015 | Atria/Atria/Sessions.swift:54871-54900 \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 \u0060Atria/Atria/HealthKitExporter.swift:1986\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060reference\u0060 to \u0060[HRReferencePoint]\u0060 in one and \u0060[ExternalHRSample]\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1986}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7a9ceddde969547455a54c24670ea4f1206c0b104db844314dfaef7db04724"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/Sessions.swift:18609-18628 | Atria/Atria/Sessions.swift:18642-18661 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:18609\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":18609}}}],"partialFingerprints":{"codehealthFindingId/v1":"6639c5e6c7f910ef8e149721003071c699cc2da02cbfc344504580a1bc5637fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): Atria/Atria/Sessions.swift:23310-23329 | Atria/Atria/Sessions.swift:23423-23440 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:23310\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 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23310}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3381f018f2f5c2c749340bc45fa86e4b9013d65dec290935fb2bdcb62e635e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): Atria/Atria/Sessions.swift:41551-41570 | Atria/Atria/Sessions.swift:41638-41656 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41551}}}],"partialFingerprints":{"codehealthFindingId/v1":"a25cb052bb340b77c70d3e031fd2944e6a5ad69e57b89a10940f344187067c83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Atria/Atria/Sessions.swift:53426-53445 | Atria/Atria/Sessions.swift:53621-53640 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":53426}}}],"partialFingerprints":{"codehealthFindingId/v1":"699029bb201f70c3753c48bc42eb9d5411a712b5f60f8832437a88b4982f91b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): Atria/Atria/Sessions.swift:18637-18655 | Atria/Atria/Sessions.swift:18676-18694 | Atria/Atria/Sessions.swift:18749-18767 \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 \u0060Atria/Atria/Sessions.swift:18637\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":18637}}}],"partialFingerprints":{"codehealthFindingId/v1":"710e6009886decf3b4d7b530f0bada368fa9b2c78660e4100e2d31e9d0f3e63f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): Atria/Atria/Sessions.swift:56079-56097 | Atria/Atria/Sessions.swift:56122-56140 | Atria/Atria/Sessions.swift:56166-56184 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56079}}}],"partialFingerprints":{"codehealthFindingId/v1":"995dc96cda76399c8f78bfab71cc13ba63c2307b6585a8a64ac2c5ab53baf66a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201319 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:1118-1136 | Atria/Atria/AtriaAnalytics.swift:1184-1198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaAnalytics.swift:1118\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c0a5867106171a51814c2289e6b5778ff37052b7f58ae1ceccfed51263cd97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:16282-16300 | Atria/Atria/AtriaBLEManager.swift:16326-16344 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":16282}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a55547862457732bcc2eda32a887c5cb35f0c6b5ea7cc29fb76b877ea5883dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:26758-26776 | Atria/Atria/AtriaBLEManager.swift:26803-26821 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:26758\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26758}}}],"partialFingerprints":{"codehealthFindingId/v1":"180bf284aa6d70c8752b10818759231f30093ec819c1ec69b004df74ef05607a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:1952-1970 | Atria/Atria/AtriaShareCard.swift:2590-2607 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:1952\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1952}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e46c0ce3fd756fa200915517180735b90ca631f70fb1ed180406817d8b8482"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201319 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:79-93 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:591-609 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:79\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":"Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a8eeddc0d9b1d4f895bc4f341679960ebc516a72dd7d9958bae2a3f065e6b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): Atria/Atria/Sessions.swift:23284-23302 | Atria/Atria/Sessions.swift:23396-23413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":23284}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70b5528de054b810f17d199fdb3ce7c8324a01eb822e0d0677d329ed1333812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Atria/Atria/Sessions.swift:38363-38381 | Atria/Atria/Sessions.swift:43123-43141 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38363}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c2b45bf5dbcca798714107067e550df76fc6cf336b383fd0cb72c0f144de1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 3): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:581-598 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:193-207 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:210-224 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:581\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":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"af4913bcca706eee6403883b189ac1c5389dc6132a4b5b0ef4326cd1b3d18eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:24995-25012 | Atria/Atria/AtriaBLEManager.swift:25061-25078 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:24995\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24995}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc5a61721805b34e359ddb720c0467f3f11d96cb48f19d8a96fd53289c187a98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41814-41831 | Atria/Atria/AtriaBLEManager.swift:42241-42255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41814\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41814}}}],"partialFingerprints":{"codehealthFindingId/v1":"541648caa33565020e75d7c27c30a27bb6c106e6aa6a1f296cf958521781e60e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:52173-52190 | Atria/Atria/AtriaBLEManager.swift:52241-52258 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:52173\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":52173}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e4b8b8f63f68414cfe4551244031c923198894d5fa079074a9ef7571604b92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:52198-52214 | Atria/Atria/AtriaBLEManager.swift:52269-52286 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:52198\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":52198}}}],"partialFingerprints":{"codehealthFindingId/v1":"7124aaacd0052245329d5a8120bb23a2778042026bbca35cee33c2c374827a3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:332-349 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:507-521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:332\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1c8fb2ecfe55dd3ed59e1d5903d7ad55cfd752c711ea4163d5d10cdee10e91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:2272-2289 | Atria/Atria/AtriaWorkoutRuntime.swift:624-641 \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 \u0060Atria/Atria/AtriaHomeView.swift:2272\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. The matched lines also transfer control out of the body holding them, 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, \u0060Atria/Atria/AtriaHomeView.swift:2290\u0060 calls \u0060hasContinuousValidatedWorkoutMotion\u0060 and \u0060Atria/Atria/AtriaWorkoutRuntime.swift:642\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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2272}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ba1be01faa1135e9fa5e3393e221bef3661214263e5331a3a6a92d9b9ba041"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201318 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1691-1708 | Atria/Atria/AtriaOverviewSections.swift:2366-2379 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:1691\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1691}}}],"partialFingerprints":{"codehealthFindingId/v1":"079b117fa4a40ef4bc39ed3cefb8e511dda5133f75fa4397c41163beae5fb135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Atria/Atria/AtriaPendingSleepReviewStore.swift:73-90 | Atria/Atria/AtriaPendingSleepReviewStore.swift:136-152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaPendingSleepReviewStore.swift:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"Atria/Atria/AtriaPendingSleepReviewStore.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a2cd1d58ecc6be0feaa115ebd29b180f14c897c75323ca5aca6a8e588485261"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:1977-1994 | Atria/Atria/AtriaShareCard.swift:2342-2359 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:1977\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaShareCard.swift:1995\u0060 calls \u0060UUID\u0060 and \u0060Atria/Atria/AtriaShareCard.swift:2360\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1977}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9ef7a4215af7c36e6a432b6ba457c833a12a5b3254e56942a654e80b69e803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:2774-2791 | Atria/Atria/AtriaShareCard.swift:2817-2831 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:2774\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note 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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2774}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e12a56958c72ea22846e72fad83023575a659d981c651a0cf55c986c10de41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:561-578 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:173-190 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fd3aa3504eba1399923f1b9c5ec9b415c7e0b554b23d0e85d1bb8aca35b445"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:1559-1576 | Atria/Atria/HistoricalArchive.swift:1604-1621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:1559\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b5895e07b1a587b7add4567b79eebd1378e44716aa5b18cb43c3f6e6ce563a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:2459-2476 | Atria/Atria/HistoricalArchive.swift:2570-2585 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:2459\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2459}}}],"partialFingerprints":{"codehealthFindingId/v1":"2861fae15ac33a6f0334494ed8265b7e3bbb2d073cfc07c2e672af0c9cb7b6ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/LocalNotificationScheduler.swift:382-399 | Atria/Atria/LocalNotificationScheduler.swift:500-517 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/LocalNotificationScheduler.swift:382\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c00bb1e6e6c2a7548fd3b505a33c49db006104e7dd7c812925fd2a26338a02d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/Sessions.swift:20612-20629 | Atria/Atria/Sessions.swift:20740-20757 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:20612\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20612}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5d4dbe3e5ca06acde18d13e81603936f17dfe815f3838292307bb9848fdeaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/Sessions.swift:21928-21945 | Atria/Atria/Sessions.swift:49031-49048 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21928}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a6f2f8ad06783ce3cafc09045912cb52b40121e57e4b82d443460012ea3928"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Atria/Atria/Sessions.swift:33442-33458 | Atria/Atria/Sessions.swift:33494-33511 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060Atria/Atria/Sessions.swift:33466\u0060 calls \u0060confirmWorkoutWindowForUIAsync\u0060 and \u0060Atria/Atria/Sessions.swift:33512\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33442}}}],"partialFingerprints":{"codehealthFindingId/v1":"b008aaacd80c12ae3a321a3e8be882e5930ede51fb8c7191ec669dff345f3800"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/Sessions.swift:34145-34162 | Atria/Atria/Sessions.swift:34217-34234 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34145}}}],"partialFingerprints":{"codehealthFindingId/v1":"452fa76aa655f137068d802fefafdc4ef7abcd2518b0fbf6102bc60d99270708"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/Sessions.swift:52132-52149 | Atria/Atria/Sessions.swift:52213-52230 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:52132\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. The matched lines also transfer control out of the body holding them, 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, \u0060Atria/Atria/Sessions.swift:52151\u0060 calls \u0060Set\u0060, \u0060startOfDay\u0060 and \u0060Atria/Atria/Sessions.swift:52232\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52132}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68b503253f98b2d417222164e99c94b943cb2168acaeef6990dfc4a2d62fea8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Atria/Atria/Sessions.swift:54052-54069 | Atria/Atria/Sessions.swift:54111-54128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:54052\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54052}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ac768697c7e97c1f2cd30385ff919bc8f8f37e8b96e5d553452a14d417a4a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): Atria/Atria/AtriaSleepWakeResearch.swift:81-97 | Atria/Atria/Sessions.swift:2086-2102 | Atria/Atria/Sessions.swift:56730-56746 \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 \u0060Atria/Atria/AtriaSleepWakeResearch.swift:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4dca0daaf5c664b5f48f6883ebb8e2a3de7bd75060d7031a79d6639d70daad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): Atria/Atria/Sessions.swift:18608-18624 | Atria/Atria/Sessions.swift:18641-18657 | Atria/Atria/Sessions.swift:18680-18696 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":18608}}}],"partialFingerprints":{"codehealthFindingId/v1":"38130e602d2c57fed17eeb48ac08d6b79e8d25c19451296d0c6f66d557af247a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): Atria/Atria/Sessions.swift:33806-33822 | Atria/Atria/Sessions.swift:34242-34258 | Atria/Atria/Sessions.swift:34553-34569 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33806}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2951df9338fd1daadcf8403df1121c77261bde5aef44b9ed399e333a0a0e64e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:39338-39354 | Atria/Atria/AtriaBLEManager.swift:39385-39401 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39338}}}],"partialFingerprints":{"codehealthFindingId/v1":"081aa9b5132bc48dbee170b1697dc8ce56791506dd270fa3a75734b436635276"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41600-41616 | Atria/Atria/AtriaBLEManager.swift:42030-42044 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41600\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41600}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a7c9bf798f6648a423f8fc83deb90cfb3ffb09381264d2b411b3feac6e0047"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/AtriaColdSessionMigration.swift:521-537 | Atria/Atria/AtriaColdSessionMigration.swift:574-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 \u0060Atria/Atria/AtriaColdSessionMigration.swift:521\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. 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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce98849652075ff8b648bad3f7ca5678ae67a710c077e8e142eada8c5aaa8199"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:192-207 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:143-159 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift\u0060 and \u0060Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:192\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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b243a40382f932816157089e7330c0ad7f0db12039cb09f4b9a0ec4583ac9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:420-436 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:686-698 \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 \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:420\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"9669c89cb270a7bfd7ffb207fb7ac3e42d0d8e536bac3ed1bf572f300383018b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:4806-4822 | Atria/Atria/HistoricalArchive.swift:5060-5076 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4806}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ada7e967467332fbc3bdf79228d07cd658b92521e7c4f3bd66b46a47cb7629"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/Sessions.swift:18530-18546 | Atria/Atria/Sessions.swift:18841-18857 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":18530}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a56803ae94168b6efe9579817b98a18b84cbcbb869e80111ff8ace508e1bc9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): Atria/Atria/Sessions.swift:22397-22413 | Atria/Atria/Sessions.swift:22525-22539 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":22397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05c18c420d0644a23aabdb37d175a77cf42d8b1d3ea1b200c6120a63d1d3186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/Sessions.swift:29039-29055 | Atria/Atria/Sessions.swift:29195-29211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:29039\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":29039}}}],"partialFingerprints":{"codehealthFindingId/v1":"1518c558698da81569fd576662a3c5c8eeba6d6734bba0463ddb64b008fcafdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): Atria/Atria/Sessions.swift:36055-36071 | Atria/Atria/Sessions.swift:36139-36152 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":36055}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ee3862dd70c007e741de3b04f60529ec23a3672b89763b4fe2e95445860665"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Atria/Atria/Sessions.swift:37161-37177 | Atria/Atria/Sessions.swift:37180-37195 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37161}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d3468fcac64b74f9d1c3e2357dd8696bb1052d5817367ca44ec81675195320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201316 lines \u00D7 4): Atria/Atria/AtriaActivityMonitor.swift:5399-5414 | Atria/Atria/AtriaStressDetailView.swift:1528-1536 | Atria/Atria/AtriaStressDetailView.swift:1803-1811 | Atria/Atria/AtriaVitalsCollectionSections.swift:3308-3316 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:5399\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note 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 after the matched lines, \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:3325\u0060 calls \u0060atriaGraphPlotSurface\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1814\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5399}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c79cc06557f71e3947f3843aaa795e5c3ae94c59e8b4e66b758c429e0992e17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:5831-5845 | Atria/Atria/HistoricalArchive.swift:5922-5937 | Atria/Atria/HistoricalArchive.swift:5954-5969 \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 \u0060Atria/Atria/HistoricalArchive.swift:5831\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5831}}}],"partialFingerprints":{"codehealthFindingId/v1":"94917ba7dd526091cd9b4e70e8af65045f7b7b8496797e0216477c0c9090ce7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): Atria/Atria/Sessions.swift:18637-18652 | Atria/Atria/Sessions.swift:18676-18691 | Atria/Atria/Sessions.swift:18825-18840 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":18637}}}],"partialFingerprints":{"codehealthFindingId/v1":"1996a9a4741e112e665b0ff91c4fc6e6519ed463d6e0ddd977f96d39c0435495"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:14600-14615 | Atria/Atria/AtriaBLEManager.swift:23313-23328 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14600}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f708c4ef19bf1681e0e9e9ddfd08f84a92ffc50d173e9f56157e1f75a02fee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:31857-31872 | Atria/Atria/AtriaResearchProbe.swift:387-402 \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 \u0060Atria/Atria/AtriaBLEManager.swift:31857\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31857}}}],"partialFingerprints":{"codehealthFindingId/v1":"40671ca91d15133cb28f968ad61aa481c30d40219bf060dd659c023a3b835eee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:39233-39248 | Atria/Atria/AtriaBLEManager.swift:39272-39286 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":39233}}}],"partialFingerprints":{"codehealthFindingId/v1":"50889f1c5129f662e118073ef0a53421268e35904e51d7ce088fbf132f21149e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:46820-46835 | Atria/Atria/AtriaBLEManager.swift:46854-46869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:46820\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46820}}}],"partialFingerprints":{"codehealthFindingId/v1":"118a281febe0aafaa8fffdf32d81f75c6cb917208b0fea079e446f8544649b52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:584-605 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:657-672 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:584\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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2706efee2194b36dd29fff85f771be90c3b59017c5bab04d80da28ee0e200d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:656-671 | Atria/Atria/AtriaHistoricalLongTermRollup.swift:928-943 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060conflict\u0060 to \u0060LedgerError\u0060 in one and \u0060StoreError\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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"685e345f779c2cf39a75f711047bbaae9ad66b5ea618369c9a50140e4b69bb02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:137-152 | Atria/Atria/WidgetSnapshot.swift:357-372 \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 \u0060Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:137\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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf41f4505a32d44bfc4e2e0ca2ac287ddce5f74f36ec34c02818fa764fc53ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:431-446 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:831-846 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:431\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c1943c8c1e9595248926e2bcf8659b84808fb00a3f7574e49d80de2f33c97f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:497-512 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:895-910 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:497\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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"657f89e36b2890270331a895320f285ba2f6594500e9df5b51808bb07b00d836"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/AtriaHistorySection.swift:1345-1360 | Atria/Atria/AtriaOverviewSections.swift:2572-2587 \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 \u0060Atria/Atria/AtriaHistorySection.swift:1345\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaHistorySection.swift:1362\u0060 calls \u0060VStack\u0060 and \u0060Atria/Atria/AtriaOverviewSections.swift:2589\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":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":1345}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b894657338a4f05ec7179e4f58d3084aefc62e9f2d360cf6c0f35a65d49c8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201316 lines \u00D7 4): Atria/Atria/AtriaHomeView.swift:10749-10764 | Atria/Atria/AtriaHomeView.swift:10766-10782 | Atria/Atria/AtriaHomeView.swift:10784-10790 | Atria/Atria/AtriaHomeView.swift:10801-10807 \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 \u0060Atria/Atria/AtriaHomeView.swift:10749\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":10749}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3de1ecdd5a4f56b64c9cb4f3a10d78dd17522049d8f8c759f5cf5f76fb04903"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): Atria/Atria/AtriaLearnedInsights.swift:423-438 | Atria/Atria/AtriaLearnedInsights.swift:463-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaLearnedInsights.swift:439\u0060 calls \u0060hourText\u0060, \u0060hours\u0060 and \u0060Atria/Atria/AtriaLearnedInsights.swift:477\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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"55d53aabcd5cb6f673f6b276c8aef52d7b925b0c5d723ae2ee0d8639bcbd8b02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:189-204 | Atria/Atria/AtriaOverviewSections.swift:9830-9843 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:189\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d871618365e1feb3f7d964f936435df8d3b9d0663fb6c5e305cf07645f95c6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:222-238 | Atria/Atria/AtriaOverviewSections.swift:9861-9877 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaad7cdfeb2c00a1f7c57fd220ec23c682b5919a093a8058ad40bd01b0eae4cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:1857-1873 | Atria/Atria/AtriaShareCard.swift:1875-1891 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:1857\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"1684ea66568c7180e882589d1ea94ac3719a0bfcdfd2a37073409edecb3d761a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): Atria/Atria/AtriaTodayScreen.swift:149-164 | Atria/Atria/AtriaVitalsCollectionSections.swift:116-128 \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 \u0060Atria/Atria/AtriaTodayScreen.swift:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"76699182d7aa8f0f864e48e46d2888798fc202075e3b205fb9f538ed6b2cbbe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:2967-2982 | tools/replay_whoop4_compact_steps.swift:45-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2967}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7fc13b0920000fac41949368a360403a081ddbcf2ea358cc83fe1bcdc8e11f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:3532-3547 | Atria/Atria/HistoricalArchive.swift:3815-3830 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"198b5ce805251c08ec62720072b834bf25ab9630cd07c16d6d23216d96a4dd8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): Atria/Atria/Sessions.swift:14065-14080 | Atria/Atria/Sessions.swift:14226-14240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:14065\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14065}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0980ad6b9e3eafd1ececc49261998595c3100bd12f11c49fb4bbda674c27daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/Sessions.swift:22824-22839 | Atria/Atria/Sessions.swift:23087-23102 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22824}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01f33bcc46e59291d27cb5020f35220e654962655a87c808f56b1a14fe3a08d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Atria/Atria/Sessions.swift:31879-31900 | Atria/Atria/Sessions.swift:49400-49421 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31879}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5f807f711173808bb920e92228378974954c80eaef931fab53f8beb23df480"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/Sessions.swift:52114-52129 | Atria/Atria/Sessions.swift:52195-52210 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52114}}}],"partialFingerprints":{"codehealthFindingId/v1":"531be96fd1d877ed6f13c7f46c19bdec8b45954a0f72ff80881213237517e72a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Atria/Atria/Sessions.swift:60277-60292 | Atria/Atria/Sessions.swift:60544-60559 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:60277\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60277}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d942c110ddf1092afc7d5196a2a39beabe7778b9275c5b428792e318b62037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 3): Atria/Atria/AtriaMetricTargets.swift:454-468 | Atria/Atria/AtriaOverviewSections.swift:3160-3172 | Atria/Atria/AtriaVitalsCollectionSections.swift:2379-2393 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaMetricTargets.swift:454\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":"Atria/Atria/AtriaMetricTargets.swift"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a90a1b3a2f289ef1b0811a1be019f4ea56b8ebb8f507f0c22b6f4c1d1fce89a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:937-951 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3160-3174 | Atria/Atria/HistoricalArchive.swift:4258-4272 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:937\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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5200e2b4ca066a5e315fe6035de21bead261a294be861df518e70c65d459b32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:10748-10762 | Atria/Atria/AtriaBLEManager.swift:10780-10794 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:10748\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10748}}}],"partialFingerprints":{"codehealthFindingId/v1":"486dfaa7dad175b8514b8bef31af6dfc5b277f320e2a5bce2f9dae7f25e96d3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:36133-36147 | Atria/Atria/AtriaBLEManager.swift:38182-38196 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:36133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":36133}}}],"partialFingerprints":{"codehealthFindingId/v1":"add5fe9fff7ff57f7ae5353f7dbfc55913bfab974de6134257004deef61a94eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:531-545 | Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:570-584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift:531\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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"db2b725d3cab37a9bb97947fb3b403588d80427af7bac1120d3a580992cd49a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:5070-5084 | Atria/Atria/AtriaHomeView.swift:5116-5130 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":5070}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba3b76bcc5b9d00179bb0b80f43c4b6b03e364aefb28a0a5a3b53129f4e07fd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:13029-13042 | Atria/Atria/WidgetSnapshot.swift:1740-1754 \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 \u0060Atria/Atria/AtriaHomeView.swift:13029\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13029}}}],"partialFingerprints":{"codehealthFindingId/v1":"c17d886e7d44fb143a1876bfb9deea92bf9dbdcebe18d8df41badaa9e53ffb7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1884-1898 | Atria/Atria/AtriaStressDetailView.swift:1105-1119 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:1884\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaOverviewSections.swift:1882\u0060 calls \u0060Spacer\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1103\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1884}}}],"partialFingerprints":{"codehealthFindingId/v1":"594c13d4614ac8f56c38d7a331b56c5bfbc7889d3d64a3cdae9b5d5291c2ff40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201315 lines \u00D7 3): Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1493-1506 | Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1516-1530 | Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1628-1630 \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 \u0060Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1493\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a88817b2eea1385f370b78c30257b4fb35830b71d5151eb83775037ef7e41cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:3924-3936 | Atria/Atria/HistoricalArchive.swift:6652-6666 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:3924\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3924}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5c20b5e3eb02327a0eff757d652ff8826969500100f3684c3b7e1e59666a555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/Sessions.swift:7955-7969 | Atria/Atria/Sessions.swift:7982-7996 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7955}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b8f5131b2c431a11c8230dc9ea32dde5618e118d1acd7d14aa19491760e718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): Atria/Atria/Sessions.swift:14023-14037 | Atria/Atria/Sessions.swift:14144-14155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":14023}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8422ca27695b59ffbe72bd91259c49971b0637e2c03b4fc9b5cef19e38c3538"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Atria/Atria/Sessions.swift:14089-14102 | Atria/Atria/Sessions.swift:14251-14265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:14089\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 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14089}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4f6e0b00ad7b03a82ebc28d426c94a47b943d4a58cd35662b72a3b4c2c8984"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Atria/Atria/Sessions.swift:20908-20921 | Atria/Atria/Sessions.swift:20954-20968 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":20908}}}],"partialFingerprints":{"codehealthFindingId/v1":"058f92fb1d6cd467e57b25a0d3164feaf896e6e57c9a1254f2d4e37ff7109169"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201315 lines \u00D7 2): Atria/Atria/Sessions.swift:23264-23278 | Atria/Atria/Sessions.swift:23388-23395 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff4e8bff756eddd76eb24505970b8b59a0c8df29ba85e192094e40034233a2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Atria/Atria/Sessions.swift:33424-33437 | Atria/Atria/Sessions.swift:33467-33481 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33424}}}],"partialFingerprints":{"codehealthFindingId/v1":"630a73b64691358c9ab5faa211278f4cb5e39cdc49d584c7cc4e681f9961c493"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/Sessions.swift:52152-52166 | Atria/Atria/Sessions.swift:52232-52246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:52152\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, \u0060Atria/Atria/Sessions.swift:52151\u0060 calls \u0060Set\u0060, \u0060startOfDay\u0060 and \u0060Atria/Atria/Sessions.swift:52230\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52152}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a08ed3dbb85c96c94422ec77fe4221e62bf6e2ffc03fda3443a9ec8b4e4a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/WidgetSnapshot.swift:877-891 | Atria/Atria/WidgetSnapshot.swift:913-927 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/WidgetSnapshot.swift:877\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3451d62ab25282fd212bd9d7eb64385b4c7446fafd45d808291c582a63074c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 5): Atria/Atria/AtriaSleepWakeResearch.swift:39-51 | Atria/Atria/AtriaSleepWakeResearch.swift:84-96 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1216-1229 | Atria/Atria/Sessions.swift:2089-2101 | Atria/Atria/Sessions.swift:56733-56745 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:39\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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8dacbeeec5f194f04c54af22d925af79aa550fc83e1920c2e0917b09ef006c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 5): Atria/Atria/Sessions.swift:13582-13594 | Atria/Atria/Sessions.swift:13621-13634 | Atria/Atria/Sessions.swift:14172-14185 | Atria/Atria/Sessions.swift:23725-23737 | Atria/Atria/Sessions.swift:23924-23936 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13582}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc3b80827251f46219ef3a80e39722d175f8206b4602400b645cd4e7b3f750d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 4): Atria/Atria/AtriaActivityMonitor.swift:5374-5384 | Atria/Atria/AtriaStressDetailView.swift:1476-1489 | Atria/Atria/AtriaStressDetailView.swift:1789-1799 | Atria/Atria/AtriaVitalsCollectionSections.swift:3270-3283 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5374}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0fc1c7ea99224a25962c1a2009f53cb41713bf5e54c44078aaf06238edade0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): Atria/Atria/HistoricalArchive.swift:5833-5846 | Atria/Atria/HistoricalArchive.swift:5897-5909 | Atria/Atria/HistoricalArchive.swift:5925-5938 | Atria/Atria/HistoricalArchive.swift:5957-5970 \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 \u0060Atria/Atria/HistoricalArchive.swift:5833\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":5833}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ac095e4afb81b6ae60b70fe2bbcd810f2638238bb75acde007ce17c3513a6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201314 lines \u00D7 3): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:77-84 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:228-239 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:269-282 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"decb8077bf6ee17c0058f06ca78120f2435cd0becb6f166778c912206c1ca617"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Atria/Atria/AtriaBLEManager.swift:26550-26563 | Atria/Atria/AtriaBLEManager.swift:26609-26622 | Atria/Atria/AtriaBLEManager.swift:26626-26639 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaBLEManager.swift:26566\u0060 calls \u0060beginStalledStreamRepair\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:26626\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26550}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e317be70bf8ca435871fdc443529d0089fa4815336d34ce79dc1e53de91ffe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): Atria/Atria/AtriaBLEManager.swift:46781-46794 | Atria/Atria/AtriaBLEManager.swift:46824-46837 | Atria/Atria/AtriaBLEManager.swift:46858-46870 \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 \u0060Atria/Atria/AtriaBLEManager.swift:46781\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46781}}}],"partialFingerprints":{"codehealthFindingId/v1":"f402c386236bc8d02acb5304b4c298fb4846c690b422ce57c0447d60537a1c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Atria/Atria/AtriaShareCard.swift:1962-1975 | Atria/Atria/AtriaShareCard.swift:2327-2340 | Atria/Atria/AtriaShareCard.swift:2599-2612 \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 \u0060Atria/Atria/AtriaShareCard.swift:1962\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1962}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cbbb2e923fc88a66809a7371de03c040658a7ea30720e393726af6e176fa5e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:8656-8669 | Atria/Atria/HistoricalArchive.swift:8750-8763 | Atria/Atria/HistoricalArchive.swift:8806-8820 \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 \u0060Atria/Atria/HistoricalArchive.swift:8656\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 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8656}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d08c844c063bee2249cb322409bcc55536f9ff53bd08b15fed6fcb50c17d82d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 3): Atria/Atria/Sessions.swift:23288-23301 | Atria/Atria/Sessions.swift:23402-23412 | Atria/Atria/Sessions.swift:24688-24699 \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 \u0060Atria/Atria/Sessions.swift:23288\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23288}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9b9cbf2279ca0497c945b6c51f4e10d8f5c0785adf910f75d50cd5697fcb36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): Atria/Atria/Sessions.swift:27658-27670 | Atria/Atria/Sessions.swift:27802-27814 | Atria/Atria/Sessions.swift:27860-27873 \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 \u0060Atria/Atria/Sessions.swift:27658\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":27658}}}],"partialFingerprints":{"codehealthFindingId/v1":"083711af6d3a23c6a32ba08560a0884de149f4e7704ed824e33e1e4dbae231ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaApp.swift:1553-1566 | Atria/Atria/AtriaApp.swift:1602-1615 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1553}}}],"partialFingerprints":{"codehealthFindingId/v1":"35bcf9b7fbb3d62057eff31bcbdc4cc5a665b7226e2d88c0759d6ae9bd087c02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25928-25941 | Atria/Atria/AtriaBLEManager.swift:25958-25971 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:25928\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25928}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d0406b5fe58e7db77afee96a52daec5ef0e465327e3527654396a97c53a79a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41482-41492 | Atria/Atria/AtriaBLEManager.swift:42341-42354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41482\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41482}}}],"partialFingerprints":{"codehealthFindingId/v1":"87dd70ef6656c12c4b6068d504009c7b6acac8b5e2ad7a5fe818714f5e93408a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:46928-46941 | Atria/Atria/AtriaBLEManager.swift:47358-47372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:46928\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":46928}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac471bd0df14ad06488cf5897659ec773cd4d6b025bde30e97f1de482de2c12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:54018-54031 | Atria/Atria/AtriaBLEManager.swift:54476-54489 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54018}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9a65f12cd2756962acb060aaee91850222e972372457cd72b6274a5d97078f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:54166-54178 | Atria/Atria/AtriaBLEManager.swift:55086-55099 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:55086\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":54166}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0dd8a5ea99631af6b9e16ff59358607a14b63424705e05982e583335a00827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaHistoricalAggregateReader.swift:845-858 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:679-692 \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 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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"398ef7e8747b2680769458bf853b0bf4dd731c1d08397329004975bf764f8140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:413-426 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:537-550 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:413\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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8bdcfd4c0cc9aad4091c51502e0bb2ba166ccce123e154559a728978775045d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:482-495 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:880-893 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:482\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7741af6150ccc55b22742d6681895f2f2ae158f66ef6b39fc7e78f846e983be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaMonthlyReport.swift:165-178 | Atria/Atria/AtriaWeeklyReport.swift:110-123 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaMonthlyReport.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdbff8e02674b407bee0fca3233eb3161fa109508cd94506621b5b541f349445"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1861-1874 | Atria/Atria/AtriaStressDetailView.swift:1086-1099 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaOverviewSections.swift:1876\u0060 calls \u0060Spacer\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1101\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1861}}}],"partialFingerprints":{"codehealthFindingId/v1":"3416388372801c3694247272308c51ca76e8cd95e5c28312324cd3f8ac181cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaStressMonitor.swift:2392-2405 | Atria/Atria/Sessions.swift:8913-8926 \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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2392}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a05010f27ed3948197730538120f4da3dc66a258baba0e8a88911988dad19a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaVitalsCollectionSections.swift:1843-1856 | Atria/Atria/AtriaVitalsCollectionSections.swift:1963-1976 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:1843\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":1843}}}],"partialFingerprints":{"codehealthFindingId/v1":"51dbeb81597ab9a8cb340ee96354d0f501ee9c846ffa65d60dc613fabb98093d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaVitalsCollectionSections.swift:1859-1872 | Atria/Atria/AtriaVitalsCollectionSections.swift:1979-1992 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":1859}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a7676509f9a075958723c5a9140824538c15998861b8666640db25ba3725a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201314 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:160-165 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:381-394 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"03924045b5549a449e99811cdcfc701e32a386ccfde3d2830a3a7b9b5a9b7d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:137-150 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:54-67 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:137\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fbd79eced08f7fbd0ccb78faa69e0b2ac5a9e015bdca17cb7b8d9a363c4089f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:708-721 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:300-312 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:708\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"436fe4c6e15a0c0dae6425d79d438c75bec10150b6a445417cf505bf2c97eb07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/AtriaWorkoutOnset.swift:14-27 | Atria/Atria/AtriaWorkoutOnset.swift:73-86 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWorkoutOnset.swift:14\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":"Atria/Atria/AtriaWorkoutOnset.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa96900511888234032523c64032627b1ad67b6ac1182fa0029c4d90ccbe9aa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/DailyRollupStore.swift:954-967 | Atria/Atria/DailyRollupStore.swift:1138-1151 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0415ea8887374ecee1d1f71e7af72b55dbc606a7d59f2423999dbd41ed111d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/HRV.swift:555-568 | Atria/Atria/Sessions.swift:32436-32449 \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":"Atria/Atria/HRV.swift"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"06257083559ceecaa6a6a186abc71a5bb01e1efb9f97a50716bd0a6448970f54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:2024-2037 | Atria/Atria/Sessions.swift:54909-54922 \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 \u0060Atria/Atria/HealthKitExporter.swift:2024\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2024}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ae89cab013aa1d2f55dcc8ecd2f5faf98080e8341cc8f5f6b7e6cc718e5dc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:8091-8104 | Atria/Atria/HistoricalArchive.swift:8512-8525 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:8091\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8091}}}],"partialFingerprints":{"codehealthFindingId/v1":"b10d1369f953a97780546b79b4f5a5974d115890144bd8676abd073d7f0489e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Atria/Atria/Sessions.swift:13874-13886 | Atria/Atria/Sessions.swift:13929-13942 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13874}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8dbb420ac5659cf71b818bdd78255569e346879abe9907fb284afd05d718c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Atria/Atria/Sessions.swift:21418-21431 | Atria/Atria/Sessions.swift:21446-21459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:21418\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":21418}}}],"partialFingerprints":{"codehealthFindingId/v1":"b820698810a4f764b1e82b14cb66b94881a6cb0e6e7191ee5c996e26cc69a69a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): Atria/Atria/Sessions.swift:24049-24060 | Atria/Atria/Sessions.swift:24155-24168 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24049}}}],"partialFingerprints":{"codehealthFindingId/v1":"be790430aeec24d37478b1adb4e35bb31ecb996d44a532728f98dab001e26008"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:726-739 | Atria/AtriaWidget/AtriaWidget.swift:757-769 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:726\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/AtriaWidget/AtriaWidget.swift:724\u0060 calls \u0060minimumScaleFactor\u0060 and \u0060Atria/AtriaWidget/AtriaWidget.swift:756\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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef6cd8b7388eb90a0c6276c3755db4a7dc511d16e6772819fe80707525d56e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): Atria/Atria/AtriaBLEManager.swift:26759-26771 | Atria/Atria/AtriaBLEManager.swift:26804-26816 | Atria/Atria/AtriaBLEManager.swift:26879-26891 | Atria/Atria/AtriaBLEManager.swift:26945-26957 \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 \u0060Atria/Atria/AtriaBLEManager.swift:26759\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaBLEManager.swift:26876\u0060 calls \u0060set\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:26942\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26759}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7390c71bb74f21305d7482f4a8fd6aaa148190c0d36e1197a1551e0ac005bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 3): Atria/Atria/AtriaDeviceUseJournal.swift:167-176 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:931-940 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3151-3163 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaDeviceUseJournal.swift:167\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"592831dcb0f8a6c704e06efe97011f02894f0d5a06b5fa41c485b4c1295b15e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Atria/Atria/AtriaHomeView.swift:13323-13335 | Atria/Atria/AtriaHomeView.swift:13513-13525 | Atria/Atria/AtriaTodayScreen.swift:1768-1780 \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 \u0060Atria/Atria/AtriaHomeView.swift:13323\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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13323}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88633da799697aa69967bee3e8bad9325aeaa64381696e3ede7c8409b4d0230"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): Atria/Atria/AtriaShareCard.swift:2986-2998 | Atria/Atria/AtriaShareCard.swift:3023-3034 | Atria/Atria/AtriaShareCard.swift:3062-3074 \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 \u0060Atria/Atria/AtriaShareCard.swift:2986\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":2986}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fc3c33d4264d426cd535aba626c608d40950e662e4848143557b9ba6ec44b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 3): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:2968-2979 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3047-3059 | tools/replay_whoop4_compact_steps.swift:46-55 \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 \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3047\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:2968\u0060 calls \u0060Int\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:3047\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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2968}}}],"partialFingerprints":{"codehealthFindingId/v1":"49bbed15f4a1c778af8a59d2b16f12a195414d12cc51bb2fc4e30879c345f4a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 2): Atria/Atria/ActiveSessionJournal.swift:982-990 | Atria/Atria/Sessions.swift:38878-38890 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d098233ed1f320ee4a06425ba9955e9d179526ab1e05b3af60394994f47c33e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:707-719 | Atria/Atria/AtriaColdSessionFacts.swift:213-225 \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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ccea9d6c464617d2eafd9d7331b4651d82883f03af1e5c1b123aad4270e17f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:4871-4883 | Atria/Atria/AtriaBLEManager.swift:4904-4916 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":4871}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a58d6dd3def547698f1a97ef25496e101b57b4871945b10463508e06b9a5b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:14208-14220 | Atria/Atria/AtriaBLEManager.swift:14310-14321 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:14208\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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14208}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3be0ba788587d5b1b92c745c0eb101699cc7d840953d12cc223c1aa7a7b9eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:47867-47879 | Atria/Atria/AtriaBLEManager.swift:48077-48088 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:47867\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":47867}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ad454f389f897afd4a61d7b370ebdc8e5585e19f496aea1117bceba907326c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:51348-51360 | Atria/Atria/AtriaBLEManager.swift:51383-51392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:51348\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":51348}}}],"partialFingerprints":{"codehealthFindingId/v1":"302e27698082858dc71f2a058eb12839df0bc043ea61cd7e83fdd5846c9ec0db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaGraphInspector.swift:339-351 | Atria/Atria/AtriaGraphInspector.swift:394-406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaGraphInspector.swift:339\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaGraphInspector.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e7d039631cfbf773b4f41412316172114a4142d2c34cd6fb7723f605166420c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:437-449 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:526-538 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:437\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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"4006b3768b233ffdf22e581d6fe308c7e12c44d350f811f36bb1e8822b19aefe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:534-546 | Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:610-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift:534\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fac265638ea0fa01a4622384c29df835a07899fe2cd5a7cb9dbaf6e6b6e3310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201313 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:836-848 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:867-874 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:836\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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f96d305f8d864a272cb646c1ddfa8562f9b7164054557e23abd2bc2cdb69b31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:4400-4413 | Atria/Atria/AtriaHomeView.swift:4422-4434 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHomeView.swift:4400\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":4400}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b71dad5ae87204fd42bf667f2182fa66656fb4fc3da7404531e373e612b4ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3233-3244 | Atria/Atria/AtriaSettingsView.swift:2196-2208 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3233}}}],"partialFingerprints":{"codehealthFindingId/v1":"477732752374dc3e091bdca6acecef292679f22af7169c439f5f20e3194d7878"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3255-3266 | Atria/Atria/AtriaSettingsView.swift:2225-2237 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f5814060f34df7822ebe09700733def0439e00f4b86ad72ba3dc0a5f85da9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3346-3357 | Atria/Atria/AtriaSettingsView.swift:2383-2395 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3346}}}],"partialFingerprints":{"codehealthFindingId/v1":"13836afb0225ab37d4b9c0721155e7595a4b0958a0b0d79c68a5164842e60278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3368-3379 | Atria/Atria/AtriaSettingsView.swift:2397-2409 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3368}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda0a34af31aa494c9edbd063461d972f3c57e78aca0690904dfa1a92e0f5066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3390-3401 | Atria/Atria/AtriaSettingsView.swift:2426-2438 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3390}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcdae02efad6f07b5ab258de8325f55fe4c6b09d269df035b461703f9a268b18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3432-3443 | Atria/Atria/AtriaSettingsView.swift:2440-2452 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3432}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a02eda2dd2dad77bad9102185451f2f0e1adaf27a810a36915a665b10d5858"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3459-3470 | Atria/Atria/AtriaSettingsView.swift:2480-2492 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3459}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ba3e30c48cb92edd5ec692bebbc05ea7ca0e6ac72f6012264b425fb001a92a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3481-3492 | Atria/Atria/AtriaSettingsView.swift:2515-2527 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3481}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a7273b77fea6b96a8e601dc1c5d7103fad20e3a466e430bf0ab640e50e4e26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3533-3544 | Atria/Atria/AtriaSettingsView.swift:2354-2366 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3533}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aaa203fb445c50a88ff802234ef70dcb934e8c546fd52b42bf43dc3be01be45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:6426-6438 | Atria/Atria/AtriaOverviewSections.swift:6473-6484 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:6426\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":6426}}}],"partialFingerprints":{"codehealthFindingId/v1":"da48ebd203fb18d65c00f5f577ea2e2e88edcda298382bd79da79bafff68e238"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9340-9349 | Atria/Atria/AtriaOverviewSections.swift:9350-9362 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9340}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0e4329ba26162d0694bf59935f71be9153eb4317fade58601056c620850439"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaRecoveredRRProjection.swift:639-651 | Atria/Atria/HistoricalArchive.swift:9592-9604 \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 \u0060Atria/Atria/AtriaRecoveredRRProjection.swift:639\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"284144d383a88f0f9cc39a71321fc2e4a947e653bbb7811720dcb0165026f941"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaWhoop4CompactIMU.swift:229-241 | Atria/Atria/AtriaWhoop4CompactIMU.swift:252-264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4CompactIMU.swift:229\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4CompactIMU.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcbf4f11b9fd25086b4be69483c54e20be9557afe83098d42260f6f25c7e010a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift:70-82 | Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift:117-129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060command\u0060 to \u0060UInt8 = 0x0b\u0060 in one and \u0060UInt8 = 0x22\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":"Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cefa94a43d5677b06c25191d0566eb89b99e8eec21a492ce4a7fa5bcf42b99e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:1170-1182 | Atria/Atria/HistoricalArchive.swift:1198-1210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:1198\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1170}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92a9c2f7c2dbdc6bffd876693021776bade9406ec1f73d87032d955d21f17f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): Atria/Atria/LocalNotificationScheduler.swift:288-300 | Atria/Atria/LocalNotificationScheduler.swift:943-953 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/LocalNotificationScheduler.swift:288\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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d28fd197e1f5e481fc156c86c5e6ea828b487809688c2bd9f24ba6d34ce989d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/Sessions.swift:3065-3077 | Atria/Atria/Sessions.swift:5470-5482 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":3065}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a04a5e2e07242429e65511520bde686cb60293fb517865095c1f5aad9255ce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): Atria/Atria/Sessions.swift:21373-21382 | Atria/Atria/Sessions.swift:21435-21447 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:21435\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21373}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b4f3b590867b8d80b648a512d070c372c2d445c612a7ad3635c060a2fb0127"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201313 lines \u00D7 2): Atria/Atria/Sessions.swift:24062-24069 | Atria/Atria/Sessions.swift:24170-24182 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:24062\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 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24062}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f46fd93dcb46e08e56186f8d7ccbfc46a9298777e58578a42edaee06949bbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/Sessions.swift:48633-48645 | Atria/Atria/Sessions.swift:53226-53238 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:48633\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":48633}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c51d5fe9cd1bedc68ffceb809fbf8bb0b5d0babf551c400bcfd75e6683a933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:3907-3919 | Atria/AtriaWidget/AtriaWidget.swift:3950-3962 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:3907\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3907}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed28564f871c4c25b261c48f9b87dc6326b9ad5b0bb03e01d90e820f1c4ee85f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 9): Atria/Atria/LocalNotificationScheduler.swift:248-256 | Atria/Atria/LocalNotificationScheduler.swift:294-302 | Atria/Atria/LocalNotificationScheduler.swift:393-401 | Atria/Atria/LocalNotificationScheduler.swift:511-519 | Atria/Atria/LocalNotificationScheduler.swift:571-579 | Atria/Atria/LocalNotificationScheduler.swift:831-839 | Atria/Atria/LocalNotificationScheduler.swift:947-955 | Atria/Atria/LocalNotificationScheduler.swift:1001-1012 | Atria/Atria/LocalNotificationScheduler.swift:1075-1083 \u2014 all 9 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 \u0060Atria/Atria/LocalNotificationScheduler.swift:248\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"052a72c0ee1110309d714a4b32ee9bfe544bd48691cd01790beb2650ebde23c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 6): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:298-305 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:272-279 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1046-1053 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:1054-1064 | Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:80-88 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:593-604 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:80\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"42140388bc83d58bac7dd2ebaeeaff96666d550a6ab86c54255a553f1088d4b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201312 lines \u00D7 3): Atria/Atria/AtriaActivityMonitor.swift:5395-5406 | Atria/Atria/AtriaHealthScreen.swift:3327-3332 | Atria/Atria/AtriaVitalsCollectionSections.swift:3305-3310 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:5395\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5395}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80e1b30a68e89ea753547d9e9fc5a2a697b113004d02dfbebed8fb2f906e055"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 3): Atria/Atria/AtriaAnalytics.swift:33-41 | Atria/Atria/AtriaAnalytics.swift:110-117 | Atria/Atria/Sessions.swift:43376-43387 \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 \u0060Atria/Atria/AtriaAnalytics.swift:33\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a543c5c7eca25cf91fbf012107d6024910070591f0a8a4b1a2d85a0630beb9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Atria/Atria/AtriaBLEManager.swift:14209-14221 | Atria/Atria/AtriaBLEManager.swift:14311-14322 | Atria/Atria/AtriaBLEManager.swift:14396-14407 \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 \u0060Atria/Atria/AtriaBLEManager.swift:14209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":14209}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e6edb7933880e2cdee75a805a507d06612cbe47e5c10652185f0ea47e1bf90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): Atria/Atria/AtriaHistoricalAggregateReader.swift:197-208 | Atria/Atria/AtriaHistoricalAggregateReader.swift:373-384 | Atria/Atria/AtriaHistoricalAggregateReader.swift:634-644 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff629e16c792c7836d013bdf381422358a54958208c8f9f288398c012c7338c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Atria/Atria/AtriaShareCard.swift:1699-1710 | Atria/Atria/AtriaShareCard.swift:2106-2117 | Atria/Atria/AtriaShareCard.swift:2482-2493 \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 \u0060Atria/Atria/AtriaShareCard.swift:1699\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97517a56a2432d6bb595484674ad0f6173d6f67d331cc7c29d2e87b8f8ba6aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201312 lines \u00D7 4): Atria/Atria/HistoricalArchive.swift:4659-4664 | Atria/Atria/HistoricalArchive.swift:8045-8056 | Atria/Atria/HistoricalArchive.swift:8554-8562 | Atria/Atria/HistoricalArchive.swift:8588-8596 \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 \u0060Atria/Atria/HistoricalArchive.swift:4659\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4659}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5be42afded3903a8d8d23ec6120fd5bd0c2acbef9bee349d2ec5ff9f00b845a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:1578-1589 | Atria/Atria/AtriaAnalytics.swift:1815-1826 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaAnalytics.swift:1578\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05409febd6f6d3c6f88aaaf3156e846955938b18dfede3136561854dae3bd1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:5169-5180 | Atria/Atria/AtriaBLEManager.swift:5202-5213 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:5169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5169}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0f07f51f102db498612ee0e41b0852b8d92011e2070ef8c3da17bb370b1f80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:31779-31790 | Atria/Atria/AtriaBLEManager.swift:31794-31805 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31779}}}],"partialFingerprints":{"codehealthFindingId/v1":"0290878ff1e469181f8b89c505146b3240cef5269c115c4bc33dc3a36650ac2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:55423-55434 | Atria/Atria/AtriaBLEManager.swift:55683-55694 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55423}}}],"partialFingerprints":{"codehealthFindingId/v1":"df94798ecd62e7e1643a36da3ff394181c86c40b0230601be0f2f3ddc413abe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/AtriaColdSessionMigration.swift:135-144 | Atria/Atria/AtriaColdSessionMigration.swift:426-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaColdSessionMigration.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"32fe8fc7debf72f52bf4ec14c4bfe72bad8b0fe220051b1a22dd41de597aebfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): Atria/Atria/AtriaEventNotificationScheduler.swift:294-305 | Atria/Atria/LocalNotificationScheduler.swift:2303-2311 \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 \u0060Atria/Atria/AtriaEventNotificationScheduler.swift:294\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":"Atria/Atria/AtriaEventNotificationScheduler.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2317740d244d8e20bed57a4be79a074953353d98d9ef97dc3bc3e9fdfcb8c620"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaHeroConnectionSections.swift:483-494 | Atria/Atria/AtriaHomeView.swift:8417-8428 \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 \u0060Atria/Atria/AtriaHeroConnectionSections.swift:483\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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"a241f1b72fc7b3e15be66f1c993c2ac9fe4ee3db258247f99511fa7d841d2a2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:627-638 | Atria/Atria/AtriaManagedStorageInventory.swift:273-284 \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 \u0060Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:627\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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c8260d1bff785081f8b0d52ab0787baef482230fed6a7a692bb9ac55d95df59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:395-406 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:434-443 \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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"934f19510b0c5961fb498a5c3f76db56d8e51fb8ab09ae959b520282bb1a2079"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:631-641 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1240-1251 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"583b56bc0798dbc8be37304b807d11ce5a9362ec2d1041953e40cc951bc21cee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:466-477 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:638-647 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:466\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8abc0d9bce2ea2e616ee35567ff832a4cfa7f201614634e74fe3d79da040d74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:396-407 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:796-807 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfaec5902090a6593fee90fbdd015879d161268c603a12f87d12b5ed08b9b626"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:448-459 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:848-859 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:448\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":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e55976b77b942d7cee41550ee41733ce9b574c54773a42312407b70b1008c37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaLearnedInsights.swift:723-734 | Atria/Atria/AtriaLearnedInsights.swift:929-940 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"675ac352c13391f18738ba6b1ecf08fbe9bd0453ec3e83240523987aafb8ca81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaLiveWorkoutView.swift:2699-2713 | Atria/Atria/AtriaLiveWorkoutView.swift:2847-2858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaLiveWorkoutView.swift:2699\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaLiveWorkoutView.swift:2846\u0060 calls \u0060VStack\u0060 and \u0060Atria/Atria/AtriaLiveWorkoutView.swift:2698\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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2699}}}],"partialFingerprints":{"codehealthFindingId/v1":"feec539dfe2cf26ca15a694c993af56a71a079fbb7aa89d99a088573b668b0e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:436-447 | Atria/Atria/Sessions.swift:33388-33399 \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 \u0060Atria/Atria/AtriaRecoveredMotionAnalytics.swift:436\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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb0123097f8533a0c4f50ae2f8323f6cdcc6c3e2fd3141f4d395b233dc7e885"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:1622-1633 | Atria/Atria/AtriaShareCard.swift:2044-2053 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:1622\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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, \u0060Atria/Atria/AtriaShareCard.swift:1634\u0060 calls \u0060UUID\u0060 and \u0060Atria/Atria/AtriaShareCard.swift:2054\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1622}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0263c29660e73539cb9db3f3401d38d8526f163e37a149246d9e068416af944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaStressDetailView.swift:1461-1472 | Atria/Atria/AtriaVitalsCollectionSections.swift:3254-3265 \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 \u0060Atria/Atria/AtriaStressDetailView.swift:1461\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ac09edc04d2fb584909f862330cd0493bd6c6cf90502f36fb4faba942a346b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaWeeklyPlan.swift:313-324 | Atria/Atria/AtriaWeeklyReport.swift:198-209 \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":"Atria/Atria/AtriaWeeklyPlan.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"422656b6705fe54b726022f2ed0c2622f7e121a1b8fc4855aa7ee032c1c8144f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:256-267 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:339-350 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:339\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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, \u0060Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:268\u0060 calls \u0060merged\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:351\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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd50d455dc505f20164541c066ba2d37eef3e1333433ae530e105571edf7143"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:533-544 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:672-683 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:533\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":"Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b71e2b7017492f7c6b25974e963ab97780d44c199ba641a10cdf5619b7fdba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1747-1758 | Atria/Atria/HistoricalArchive.swift:4174-4183 \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 \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1747\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":1747}}}],"partialFingerprints":{"codehealthFindingId/v1":"88c98897e8a6fd4b4b07babb0a6de5a29cfe11a9533ec8c1de920fd53bf9dfe5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:1843-1854 | Atria/Atria/HistoricalArchive.swift:2056-2067 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:1843\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1843}}}],"partialFingerprints":{"codehealthFindingId/v1":"89368b614572e55171e76038b9f4fa53993cdde2d640c5ca51962e13577f8a93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/Sessions.swift:2524-2535 | Atria/Atria/Sessions.swift:27350-27361 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:2524\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":2524}}}],"partialFingerprints":{"codehealthFindingId/v1":"a84836f4b8d69e521a0e33e2b24a3d5c23c4fa9cd0d91e2b8dbbc9d84b699a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/Sessions.swift:13030-13041 | Atria/Atria/Sessions.swift:13060-13071 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:13030\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13030}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5188deec9eaa3d323344700c7b01fbc18df2570c878f4232874d0f5f0fed7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Atria/Atria/Sessions.swift:15059-15070 | Atria/Atria/Sessions.swift:16543-16552 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15059}}}],"partialFingerprints":{"codehealthFindingId/v1":"2882e2e8cc0f9df3ef334db74db48192488a277f0499cf1ac4cce5da70128e01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/Sessions.swift:15138-15149 | Atria/Atria/Sessions.swift:15150-15161 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":15138}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef19748fc1035290b7415babe4219a12a570eedb2b0340206e8e9dbbd25be1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): Atria/Atria/Sessions.swift:21362-21370 | Atria/Atria/Sessions.swift:21408-21419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:21408\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21362}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0570829502e158e57600151f21e161dfdcb7a418b8faafdd39825251b33edee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/Atria/Sessions.swift:24800-24812 | Atria/Atria/Sessions.swift:56248-56260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:24800\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":24800}}}],"partialFingerprints":{"codehealthFindingId/v1":"96946fdfecf352dc46386c10acf8f8207c95d6d7f43f789d19b56cde019153d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Atria/Atria/Sessions.swift:31499-31513 | Atria/Atria/Sessions.swift:31644-31658 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31499}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd23f9dd58020c26c15bd8fe6fc27938ee724f1b54ef352fc4ba970d9fea1f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/Sessions.swift:46392-46403 | Atria/Atria/Sessions.swift:46993-47004 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:46392\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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, \u0060Atria/Atria/Sessions.swift:46391\u0060 calls \u0060checkpoint\u0060 and \u0060Atria/Atria/Sessions.swift:46992\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46392}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afcade20884057ba8646b140a952ae3c3d944c123845d47f2273a6d64c9ef16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): Atria/Atria/Sessions.swift:49816-49824 | Atria/Atria/Sessions.swift:49837-49848 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:49816\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49816}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d95ab0c30d82fd35fca00f868cea3a91e153cd9cf6f26bb7dae665f0bb96d9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/WidgetSnapshot.swift:2346-2357 | Atria/Atria/WidgetSnapshot.swift:2374-2385 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/WidgetSnapshot.swift:2346\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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":2346}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc1dfca30c97b383f0b8883d435c606df673982744d46234c603797448b0a34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 6): Atria/Atria/AtriaBLEManager.swift:31822-31830 | Atria/Atria/AtriaRecoveredRRProjection.swift:659-667 | Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:719-729 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:310-320 | Atria/Atria/HistoricalArchive.swift:9612-9620 | tools/verify_whoop4_autonomous_step_corpus.swift:480-490 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:31822\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31822}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66e72cf6ad165ee0b8045d9946c14c088830babf6efa051525415531c90e1df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): Atria/Atria/AtriaTrendChart.swift:1736-1746 | Atria/Atria/AtriaTrendChart.swift:1748-1758 | Atria/Atria/AtriaTrendChart.swift:1760-1770 | Atria/Atria/AtriaTrendChart.swift:1792-1802 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":1736}}}],"partialFingerprints":{"codehealthFindingId/v1":"7957ddbed12afaa4295746133a6ef5ec0cea3eca9cd947b0e1ccd3ce0e00f042"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Atria/Atria/AtriaVitalsCollectionSections.swift:3330-3340 | Atria/Atria/AtriaVitalsCollectionSections.swift:4813-4823 | Atria/Atria/AtriaVitalsCollectionSections.swift:4832-4842 \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 \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:3330\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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":3330}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ec8ff8918afa261b68a849af88deb8d7e861cfa73e8a5fa1f9d94f2c30ea3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:10204-10214 | Atria/Atria/HistoricalArchive.swift:10344-10354 | Atria/Atria/HistoricalArchive.swift:10355-10365 \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 \u0060Atria/Atria/HistoricalArchive.swift:10204\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10204}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bc683742ff909d1daed8c78ba939095c89f8c4b17b0943feccde8d312f7422"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Atria/Atria/Sessions.swift:34912-34922 | Atria/Atria/Sessions.swift:34961-34971 | Atria/Atria/Sessions.swift:35002-35012 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34912}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f4950ee2a28d96a229c82ef4a7562d5244bf31539a8371d7e8e9fd5d740bd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:12-22 | Atria/Atria/AtriaAnalytics.swift:85-94 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a65bba3405150399631c3656eaf69c3b85c414dc3722a79b8142eb4af282444"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:866-874 | Atria/Atria/AtriaAnalytics.swift:891-901 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaAnalytics.swift:866\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0fb2dab537d5af949cd7d773c0e998f55a1074a22ff981da34a46586ba03da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25653-25663 | Atria/Atria/AtriaBLEManager.swift:26538-26548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:25653\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25653}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3b5d261942fb4c8f701415780a36b35857d6e444f8407df71de34dcec75ab4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:55356-55366 | Atria/Atria/AtriaBLEManager.swift:55610-55620 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:55356\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55356}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e2562dcdb16ff5a078a3181f6a9168b6c658052585f5fccb77b053ce95fbe61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:56375-56385 | Atria/Atria/AtriaBLEManager.swift:56688-56698 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":56375}}}],"partialFingerprints":{"codehealthFindingId/v1":"fadf2b45f85b69fd942adcd109a6c94f908bfd1f8cee0757f623f28246990b07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:180-190 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:130-141 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift\u0060 and \u0060Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:180\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"448ac93d32f2a8ec1ee88a10dd328116fc5099140de2bc3a0b9fc2d49bde766a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:438-448 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:76-86 \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 \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:438\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9aa4f3b51bbaf8f41243d76b6b41d24f0493e30421247ab3e7f9f7db7b90d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:493-503 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:178-188 \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 \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:493\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"269df778957a00042e7a7ac168e5dfd5632adaefb5b267313fa8d4571694100b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:565-575 | Atria/Atria/AtriaHistoricalArchiveCatalog.swift:622-631 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalArchiveCatalog.swift:565\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"084d472db29fa1bdd2b7521e4ba8325fc41450e4d7bf032587196e6f387a820d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:183-193 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:246-256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc741e502817b2cdde31632a1a8a5279b59c881ff807d5fe7b308cc04d3baca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:738-748 | Atria/Atria/AtriaHistoricalLongTermRollup.swift:1001-1011 \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 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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"7276b778f36f61621ced27ce1560a9cd37c07d0adf426f5ba21db4f08a8cf8b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaHistoricalGapLedger.swift:549-559 | Atria/Atria/AtriaHistoricalGapLedger.swift:600-610 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalGapLedger.swift:549\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c0a96c93f8a5330eb78ebeca94da84f01411af0784dfb6b574b5ec1a8e4256"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:406-416 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:579-587 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:406\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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"383cde33df46d55ba131ee721f1aa4a82e7ac90ecd782487b05d7c69438816aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:438-448 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:615-623 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:438\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 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"7709e36a96613d1e2a8b86f47f28a8cddf3ba8df0dedc35f5fd35f463f878a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:484-494 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:668-674 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:484\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd86823f6c6e73e2946c9f5fda78fe8e5e9a6be6b3fcba3ab718dbcb7bbc3462"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:5738-5748 | Atria/Atria/AtriaOverviewSections.swift:5773-5781 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:5738\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":5738}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc329afde9da2f4b4f1fd52c0894f8fe8cd6c79ae258277a22eebfd4a2947b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201311 lines \u00D7 3): Atria/Atria/AtriaShareCard.swift:1687-1697 | Atria/Atria/AtriaShareCard.swift:2094-2104 | Atria/Atria/AtriaShareCard.swift:2443-2445 \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 \u0060Atria/Atria/AtriaShareCard.swift:1687\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaShareCard.swift:1686\u0060 calls \u0060previewSize\u0060, \u0060clipShape\u0060, \u0060RoundedRectangle\u0060 and \u0060Atria/Atria/AtriaShareCard.swift:2443\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":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe1b77eb5ae49f2f372f3c818bbfd7637b4040deceb1520de64e45a2ea711186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaSleepPlannerCharts.swift:271-281 | Atria/Atria/AtriaSmartWakeView.swift:205-215 \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 \u0060Atria/Atria/AtriaSleepPlannerCharts.swift:271\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":"Atria/Atria/AtriaSleepPlannerCharts.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb3752a020142b91700c924bb5c6a64c4471ca032c9efe43dc0d0fb307b9775"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaSleepWakeResearch.swift:401-411 | Atria/Atria/AtriaSleepWakeResearch.swift:441-451 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:401\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbfd30524799a1ad059f7f632211a47cfb7fdd41b5b0713a1b7e09eff53ae8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaSleepWakeResearch.swift:1078-1088 | Atria/Atria/AtriaSleepWakeResearch.swift:1306-1316 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:1078\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb58e38860b61907d13a560f8674a10d7879b7a027ea94e13b6ad834c2cf6c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1786-1796 | Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1861-1871 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1786\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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, \u0060Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1860\u0060 calls \u0060reduce\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:1785\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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":1786}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab4707f0b1b6a807a964c5b1e3016213cd9895b66fa520260cefa92cd68e88f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:2880-2890 | Atria/Atria/HistoricalArchive.swift:2911-2921 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":2880}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2d67cce07162e63cc3682ede1639119d45b50f7a2f90489461809ccbd881af4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:1118-1128 | Atria/Atria/Sessions.swift:1225-1235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"cafabcd20e8bc011c5eee048f3f779f9c20240c0763b2ab361f9ce84fc52e07e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:12358-12368 | Atria/Atria/Sessions.swift:57621-57631 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":12358}}}],"partialFingerprints":{"codehealthFindingId/v1":"d71126e77095d192fe9fc3504a08172f154c969beec3a978f112adca7a805a73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Atria/Atria/Sessions.swift:14001-14010 | Atria/Atria/Sessions.swift:14106-14116 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":14001}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f245be3d796cb5aa9914008f57341df4e60af280940272fcf38fe3771cc17d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 2): Atria/Atria/Sessions.swift:22850-22860 | Atria/Atria/Sessions.swift:23114-23121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:22850\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. The matched lines also transfer control out of the body holding them, 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22850}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a060534d9d2b846f1130d71d583bc0497faf82e9339a8c6a0023b02be243cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Atria/Atria/Sessions.swift:23592-23600 | Atria/Atria/Sessions.swift:23769-23779 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23592}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8adebca6744d0212f60c9f4963921be51b2e5b39ba03150ad1a955fc944b7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:30987-30997 | Atria/Atria/Sessions.swift:31028-31038 \u2014 both copies are in the same file, so extract the block 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, \u0060Atria/Atria/Sessions.swift:30985\u0060 calls \u0060replaceAll\u0060 and \u0060Atria/Atria/Sessions.swift:31026\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30987}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d4a19acf28b231b35c1e9bad8d23509ddfd704debf4029db5fe7ff24bdefa0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Atria/Atria/Sessions.swift:40526-40536 | Atria/Atria/Sessions.swift:40580-40589 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:40526\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":40526}}}],"partialFingerprints":{"codehealthFindingId/v1":"31465d1ec76ef478fe9709e4b0e740812e6d89bf3dc1936819970c9628e1abe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:41104-41114 | Atria/Atria/Sessions.swift:45256-45266 \u2014 both copies are in the same file, so extract the block 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, \u0060Atria/Atria/Sessions.swift:41102\u0060 calls \u0060UserConfirmedSleep\u0060, \u0060Date\u0060 and \u0060Atria/Atria/Sessions.swift:45255\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41104}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc91ed5855ec42633df4a4d39f8c1490d9c56d99877755a6ae11b8c96fabece"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:50813-50823 | Atria/Atria/Sessions.swift:50844-50854 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":50813}}}],"partialFingerprints":{"codehealthFindingId/v1":"589426bc5a9972b14f5ea53e5c3b669d44234b6dced41633c5421fe28d534bc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:55653-55663 | Atria/Atria/Sessions.swift:55700-55710 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:55653\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":55653}}}],"partialFingerprints":{"codehealthFindingId/v1":"6de6be947b33a6225b95890aa419dfa63485230c3b99b62ef6768ef26b88e41d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:3710-3722 | Atria/AtriaWidget/AtriaWidget.swift:3733-3745 \u2014 both copies are in the same file, so extract the block 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/AtriaWidget/AtriaWidget.swift:3708\u0060 calls \u0060atriaCumulativeDayStepsAreCurrent\u0060 and \u0060Atria/AtriaWidget/AtriaWidget.swift:3729\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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3710}}}],"partialFingerprints":{"codehealthFindingId/v1":"8325162ed5c71bffb824901913048fffedfd7af5e5e371dce55eb2735a205cea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 6): Atria/Atria/AtriaRecoveredRRProjection.swift:658-665 | Atria/Atria/AtriaStrapCalibrationArchive.swift:701-708 | Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:718-727 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:309-318 | Atria/Atria/HistoricalArchive.swift:9611-9618 | tools/verify_whoop4_autonomous_step_corpus.swift:479-488 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredRRProjection.swift"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e400e141c4e04323e87f9204a66e9b7fc1de8b2abd4267a6abbcfa0e312eab6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Atria/Atria/AtriaHistoricalArchiveCatalog.swift:839-848 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2408-2417 | Atria/Atria/AtriaHistoricalRetentionTransaction.swift:592-601 | Atria/Atria/AtriaHistoricalSealedCatalogMaterializer.swift:529-538 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The 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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"84201cfa5e04fcb7b4d5a7c256905ea1423859c74c2f0d7820de372241e86e65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 4): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:488-497 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1111-1119 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1134-1143 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1215-1224 \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 \u0060Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:488\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca89079075fb6401f08ebdc08b58769ac96b5dd328ad4ad7a51e7622ca8ad15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Atria/Atria/Sessions.swift:34760-34769 | Atria/Atria/Sessions.swift:34841-34850 | Atria/Atria/Sessions.swift:35585-35594 | Atria/Atria/Sessions.swift:36178-36187 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":34760}}}],"partialFingerprints":{"codehealthFindingId/v1":"916c88deecb54a42d5ccc66b6234c5976a18f9a6ec68049886b314401740025e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Atria/Atria/Sessions.swift:36441-36450 | Atria/Atria/Sessions.swift:44242-44251 | Atria/Atria/Sessions.swift:45260-45269 | Atria/Atria/Sessions.swift:47086-47095 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":36441}}}],"partialFingerprints":{"codehealthFindingId/v1":"753f3d81d1d316d052a174234626161b06874a990dac40865b3f783b38137b26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 3): Atria/Atria/AtriaHealthScreen.swift:862-871 | Atria/Atria/AtriaWidgetOvernightBoard.swift:106-112 | Atria/AtriaWidget/AtriaWidget.swift:304-310 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060calendar\u0060 to \u0060Calendar\u0060 in one and \u0060Calendar = .current\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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":862}}}],"partialFingerprints":{"codehealthFindingId/v1":"a967d8aedfea125533ced5ca43865910756f0313caba2ce94411e6448ef79588"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Atria/Atria/AtriaStressDetailView.swift:1570-1579 | Atria/Atria/AtriaStressDetailView.swift:1714-1723 | Atria/Atria/AtriaStressDetailView.swift:1829-1838 \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 \u0060Atria/Atria/AtriaStressDetailView.swift:1570\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"67534b52032ad68b56f952f40df82ad7b456c759c1ee7059bf27ad9f297609a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Atria/Atria/Sessions.swift:22342-22351 | Atria/Atria/Sessions.swift:22432-22441 | Atria/Atria/Sessions.swift:22565-22576 \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 \u0060Atria/Atria/Sessions.swift:22342\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/Sessions.swift:22351\u0060 calls \u0060trendDetailSnapshot\u0060 and \u0060Atria/Atria/Sessions.swift:22576\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22342}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7e6223460e5e5c08081dc2a8175429e021ab69299f379242d85e332a1c506b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:3259-3270 | Atria/Atria/AtriaActivityMonitor.swift:3275-3286 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3259}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef970eb7d374b5b1891e406944c7c53d81e21e7831de6995190d180b8cac20d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:5052-5061 | Atria/Atria/AtriaBLEManager.swift:5099-5108 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060Atria/Atria/AtriaBLEManager.swift:5062\u0060 calls \u0060set\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:5109\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":5052}}}],"partialFingerprints":{"codehealthFindingId/v1":"74873d61cf5822e3c14f55244dd94d4645d987b13d5f6545abecf4b2f56532f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:10086-10095 | Atria/Atria/AtriaBLEManager.swift:10119-10128 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":10086}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd296fa36fdfc27162549d78414da11bb25270a621ab843f4ab922f170116a71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:15809-15818 | Atria/Atria/AtriaBLEManager.swift:34834-34843 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:15809\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":15809}}}],"partialFingerprints":{"codehealthFindingId/v1":"42713413f766e806700e09a2dc4ddcb745976bdba6fbbe87288b0a6d21df6fc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:55343-55352 | Atria/Atria/AtriaBLEManager.swift:56118-56127 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":55343}}}],"partialFingerprints":{"codehealthFindingId/v1":"2728f43e29fa9b58d6c3cac310df2f78ab11cf4587b99151f8ffab44d03e8490"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaBehaviorImpact.swift:63-73 | Atria/Atria/AtriaJournalInsights.swift:183-193 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060days\u0060 to \u0060[Day]\u0060 in one and \u0060[AtriaBehaviorImpact.Day]\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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b41b8c1df3e2273213267a225390ec63eafb858acfb97540b1478f1e0e4670"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaCivilDayStepAuthority.swift:210-219 | Atria/Atria/AtriaCivilDayStepAuthority.swift:266-275 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaCivilDayStepAuthority.swift:210\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaCivilDayStepAuthority.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd93be9f397bf91012316dc34019e23cffb6b534ef71e251a88d1f2088f331b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaHealthspanDetailView.swift:514-523 | Atria/Atria/AtriaHealthspanDetailView.swift:532-541 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHealthspanDetailView.swift:514\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":"Atria/Atria/AtriaHealthspanDetailView.swift"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d282bed5fcdf37977d2384e1649ac428f2406cccbc3a3ee9ef0545c47405475"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1693-1702 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1719-1728 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1693}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c0170b46107028332bb1118d472cc1810c5390cac8d1e7264fa27734d035ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:3272-3281 | Atria/Atria/AtriaLiveWorkoutView.swift:3175-3184 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3272}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b3ce25a53142ab90bf9489b764501969ed76b21159081a3e02069a180f8279"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:13878-13887 | Atria/Atria/WidgetSnapshot.swift:2798-2806 \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 \u0060Atria/Atria/AtriaHomeView.swift:13878\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13878}}}],"partialFingerprints":{"codehealthFindingId/v1":"749776599e6a87d09d992aeca31eb98011f15c656188a5999ff8be131ccd3f31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaJournalTab.swift:203-212 | Atria/Atria/AtriaOverviewSections.swift:10570-10579 \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 \u0060Atria/Atria/AtriaJournalTab.swift:203\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaJournalTab.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"29246954ec58d8d9514e7d44bd7a39e1a00c4187e60933772e14c77e55addb6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaOnboardingPersonalization.swift:54-63 | Atria/Atria/AtriaTodayScreen.swift:1414-1423 \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 \u0060Atria/Atria/AtriaOnboardingPersonalization.swift:54\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOnboardingPersonalization.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b70e0b70b737687b43562c063a8b24d98abe285a4a2bd5c024fa4a2b2415db8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3059-3068 | Atria/Atria/AtriaTodayScreen.swift:2875-2884 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:3059\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3059}}}],"partialFingerprints":{"codehealthFindingId/v1":"970e4fe4fa8b0284e90d5845bcb4f61c7854d5f5102c65344e11a5ccbab26c3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9255-9264 | Atria/Atria/AtriaOverviewSections.swift:9265-9274 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9255}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bcf8d6f3b249aaebb709ab155d085d389678bf972f2536e0eb8f5b3af40fdfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionProjection.swift:341-348 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1166-1175 \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 \u0060Atria/Atria/AtriaRecoveredMotionProjection.swift:341\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"34dc3de8a7eb5865444365ca90ec580c2f0c78431431bab67284ee99c2986835"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaSleepHypnogram.swift:1148-1157 | Atria/Atria/AtriaSleepHypnogram.swift:1167-1176 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepHypnogram.swift:1148\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"22f550dfa4b5e9d7dd118eb8a58d0279b6e68dccbb7dc5c48f768894908015b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/AtriaStrengthSetLogging.swift:292-301 | Atria/Atria/AtriaStrengthSetLogging.swift:312-320 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaStrengthSetLogging.swift:292\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":"Atria/Atria/AtriaStrengthSetLogging.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ae6f6af8ee3e40994a28cdecba438dfdf495ff1110a3d8b328e7b3cb10bbfd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/AtriaStressMonitor.swift:3807-3816 | Atria/Atria/AtriaStressMonitor.swift:4122-4130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":3807}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ec36c8e226cb14f220c910283edb36837b4d5709a14f3792bbced3535f5e10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:741-750 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1280-1289 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:741\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15c38d8b5bf6cb88a9305374bfd1318f4c9c94e2146eb026335ece5c818cc89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:691-700 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:291-298 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fe154c5475732ab19dc8c27ad19ac3b61445c108b3326906f9a5bdf82ddc5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/DailyRollupStore.swift:1030-1039 | Atria/Atria/DailyRollupStore.swift:1061-1070 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"493b6168e41442aa412ada4a02e79ed5fac204114717ad505515c33291aa3c6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:286-295 | Atria/Atria/HealthKitExporter.swift:309-318 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HealthKitExporter.swift:286\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/HealthKitExporter.swift:285\u0060 calls \u0060predicateForSamples\u0060 and \u0060Atria/Atria/HealthKitExporter.swift:308\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ead8a54f6ada6b2abf09317d8c9775e6f800536a51643640dacaeda0a0b8640"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:1518-1527 | Atria/Atria/HistoricalArchive.swift:1580-1589 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:1518\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":1518}}}],"partialFingerprints":{"codehealthFindingId/v1":"1deb3037a3c34f3c585d3b2e4c45369faa82a24962f1faf01c7a11a51843addc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:7374-7383 | Atria/Atria/HistoricalArchive.swift:7391-7400 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:7374\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7374}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d1281196daaf81356a6b4059993a9fa172d979975e6e46f8b80bf474513325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/Sessions.swift:22416-22424 | Atria/Atria/Sessions.swift:22545-22554 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22416}}}],"partialFingerprints":{"codehealthFindingId/v1":"977abebb01959e0f3fa7c1faee577795357d41d53eb7b1d41dbdb6873fac6014"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/Sessions.swift:25758-25767 | Atria/Atria/Sessions.swift:25784-25793 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:25758\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":25758}}}],"partialFingerprints":{"codehealthFindingId/v1":"52cefffbada00ab0386f0b744da04353de2af071d7a13931a82cb8605f995879"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/Sessions.swift:27491-27500 | Atria/Atria/Sessions.swift:27587-27595 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:27491\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":27491}}}],"partialFingerprints":{"codehealthFindingId/v1":"348ac7e873ce22864e05adcaf50f671673b035952b2ed7a64a72657fef84d8f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/Sessions.swift:34496-34505 | Atria/Atria/Sessions.swift:36131-36140 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34496}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e67863edf8646b03d685bfadebf2de6a0c97f5e49739cae18c19d69ce5ec35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/Sessions.swift:37863-37872 | Atria/Atria/Sessions.swift:43266-43275 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37863}}}],"partialFingerprints":{"codehealthFindingId/v1":"b262cfe181d37cfc53db1770a006b77b747bc9fbdbf13a1e3277c37fbed7784c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/Sessions.swift:41103-41112 | Atria/Atria/Sessions.swift:41158-41167 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":41103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbd3ed95f4246ce581e3057a63014096730d5efdaa36788fd149d2d11ee3190"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/Sessions.swift:46406-46415 | Atria/Atria/Sessions.swift:46788-46796 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:46406\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":46406}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd93bd4b15798cc57e73b096ceb3b808166fc3a25e231721d89de2f65e54ae15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/Sessions.swift:47354-47362 | Atria/Atria/Sessions.swift:47511-47520 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47354}}}],"partialFingerprints":{"codehealthFindingId/v1":"63123f6dd24e5b1b19c3709608d3b36565c04c4fbd6c5f08fe6d55ba854e0288"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Atria/Atria/Sessions.swift:48372-48380 | Atria/Atria/Sessions.swift:48464-48473 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:48372\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48372}}}],"partialFingerprints":{"codehealthFindingId/v1":"9151234dca8fd947c600e3d591ee7ab2afa47a0d6d5ae84d903fe90f564ec1b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:56107-56117 | Atria/Atria/Sessions.swift:56149-56159 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060Atria/Atria/Sessions.swift:56161\u0060 calls \u0060detached\u0060, \u0060AtriaDebugLog\u0060 and \u0060Atria/Atria/Sessions.swift:56119\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":56107}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab0e9a8cac3ae18916895d517e8f893440bae9c986264b99a9061d1912e01e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:2055-2064 | Atria/AtriaWidget/AtriaWidget.swift:2070-2079 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:2055\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"570314c8a9ca56efd149d218940fd097e34cd467cd2e172b880c41040fee83c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): Atria/Atria/Sessions.swift:13625-13634 | Atria/Atria/Sessions.swift:14176-14185 | Atria/Atria/Sessions.swift:23524-23532 | Atria/Atria/Sessions.swift:23729-23737 | Atria/Atria/Sessions.swift:23928-23936 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13625}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed5f63231de268c10dd95a8e346344362f7852c53cfd8bddc097b1aacb5f2ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): Atria/Atria/ActiveSessionJournal.swift:1327-1335 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:724-732 | Atria/Atria/AtriaStrapStepLedger.swift:539-547 | Atria/Atria/Sessions.swift:7224-7232 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:7224\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 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/ActiveSessionJournal.swift:1323\u0060 calls \u0060synchronizeDirectory\u0060, \u0060deletingLastPathComponent\u0060 and \u0060Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:720\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1327}}}],"partialFingerprints":{"codehealthFindingId/v1":"2305b16504352172218cabf2efaafadaab1eab132bde504f750cf7d744bd605c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Atria/Atria/AtriaHistorySection.swift:685-693 | Atria/Atria/AtriaHistorySection.swift:1342-1350 | Atria/Atria/AtriaOverviewSections.swift:2569-2577 \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 \u0060Atria/Atria/AtriaHistorySection.swift:685\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35df4419f5e8e1f540c543f2150180cf452afb9bf71c668c93818054cb396b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Atria/Atria/AtriaSleepWakeResearch.swift:70-78 | Atria/Atria/Sessions.swift:2075-2083 | Atria/Atria/Sessions.swift:56719-56727 \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 \u0060Atria/Atria/AtriaSleepWakeResearch.swift:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e3f7f498ecf476f861653f5bb40b1a734a66bd1855b11a529e5d36ed19ac47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Atria/Atria/AtriaVitalsCollectionSections.swift:4300-4308 | Atria/Atria/Sessions.swift:22827-22839 | Atria/Atria/Sessions.swift:23090-23102 \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 \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:4300\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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4300}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec419bce7161470d7cc742c34df64515e35237ba67798ee4b58e51190df040e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:10485-10493 | Atria/Atria/HistoricalArchive.swift:10516-10524 | Atria/Atria/HistoricalArchive.swift:10529-10537 \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 \u0060Atria/Atria/HistoricalArchive.swift:10485\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":10485}}}],"partialFingerprints":{"codehealthFindingId/v1":"047a2d6003d01977d239f5bc6fb0a6ecdd0079b86847952be8cd1a8fca4f3b2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Atria/Atria/Sessions.swift:33428-33436 | Atria/Atria/Sessions.swift:33472-33480 | Atria/Atria/Sessions.swift:34276-34284 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33428}}}],"partialFingerprints":{"codehealthFindingId/v1":"2631750f5d7576a86b45a4e826075282fd1d59446cf6b9717cd930a8d9f658f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): Atria/Atria/AtriaActiveSessionRestorePreparer.swift:166-174 | Atria/Atria/AtriaActiveSessionRestorePreparer.swift:177-185 | Atria/Atria/AtriaActiveSessionRestorePreparer.swift:187-194 \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 \u0060Atria/Atria/AtriaActiveSessionRestorePreparer.swift:166\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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":"Atria/Atria/AtriaActiveSessionRestorePreparer.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5e6462411d93c79092780ba45d4865143f517c900e197ff8171b72ef9d6712"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaActiveSessionRestorePreparer.swift:298-306 | Atria/Atria/Sessions.swift:30038-30046 \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":"Atria/Atria/AtriaActiveSessionRestorePreparer.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"986e68edf9cd9bea22d6743ea8771c23d8132e0a33907d9061321b70bf9675d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:2808-2813 | Atria/Atria/AtriaWorkoutReviewSheet.swift:301-309 \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 \u0060Atria/Atria/AtriaActivityMonitor.swift:2808\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":2808}}}],"partialFingerprints":{"codehealthFindingId/v1":"265828a9dbe0281f250119f6e2eaa4cd394a14b9e923b7e5dc08359b68c4aa9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:2914-2919 | Atria/Atria/AtriaActivityMonitor.swift:5427-5435 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaActivityMonitor.swift:2914\u0060 it begins part-way through the construct above it, so those exact 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":2914}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e82482cd16a68afc23b01958480f35cd67ea549f8d6a407c0af83c985d46b2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:520-530 | Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:555-566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEBatteryTransportPolicy.swift:520\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"be302f6c615da9bfd7d73354bd18b91a867386649e0da50d272f72e7e912d446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:7810-7818 | Atria/Atria/AtriaBLEManager.swift:7926-7934 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":7810}}}],"partialFingerprints":{"codehealthFindingId/v1":"559ac26a1d771df86f2df8d57222596264df0996984d49797cf8874c6028d008"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:28304-28312 | Atria/Atria/AtriaBLEManager.swift:39737-39745 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28304}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ae1e06601df2d00fee60964ecc64fb54a1520e60a56edc6ab9dac14e136f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaColdSessionFacts.swift:152-160 | Atria/Atria/AtriaLiveWorkoutView.swift:604-612 \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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead7c03187854058fa5c26799eebc95dcac8254ca2527e668ab479e860672c07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Atria/Atria/AtriaColdSessionMigration.swift:104-115 | Atria/Atria/AtriaColdSessionMigration.swift:399-410 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaColdSessionMigration.swift:104\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"161823bf134a440c5791fb1446be45995ee13f8fb3f21d6c96a9f20fc9bafdec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Atria/Atria/AtriaHealthScreen.swift:524-531 | Atria/Atria/AtriaHealthScreen.swift:1937-1945 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHealthScreen.swift:524\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c93ada3bbc53b52daeb2fd9eadb8ad1e97c22158ff7b8bf161cac0aaeed5716"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:349-357 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:447-455 \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 \u0060Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:349\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1440ac157b63fc3a17149eb4acc056b695f498a7ecbe94667e8ced0ad3e6ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:535-543 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:570-578 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:535\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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"490f8cb3f2a59e2cef02b1cbe1b79e88b60f07406ec0e8636c33bc95f97ea4f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistoricalGapLedger.swift:651-659 | Atria/Atria/AtriaHistoricalGapLedger.swift:675-683 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalGapLedger.swift:651\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5546172b29c85acd607c1c07ee58460c4e9659bd920f5f3fb6d9cdb4b66858"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:84-92 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:60-68 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:84\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c59d1a7a033b52161daab3118bc0bc3f9a95e88337e9dc2ebc9a578eda92238"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:613-621 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:1045-1053 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:613\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb50346a64718aefbc3f35c633e83b896e92a92c33a4dee6f23646c39a2db2b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:3347-3355 | Atria/Atria/AtriaHomeView.swift:3403-3411 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":3347}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d24c9a2c800593212d7c9442222a2e5827ed976f2dd4c531d25b2aa16f52a4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:7820-7828 | Atria/Atria/AtriaHomeView.swift:7844-7856 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHomeView.swift:7820\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":7820}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc99292fd6a013c8df5fd8d817159263a5e681926a7c2251294af80f1f0234e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:14369-14382 | Atria/Atria/AtriaHomeView.swift:14384-14392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHomeView.swift:14384\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14369}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4d5288b8ae17c1006df0abba0acdeb04533b333a0e764774cd05cde169c61f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaLiveWorkoutView.swift:2715-2723 | Atria/Atria/AtriaLiveWorkoutView.swift:2860-2868 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaLiveWorkoutView.swift:2715\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2715}}}],"partialFingerprints":{"codehealthFindingId/v1":"40004c582996a6ae54a2d765fb7e40530f643654cccda620d8ccadf8af704fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaLiveWorkoutView.swift:3724-3732 | Atria/Atria/AtriaLiveWorkoutView.swift:4079-4087 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaLiveWorkoutView.swift:3724\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaLiveWorkoutView.swift:3733\u0060 calls \u0060minimumScaleFactor\u0060 and \u0060Atria/Atria/AtriaLiveWorkoutView.swift:4088\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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":3724}}}],"partialFingerprints":{"codehealthFindingId/v1":"386b8611478c1536d686521d3b79d1d3413cb6a15aa49d6512326b302ba6e9b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9219-9227 | Atria/Atria/AtriaOverviewSections.swift:9228-9236 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9219}}}],"partialFingerprints":{"codehealthFindingId/v1":"158a4df962b09f7299ca5280c7a9965e7dc300f8f953563f29bcb226e0d0a856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:10869-10877 | Atria/Atria/AtriaTrendChart.swift:1501-1509 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:10869\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10869}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad570b7ca2ac2677bb8e4a1cb834886fc12a433521a5b9c043ab92542e2f0b6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionAnalytics.swift:427-435 | Atria/Atria/Sessions.swift:33379-33386 \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 \u0060Atria/Atria/AtriaRecoveredMotionAnalytics.swift:427\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note 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":"Atria/Atria/AtriaRecoveredMotionAnalytics.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce1da34c24091639fb0a7d09688a64f94567b4027a55ae51e0aa7a8e830cf7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionProjection.swift:167-175 | Atria/Atria/AtriaRecoveredMotionProjection.swift:237-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"31bc7a659844377e5a2b54528177fe78ecb3dabf9a00b56e6870890675124fea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift:35-45 | Atria/Atria/AtriaRecoveredRRProjection.swift:413-423 \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 \u0060Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift:35\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":"Atria/Atria/AtriaRecoveredMotionReplayIdentity.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb447423dad1acf8d42700bb7e12e6983d8fc998260fb74432367a6a38e7ff07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): Atria/Atria/AtriaSharedUIComponents.swift:790-796 | Atria/Atria/Sessions.swift:61210-61218 \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":"Atria/Atria/AtriaSharedUIComponents.swift"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"237c19cd3bb2eefb8769053900ab0f47b49d7424d617657ee57dd4aea3e2d0f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaSleepWakeResearch.swift:283-291 | Atria/Atria/AtriaSleepWakeResearch.swift:309-318 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:283\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72be75ef5dc7a9a2337f74497f4a0c679827c51f5216b56e719f3f3b3f5b727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaSleepWakeResearch.swift:1102-1110 | Atria/Atria/AtriaSleepWakeResearch.swift:1177-1185 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:1102\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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"1186536726a4c655e8ba21af1ab860229e1dc0607c8699eb26e3a5cebb8b7e6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaStressDetailView.swift:1629-1637 | Atria/Atria/AtriaVitalsCollectionSections.swift:3387-3395 \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 \u0060Atria/Atria/AtriaStressDetailView.swift:1629\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaStressDetailView.swift:1638\u0060 calls \u0060Text\u0060 and \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:3396\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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1629}}}],"partialFingerprints":{"codehealthFindingId/v1":"db29171be3de043078dc7559856686c409c30aa1990af04999aa0f98c922fcff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaTodayScreen.swift:4704-4712 | Atria/Atria/AtriaVitalsCollectionSections.swift:2510-2518 \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 \u0060Atria/Atria/AtriaTodayScreen.swift:4704\u0060 it does not close everything it opens, so those exact 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 \u006010\u0060 in one and \u00608\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaTodayScreen.swift:4713\u0060 calls \u0060HStack\u0060 and \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:2519\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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":4704}}}],"partialFingerprints":{"codehealthFindingId/v1":"27bd81bb6296bf01a7d74f87742dff54d49d709f8ea8dd8f4a7c68cd1d74194c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1360-1368 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1379-1387 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"f560f03373c89fa8d07d265c6a11dff52a1e6d7324155844c1a5dbc5256e7ee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/DailyRollupStore.swift:826-834 | Atria/Atria/Sessions.swift:3338-3346 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/Sessions.swift:3336\u0060 calls \u0060decode\u0060 and \u0060Atria/Atria/DailyRollupStore.swift:824\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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa304220835cfb6956c4bce9f9bb41021699425f54651b4276f9d514a30b16bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:1139-1147 | Atria/Atria/HealthKitExporter.swift:1811-1818 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HealthKitExporter.swift:1139\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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1139}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2bea5774cb3bc7611f2329ec918d92b55343d1feadbdb8f50b0408c0a530ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:8320-8328 | Atria/Atria/HistoricalArchive.swift:8439-8447 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8320}}}],"partialFingerprints":{"codehealthFindingId/v1":"c856c3cc6ffd62970f6dc4dccbff815b56d9ebef5c73ac875b606bedfa7f8b82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/LocalNotificationScheduler.swift:993-1001 | Atria/Atria/LocalNotificationScheduler.swift:1848-1856 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/LocalNotificationScheduler.swift:993\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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e90ab4dc2283a59b5c74ada39d794d0f4d96d3c8df00ac8b0156857200d0d60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): Atria/Atria/Sessions.swift:30799-30804 | Atria/Atria/Sessions.swift:30825-30833 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060calendar\u0060 to \u0060Calendar\u0060 in one and \u0060Calendar = .current\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30799}}}],"partialFingerprints":{"codehealthFindingId/v1":"824819ade39ad7eadc7dabb9a86e3f10c273e4cc7db44d556fef681542b9efbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:31383-31393 | Atria/Atria/Sessions.swift:31606-31616 \u2014 both copies are in the same file, so extract the block 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, \u0060Atria/Atria/Sessions.swift:31605\u0060 calls \u0060currentCollectionStatus\u0060 and \u0060Atria/Atria/Sessions.swift:31382\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31383}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ba0bc42152b646e0f2b0c8f631b02cc0b6fef62ca96052bd216a4684663f41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/Sessions.swift:34089-34097 | Atria/Atria/Sessions.swift:36130-36138 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":34089}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c52db6304bd41988c8c4dfe0e5ee85f72012609504470dda946619915e8a42a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/Sessions.swift:44909-44917 | Atria/Atria/Sessions.swift:44983-44991 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:44909\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44909}}}],"partialFingerprints":{"codehealthFindingId/v1":"df5017ccff8aee219dafbd3db38b1c1fff6cea34fb5b30bf92fba984b8d90bce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/Sessions.swift:44990-44998 | Atria/Atria/Sessions.swift:45053-45061 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44990}}}],"partialFingerprints":{"codehealthFindingId/v1":"5095e2edc3430dcf5492b26acd56f0f86a947cd6100ce72f3706e85fd58c41ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/Sessions.swift:48797-48805 | Atria/Atria/Sessions.swift:48958-48966 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48797}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebb99491392d49c032e46884450bd04117f30f46d5dc62bfa0fe4f749288559"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/Sessions.swift:51738-51746 | Atria/Atria/Sessions.swift:51828-51836 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:51738\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":51738}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ee7b55d499325f3b1254437c48a9928255f4a34f343d7ba6b7719826edfbb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:1228-1236 | Atria/AtriaWidget/AtriaWidget.swift:1264-1272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:1228\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"1976289b32a5c3105d82c8918aba41df44af08b59a6ecf6f2070a1379ef9702e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:1237-1245 | Atria/AtriaWidget/AtriaWidget.swift:1274-1282 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:1237\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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":1237}}}],"partialFingerprints":{"codehealthFindingId/v1":"6873f9bebf39460d44a2d4264c7f179b08b832747281fc405fc08d64e66f33d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:2911-2919 | Atria/AtriaWidget/AtriaWidget.swift:2929-2937 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:2911\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2911}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe8f0421b0ebab78391e53376d788e2154e2a480ba9478fff13d75257f4ea31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): Atria/Atria/AtriaSleepWakeResearch.swift:25-32 | Atria/Atria/AtriaSleepWakeResearch.swift:70-77 | Atria/Atria/Sessions.swift:2075-2082 | Atria/Atria/Sessions.swift:56719-56726 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepWakeResearch.swift:25\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b68603c81680dd00d9dd83d782702943f0cd0791f2f952536e136db945591158"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaBLEManager.swift:28839-28846 | Atria/Atria/AtriaBLEManager.swift:28887-28894 | Atria/Atria/AtriaBLEManager.swift:29946-29953 \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 \u0060Atria/Atria/AtriaBLEManager.swift:28839\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":28839}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5069a9d3c62b7e4e0ae61f26fd97ac98c83346bbcd4f13198138d6f41380fdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaHistoricalAggregateReader.swift:107-114 | Atria/Atria/AtriaHistoricalAggregateReader.swift:270-277 | Atria/Atria/AtriaHistoricalAggregateReader.swift:540-547 \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 \u0060Atria/Atria/AtriaHistoricalAggregateReader.swift:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"4faac9267b1001149489966af14f5a0a298e3a5b006f178d2c1eb6b76ba28953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaOverviewSections.swift:1866-1873 | Atria/Atria/AtriaSleepPlannerCharts.swift:529-536 | Atria/Atria/AtriaStressDetailView.swift:1091-1098 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:1866\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaOverviewSections.swift:1876\u0060 calls \u0060Spacer\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1101\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1866}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb961d3e13d2430925f9821db97feeba0ec2400e909715f4a1f7d263cc5766a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaOverviewSections.swift:1889-1896 | Atria/Atria/AtriaSleepPlannerCharts.swift:547-554 | Atria/Atria/AtriaStressDetailView.swift:1110-1117 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:1889\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaSleepPlannerCharts.swift:555\u0060 calls \u0060foregroundStyle\u0060 and \u0060Atria/Atria/AtriaOverviewSections.swift:1897\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1889}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c5cd0daa16429a5343a97b985114d9bde07d63971cba036127a2712451d98f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 6): Atria/Atria/AtriaOverviewSections.swift:9192-9199 | Atria/Atria/AtriaOverviewSections.swift:9216-9223 | Atria/Atria/AtriaOverviewSections.swift:9238-9240 | Atria/Atria/AtriaOverviewSections.swift:9252-9259 | Atria/Atria/AtriaOverviewSections.swift:9276-9278 | Atria/Atria/AtriaOverviewSections.swift:9323-9325 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:9192\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaOverviewSections.swift:9191\u0060 calls \u0060ghostSeries\u0060, \u0060AtriaDetailPeriodSummary\u0060 and \u0060Atria/Atria/AtriaOverviewSections.swift:9238\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9192}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67af10c464675e5541818db3d15b87c229627a6e6c0753368441df385d2205d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:729-737 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:819-826 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1314-1323 \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 \u0060Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:729\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"855ded77f6bca2f582965c66885b8606489cd328e560843c8fcb4a8ec6440f69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1272-1279 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1361-1367 | Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift:1380-1386 \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 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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":1272}}}],"partialFingerprints":{"codehealthFindingId/v1":"a702a4450c74cff6099d0a8e0da8c4b7f8355c6a6401f85e0e194779b94f2da7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:2843-2852 | Atria/Atria/AtriaStressDetailView.swift:1732-1741 \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 \u0060Atria/Atria/AtriaActivityMonitor.swift:2843\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":2843}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb2767f98b2b14761fe0618b572eb5d41cf138ada93c6a158eb64467373e9b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:44-50 | Atria/Atria/AtriaAnalytics.swift:121-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 \u0060Atria/Atria/AtriaAnalytics.swift:44\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1873c922ddf95ab87d156af4f1b6893e670bbb365cf271ecec339c8003e43a44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25321-25328 | Atria/Atria/AtriaBLEManager.swift:25740-25747 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25321}}}],"partialFingerprints":{"codehealthFindingId/v1":"103f6e85865dfcf8c89ce597c18d4e17c57a237e69eab7f33b0519be5cd89036"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaBehaviorImpact.swift:97-104 | Atria/Atria/Sessions.swift:47475-47482 \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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c6db353553658c18604468ee628fc2b251d1dd98e353a22df6f45b059b0c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaGraphGrammar.swift:770-777 | Atria/Atria/AtriaOverviewSections.swift:9072-9079 \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 \u0060Atria/Atria/AtriaGraphGrammar.swift:770\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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"40405f3b9d07c368b49744cf17c40f531aa0e964337115411be08999c74bb5b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaHealthScreen.swift:2373-2380 | Atria/Atria/AtriaTodayScreen.swift:676-683 \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 \u0060Atria/Atria/AtriaHealthScreen.swift:2373\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2373}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b3f770793b4613914a48014a211a260642962d397cfe3263dfe00b8d7e509a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaHeroConnectionSections.swift:1089-1096 | Atria/Atria/AtriaManualSleepSheet.swift:677-684 \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 \u0060Atria/Atria/AtriaHeroConnectionSections.swift:1089\u0060 it does not close everything it opens, so those exact 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.center\u0060 in one and \u0060.top\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaHeroConnectionSections.swift:1098\u0060 calls \u0060lineLimit\u0060, \u0060minimumScaleFactor\u0060 and \u0060Atria/Atria/AtriaManualSleepSheet.swift:686\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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":1089}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d35ff0c15cc5b2b274ca22b30e505e66bc53c3c179d8f5d0f4e38a1d069966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:676-682 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:704-711 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"16358dc81a7a27b5a661329877f6619ecf0bb361c9a0d78bcf8934fd166e2498"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:219-226 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:282-289 \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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead66266eedfde79ffd273aeb8da34c393ed8f9409e72a319d3bc64066242fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaHistoricalGapLedger.swift:642-649 | Atria/Atria/AtriaHistoricalGapLedger.swift:666-673 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalGapLedger.swift:642\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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca87e8fcd2f1c7bcdf86adb08c9fe86eb04e703c8d10f250cf1b9bde46369ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaIMUDiagnosticTransport.swift:1282-1289 | Atria/Atria/AtriaIMUDiagnosticTransport.swift:1632-1639 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaIMUDiagnosticTransport.swift:1282\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1b7666ae5fb61ff477ce0c7f96676f618d60f800231723512dbb6f009acc9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Atria/Atria/AtriaManualSleepSheet.swift:87-93 | Atria/Atria/AtriaVitalsCollectionSections.swift:5212-5219 \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 \u0060Atria/Atria/AtriaManualSleepSheet.swift:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af80fbd5c75d2513ae5fe44a81918f755d6a70f2cbb301f5230bce6bbede483"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:4573-4586 | Atria/Atria/AtriaOverviewSections.swift:4591-4598 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:4573\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":4573}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b554f9b6fe580669418f904792de0a7e5b6a438fb3fa3cd321d7defa78e871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:4897-4904 | Atria/Atria/AtriaOverviewSections.swift:4933-4940 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:4897\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":4897}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14272fa81a2d8a7a03bfb9905de5614c5723ef76243d62684e3c2b77b5208a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:6407-6414 | Atria/Atria/AtriaOverviewSections.swift:6456-6462 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:6407\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":6407}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5ad25c5d2be0ffab05da1e057b2d9a2b202f92c014c6d7c94d12bc99bbdc29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9622-9627 | Atria/Atria/AtriaOverviewSections.swift:9651-9658 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:9622\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9622}}}],"partialFingerprints":{"codehealthFindingId/v1":"66fb5dc5b1ede0fcdabfadc1de800c90f82f8cfcd4e67418a7f0d14f77fbc1a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:10233-10240 | Atria/Atria/AtriaOverviewSections.swift:10864-10871 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaOverviewSections.swift:10233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10233}}}],"partialFingerprints":{"codehealthFindingId/v1":"38afd482e3a3a474aa55e4ec05dca43c5a8426f5c2733a22f660957ff351ae83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:10251-10258 | Atria/Atria/AtriaTrendChart.swift:1496-1503 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:10251\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":10251}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ecffc5d6bb5dd3e46f6939cf834ddff06c99c5bf3640d2e9035a7e24b401fc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift:272-279 | Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift:376-383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc39f4d7a37c1b7e8a49db732d9c3a1ee28f1b8d81a8980ca734e746114d6164"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaRoutineCard.swift:257-264 | Atria/Atria/AtriaWeeklyPlan.swift:292-299 \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":"Atria/Atria/AtriaRoutineCard.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06a3b8f43acc61106ab619fa5c34aecbe2d45dd813596a97f16c8f29b5daeff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaSettingsView.swift:1468-1475 | Atria/Atria/AtriaSettingsView.swift:1477-1484 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc10959a8bc0d32c6c47d9ea049d81d42c03fa4411140d862a3fd8353071e437"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaSleepPlanner.swift:111-118 | Atria/Atria/AtriaStrainPacing.swift:57-64 \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 \u0060Atria/Atria/AtriaSleepPlanner.swift:111\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":"Atria/Atria/AtriaSleepPlanner.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5958bb9e66c0bd79e154d3d86d24a78cfc5e207f871f611383071cc7b948e4b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:671-678 | Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:1327-1333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:671\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"58129564625e38e8924df437aa31d4eaff66c767ea8e006656acb05948a4e156"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickSequenceReducer.swift:51-58 | Atria/Atria/AtriaWhoop4MotionTickStepModel.swift:448-453 \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":"Atria/Atria/AtriaWhoop4MotionTickSequenceReducer.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d827240cf69e965bef29440c0623c2215f3fc0b04da1c65f3973b2ecdd6ee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:1503-1512 | Atria/Atria/HealthKitExporter.swift:1539-1548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HealthKitExporter.swift:1503\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":1503}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df7f270183ce6e651d2539a5dda3bb2e3855877c95e6b464b1b4f825a7d36bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/HealthKitExporter.swift:2046-2053 | Atria/Atria/Sessions.swift:54931-54938 \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":"Atria/Atria/HealthKitExporter.swift"},"region":{"startLine":2046}}}],"partialFingerprints":{"codehealthFindingId/v1":"2767a9806df22b4b5ce962d48544e51b851f4b6e2a8a83a23241b84172fc7a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Atria/Atria/Sessions.swift:2417-2427 | Atria/Atria/Sessions.swift:2449-2459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:2417\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ff9e50010a4f949a9a3fecc1edb6f19ef142530ab42fa0e9f01f0b4a1819c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:4098-4105 | Atria/Atria/Sessions.swift:4136-4143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:4098\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":4098}}}],"partialFingerprints":{"codehealthFindingId/v1":"52aeb500585cae978fca23010a1446c51c97aff5a45cd39040c58a077c87a57f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:7869-7876 | Atria/Atria/Sessions.swift:7883-7890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7869}}}],"partialFingerprints":{"codehealthFindingId/v1":"22bde97ace79ca857655de2196ef7930f9777ba3f379dc00e671f2b97714d9ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:31375-31382 | Atria/Atria/Sessions.swift:31597-31604 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060Atria/Atria/Sessions.swift:31605\u0060 calls \u0060currentCollectionStatus\u0060 and \u0060Atria/Atria/Sessions.swift:31383\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":31375}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42bfd3ec9f26f6559f80dfcfff07c49d665e74b8835392962be7c99a03aa5a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Atria/Atria/Sessions.swift:43517-43524 | Atria/Atria/Sessions.swift:43964-43969 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:43517\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43517}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf45bd3c0166e99371082b5bfd4dc10882dd4d8174747c25abd1a6a236268ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:51475-51482 | Atria/Atria/Sessions.swift:51522-51529 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:51475\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51475}}}],"partialFingerprints":{"codehealthFindingId/v1":"319f06594b7d8af49471504544fa2b481aef9a4814dd1d9496ade974adfec09f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:54224-54231 | Atria/Atria/Sessions.swift:54660-54667 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:54224\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":54224}}}],"partialFingerprints":{"codehealthFindingId/v1":"e779e5e4f6d1961c66665385774fd1e9bad395cf240b47fd700f72ac37f0a144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:59867-59874 | Atria/Atria/Sessions.swift:59937-59944 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":59867}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ea0d8bbf66a9055035a4e53a65e2d8dafc465cd741e2c9986c2798b8dfd17e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:2274-2281 | Atria/AtriaWidget/AtriaWidget.swift:3225-3232 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/AtriaWidget/AtriaWidget.swift:2274\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":2274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1d8130a6c971430c702479a72a1e60a79d4cb8373acb70b039cbbce88664fe7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): Atria/Atria/AtriaActivityMonitor.swift:5376-5382 | Atria/Atria/AtriaStressDetailView.swift:1478-1484 | Atria/Atria/AtriaStressDetailView.swift:1493-1499 | Atria/Atria/AtriaStressDetailView.swift:1791-1797 | Atria/Atria/AtriaVitalsCollectionSections.swift:3272-3278 | Atria/Atria/AtriaVitalsCollectionSections.swift:3287-3293 \u2014 there are 6 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 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 \u0060Atria/Atria/AtriaActivityMonitor.swift:5376\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5376}}}],"partialFingerprints":{"codehealthFindingId/v1":"650d5c79d37711c340fed5f18d5df0f1d7f233b2197970995802a1ee000e81f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Atria/Atria/AtriaAnalytics.swift:231-238 | Atria/Atria/AtriaAnalytics.swift:563-570 | Atria/Atria/AtriaAnalytics.swift:591-598 \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 \u0060Atria/Atria/AtriaAnalytics.swift:231\u0060 it does not close everything it opens, so those exact 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 \u0060greenDelta\u0060 to \u0060Double = 1.5\u0060 in one and \u0060Double = 0.5\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f4d0314f8f376217d15f6d88fceda321b185c4f538310984ab3f536aeb4dcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/AtriaNotificationCategories.swift:314-320 | Atria/Atria/LocalNotificationScheduler.swift:381-387 | Atria/Atria/LocalNotificationScheduler.swift:499-505 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060now\u0060 to \u0060Date\u0060 in one and \u0060Date = Date()\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":"Atria/Atria/AtriaNotificationCategories.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"000bee07b36336f8765547e6444e7e693b8b31590f20f214ff2a3abd63e72587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/AtriaOverviewSections.swift:1866-1872 | Atria/Atria/AtriaOverviewSections.swift:2509-2515 | Atria/Atria/AtriaStressDetailView.swift:1091-1097 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:1866\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaOverviewSections.swift:1876\u0060 calls \u0060Spacer\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1101\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1866}}}],"partialFingerprints":{"codehealthFindingId/v1":"9796f326052da05b23ff2c41bdb932679362cf221fd3c92d95e53a85265dea5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/AtriaStrengthProgress.swift:352-358 | Atria/Atria/AtriaStrengthSetLogging.swift:51-57 | Atria/Atria/AtriaStrengthSetLogging.swift:60-66 \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. 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":"Atria/Atria/AtriaStrengthProgress.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"f371850a7f5e34e575bd7c7bd35648aa2bdee23052683c80eb7f8295e98844c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): Atria/Atria/HistoricalArchive.swift:3531-3536 | Atria/Atria/HistoricalArchive.swift:3814-3819 | Atria/Atria/HistoricalArchive.swift:4197-4203 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3531}}}],"partialFingerprints":{"codehealthFindingId/v1":"564c875cf60766b6f18aa820b956a47a22ffbaec466e5574b50cf59cbce2e3eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/Sessions.swift:44914-44920 | Atria/Atria/Sessions.swift:44988-44994 | Atria/Atria/Sessions.swift:45051-45057 \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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44914}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6ca99fe5719f305b8d7054b2f0b9a77ac202d169aeefbc29bc87dbe63ea753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/ActiveSessionJournal.swift:1036-1044 | Atria/Atria/Sessions.swift:29347-29355 \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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"292f1b5c1dbd946c6e0bf7dc6b9c452f82d9b9c3d492312f9c828074af134082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaAboutMetricSheet.swift:319-324 | Atria/Atria/AtriaOverviewSections.swift:6932-6938 \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 \u0060Atria/Atria/AtriaAboutMetricSheet.swift:319\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf97b46ea197db04198e187c647b0f3abce7370a8d5a65183d3494b5751f2620"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaActiveSessionRestorePreparer.swift:398-404 | tools/replay_step_calibration.swift:485-491 \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":"Atria/Atria/AtriaActiveSessionRestorePreparer.swift"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"291f47c5a8e0e715cc999f96944182feb035eb23767245a008ad1bb2f108e71b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:5360-5365 | Atria/Atria/AtriaStressDetailView.swift:1456-1462 \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 \u0060Atria/Atria/AtriaActivityMonitor.swift:5360\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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5360}}}],"partialFingerprints":{"codehealthFindingId/v1":"826bda5b78e3d135aebbb32c134f7581137f6868df372ef5ad0253bdbab31538"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:793-799 | Atria/Atria/Sessions.swift:20885-20891 \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 \u0060Atria/Atria/AtriaAnalytics.swift:793\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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"688b52ef7de2ab21a0b019294847458bc8b10f8483704a716196e9feffd15ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaAnalytics.swift:941-948 | Atria/Atria/AtriaAnalytics.swift:1231-1237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaAnalytics.swift:941\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9003127f30ea35a30472813d790ef803acce63175266cb96616aaaf279bf139"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:30498-30504 | Atria/Atria/AtriaBLEManager.swift:30561-30566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:30498\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30498}}}],"partialFingerprints":{"codehealthFindingId/v1":"a678ba89d14f97184ffebb91cb042924f3223f7e966d943a18480213ce7b77b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:34416-34422 | Atria/Atria/AtriaBLEManager.swift:39867-39873 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:34416\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34416}}}],"partialFingerprints":{"codehealthFindingId/v1":"1011cc4a0011982f0848224498c135779017db873fca17d1cc2fed7dedeadb57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:41426-41432 | Atria/Atria/AtriaBLEManager.swift:41795-41801 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:41426\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":41426}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4106088ec5b334d6e010ef3f563b9c464697c8bcb46b0e46ce28a6862c21827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaColdSessionStore.swift:348-355 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:337-343 \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 \u0060Atria/Atria/AtriaColdSessionStore.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. The matched lines also transfer control out of the body holding them, 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":"Atria/Atria/AtriaColdSessionStore.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"92edc7845a14bdea9af46a86083a0152aee6ddc3c78d82fb8da5deaa4be8027b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaGraphGrammar.swift:711-717 | Atria/Atria/AtriaGraphGrammar.swift:720-726 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"80237a5b7127b201ae6d54d4cde447a27933696dbd47e1ec85de1c8552688a8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHealthScreen.swift:2484-2490 | Atria/Atria/AtriaVitalsCollectionSections.swift:1963-1969 \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 \u0060Atria/Atria/AtriaHealthScreen.swift:2484\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2484}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9f17bd13942f28ffb988fd402e64fbbb1ae5cf3bc5906944045cfb23a2ce4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:509-515 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:269-274 \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 \u0060Atria/Atria/AtriaHistoricalActivityProjection.swift:509\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. 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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"216b590723c2c1384148ae8b9741f4b520d09bac5cae7cfaa78e54d266fc255b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:603-610 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:984-990 \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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bf42aa06b78c7ca74c31ed4c57abbb988c1053c53abfbcc8222a49dabca0756"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1235-1241 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1255-1261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1235\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060property\u0060 to \u0060String = identityObservedAtProperty\u0060 in one and \u0060String = identityProperty\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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"1326e8ddc2532e143b749337d921b7c612fd14974062b06c5329b4e38c56c3d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:740-746 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:755-761 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"6857d985b3bec5578a9dcd3e96a8d3b7c481a451a981222e7b42a563a924ef86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:451-457 | Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:465-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. 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":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"44865034467a8a26a388834220ae0360675a5f4c420b28ceb18065351b30108e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:4100-4106 | Atria/Atria/AtriaHomeView.swift:4139-4145 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":4100}}}],"partialFingerprints":{"codehealthFindingId/v1":"8023a5f8a09882931b0c505180f46f3e1a125c6f033894a3eb872cf4f18077d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaLiveWorkoutView.swift:3736-3742 | Atria/Atria/AtriaLiveWorkoutView.swift:4090-4096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaLiveWorkoutView.swift:3736\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":3736}}}],"partialFingerprints":{"codehealthFindingId/v1":"330c190455603dcd7752cdef136a3a51ff7da0cf887b7a491f9d9e984efd0a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaManualSleepSheet.swift:628-634 | Atria/Atria/AtriaVitalsCollectionSections.swift:2727-2733 \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 \u0060Atria/Atria/AtriaManualSleepSheet.swift:628\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf87f7d5e573609f85c817b5b4b77e424091f6ef6882e9cced3b69334dbbce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaManualSleepSheet.swift:679-685 | Atria/Atria/AtriaVitalsCollectionSections.swift:5374-5380 \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 \u0060Atria/Atria/AtriaManualSleepSheet.swift:679\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaManualSleepSheet.swift"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5f4521a3359ad6bab26463da5c63c18b43757f60bd51cd656eab4691fb8e0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1817-1823 | Atria/Atria/AtriaOverviewSections.swift:2541-2547 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"71cb51706cbb6030e3274e1d6f332b36a494c209ce22a1126d1ca7e754d40b3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9195-9203 | Atria/Atria/AtriaOverviewSections.swift:9204-9212 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9195}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c0343a2164387bec69d9117721b4d5034b9ac0b84e4ace101d4a7a5a66492bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaR10Motion.swift:101-107 | Atria/Atria/AtriaStrapCalibrationArchive.swift:196-202 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaStrapCalibrationArchive.swift:205\u0060 calls \u0060crc32\u0060 and \u0060Atria/Atria/AtriaR10Motion.swift:108\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4538c341ad209ad0daa56b8bf22dc5ed819737db5e904d3a496dfdd4731051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaRecoveredHeartRateProjection.swift:211-217 | Atria/Atria/AtriaRecoveredHeartRateProjection.swift:222-228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaRecoveredHeartRateProjection.swift:211\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaRecoveredHeartRateProjection.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb81b8b1faa37d09bf19eab78847f1f2f15982343c82cdba729d7898b428e4fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaSensorReferenceCapture.swift:171-177 | Atria/Atria/AtriaStepCalibrationPlan.swift:88-95 \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 \u0060Atria/Atria/AtriaSensorReferenceCapture.swift:171\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSensorReferenceCapture.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"c336fbbec5fc7584df8f53b0e4e5d08fd75303f766c6660bf1e961afe9463d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:945-951 | Atria/Atria/AtriaShareCard.swift:1573-1579 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:945\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"747a1578fc872e34fa91c242391aa587b9c48a7bdfa86ee6e02d5cec782ac331"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaStressMonitor.swift:2475-2481 | Atria/Atria/AtriaStressMonitor.swift:2507-2513 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaStressMonitor.swift:2475\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":2475}}}],"partialFingerprints":{"codehealthFindingId/v1":"5305bc99cfa469eca1829aa9643099075086c7a19923d0a8ed1930b0ce6a7d6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaTodayScreen.swift:57-62 | Atria/Atria/Sessions.swift:10341-10347 \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 \u0060Atria/Atria/AtriaTodayScreen.swift:57\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"910cd0a7a0c320866545e96136fd0403df4363194916eb185b4521bfc71d7e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:2000-2006 | Atria/Atria/HistoricalArchive.swift:3638-3643 \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 \u0060Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift:2000\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f63dac0719dd54befe9953391049479c1143a963e1d9b72455289a5d450c7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:9409-9417 | Atria/Atria/HistoricalArchive.swift:9431-9439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/HistoricalArchive.swift:9409\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9409}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d6fd99888067ab4bc5b07710cc3ea8a40c02ddd3f20e5147e69df04e9059ff2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:7239-7245 | Atria/Atria/Sessions.swift:56222-56228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7239}}}],"partialFingerprints":{"codehealthFindingId/v1":"e60414441fc3ab7c927af9ee849389e9238e41aedf1bd96b4ff4e69266b66911"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:22074-22080 | Atria/Atria/Sessions.swift:49052-49058 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22074}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d37f2e77ece1fbe070f3033fe0792c607aa1f480de033954af8154f58aee01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:22800-22806 | Atria/Atria/Sessions.swift:23069-23075 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:22800\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22800}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49c953305669a8b1f8819c4a54b3e37326261d4afe8e3b58ec76d641aa48fb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/Sessions.swift:23993-23998 | Atria/Atria/Sessions.swift:24074-24080 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23993}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95df5a24eeaed239db3ca45c47d8166fdedf9f5cb20e11efb16519bc875ae23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:26916-26922 | Atria/Atria/Sessions.swift:27059-27065 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":26916}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5f4f390e564411d58eeb0bbf7cab361efeedf44cf7ac0b0bcded98edbd3d90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:29995-30001 | Atria/Atria/Sessions.swift:30006-30012 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:29995\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":29995}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d61d44cfd1e79cc49da67449b5057eee27333046da6cea4e03c12ee36e6207"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:35795-35801 | Atria/Atria/Sessions.swift:36108-36114 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":35795}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a79d3113b2c14cf5b44d812ff02bc8d6de9b8100e6bffc302cd01cb5fbc5dcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:37384-37394 | Atria/Atria/Sessions.swift:37647-37653 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":37384}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f7edb25278b2288e782ae264d4cccecbc190c603238b2d64870cf9523d0d87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:47941-47947 | Atria/Atria/Sessions.swift:48600-48606 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:47941\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47941}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8785cbed89bbb8b3c93c014fddfc233ee9acbd02d71251b2370de545099988d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:51831-51837 | Atria/Atria/Sessions.swift:51930-51936 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:51831\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":51831}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca6b1fc325a39878cff960d616a057880633f255a4ea18db2683147b0d445511"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Atria/Atria/Sessions.swift:52784-52790 | Atria/Atria/Sessions.swift:52819-52824 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":52784}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6710a6f3df66a6131d6fb61983195be599b48477150ac488951fd6c9b41348b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/Sessions.swift:60931-60937 | Atria/Atria/Sessions.swift:61161-61171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:60931\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60931}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a5fff44bf36514f99d86fd01bd1ffd1fc942c1a2d4d04bd4fab5f692f4712e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): Atria/Atria/Sessions.swift:2424-2430 | Atria/Atria/Sessions.swift:2456-2462 | Atria/Atria/Sessions.swift:2568-2574 | Atria/Atria/Sessions.swift:2774-2780 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":2424}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae3840a3bf7ade6280d96ea70048e821845b1bdfd2b95f68e531844ee586734"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaActivityMonitor.swift:5363-5368 | Atria/Atria/AtriaStressDetailView.swift:1460-1465 | Atria/Atria/AtriaVitalsCollectionSections.swift:3253-3258 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":5363}}}],"partialFingerprints":{"codehealthFindingId/v1":"1742d60abdc85913600910dafb407cc6b1bcedfe00559fa14ee62249deef7a6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaBLEManager.swift:25430-25435 | Atria/Atria/AtriaBLEManager.swift:25653-25658 | Atria/Atria/AtriaBLEManager.swift:26538-26543 \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 \u0060Atria/Atria/AtriaBLEManager.swift:25430\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaBLEManager.swift:25428\u0060 calls \u0060set\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:25651\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25430}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc49377488a84fad3a1a8daf1a7d2d9f73ee7a5e9b866d2c3fc1b5272d01e8e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:1379-1384 | Atria/Atria/AtriaHistoricalGapLedger.swift:1478-1483 | Atria/Atria/AtriaWhoop4ExactRangeTrialHarness.swift:1165-1174 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e9bee2c050188ab6f2fb75fb6f395ce7421ae7f70f3682b8b524bb5bd497ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaLiveActivityLockPreview.swift:67-72 | Atria/AtriaWidget/AtriaWidget.swift:2273-2278 | Atria/AtriaWidget/AtriaWidget.swift:3224-3229 \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 \u0060Atria/Atria/AtriaLiveActivityLockPreview.swift:67\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLiveActivityLockPreview.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0367e6493ecc9d36fcc22300ae895110e69da39b91c87cf58165233ae38b08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaStressDetailView.swift:1556-1561 | Atria/Atria/AtriaStressDetailView.swift:1815-1820 | Atria/Atria/AtriaVitalsCollectionSections.swift:3327-3332 \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 \u0060Atria/Atria/AtriaStressDetailView.swift:1556\u0060 it begins part-way through the construct above it, so those exact 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, \u0060Atria/Atria/AtriaVitalsCollectionSections.swift:3325\u0060 calls \u0060atriaGraphPlotSurface\u0060 and \u0060Atria/Atria/AtriaStressDetailView.swift:1554\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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1556}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91c03929dc0c35c84e780e602e3687dae214360a1da0dd3bbc37f0cf0b4ec4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/Sessions.swift:13032-13037 | Atria/Atria/Sessions.swift:13062-13067 | Atria/Atria/Sessions.swift:13166-13171 \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 \u0060Atria/Atria/Sessions.swift:13032\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13032}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba0394247b46ce73e17c9414acbe75e53850e3d182e3521c8138722a66aae33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/ActiveSessionJournal.swift:1028-1033 | Atria/Atria/AtriaBLEManager.swift:52582-52587 \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 \u0060Atria/Atria/ActiveSessionJournal.swift:1028\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc11569ffb36ecbb9b3d4e8847013e6248d48cc39324f052eb3e41ec89f3a0e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaAICoach.swift:238-247 | Atria/Atria/AtriaAICoach.swift:250-259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d6c607535570e6afd23c3d475628d076238f75d00935ff47b3030ef5d275967"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:3441-3446 | Atria/Atria/AtriaActivityMonitor.swift:4835-4840 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":3441}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa9cd64705db9d0168d3a72e1b1bd9644798aef5d5559823edf75596587666eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:30803-30808 | Atria/Atria/Sessions.swift:54998-55003 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30803}}}],"partialFingerprints":{"codehealthFindingId/v1":"553498e416d5192c34388e1d36dd7a38759e36321610de4411aaace73030e3f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:34272-34277 | Atria/Atria/AtriaBLEManager.swift:34655-34660 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:34272\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":34272}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe2f1359d4693bd475cb71c08a6de2e68ea239a3bfa7cab22aa98cba968143f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:50864-50871 | Atria/Atria/Sessions.swift:62389-62396 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060targetCount\u0060 to \u0060Int = 18\u0060 in one and \u0060Int = 320\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":50864}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb75f15418267c5d69c42baceb2023e712fc0b21e48a395eb98a2406be6213f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBehaviorImpactPresentation.swift:288-293 | Atria/Atria/AtriaJournalInsights.swift:175-180 \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":"Atria/Atria/AtriaBehaviorImpactPresentation.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"4225d4c62e935c420f283bae2d95b59ce72bb616c67f774229b97c3bf803aa59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaExpandedChart.swift:31-36 | Atria/Atria/AtriaVitalsCollectionSections.swift:209-214 \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 \u0060Atria/Atria/AtriaExpandedChart.swift:31\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":"Atria/Atria/AtriaExpandedChart.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ea0be39502f562c061ee7a9df7d918ca7b406f8e246c006d58e008ec25f1839"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaGraphGrammar.swift:762-767 | Atria/Atria/AtriaOverviewSections.swift:9059-9064 \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 \u0060Atria/Atria/AtriaGraphGrammar.swift:762\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060calendar\u0060 to \u0060Calendar = .current\u0060 in one and \u0060Calendar\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":"Atria/Atria/AtriaGraphGrammar.swift"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ed3d83b6a441d5daee1dbe4104ff975d537fb129412da80e6daf08e376cab4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:174-179 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:257-262 \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 \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:174\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b730f44366182df09378344be6eeae80062b970cbfe8df2de72dc0fb68a3ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1054-1059 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2239-2244 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"38be3aa68aadc5ce98991d08207de9ec6c5cd4d35d86c6c0e6d12a021e89c3be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:260-265 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:167-172 \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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e91ea0bf512a48b0f305e33387ab3af4a9fc39ae62d9b3bc546f2e3946830e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:169-174 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:231-237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:169\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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"76bb5401f4312c81fa7ffb4edbbc8a49feef69204aae5d47835ede29d3e4a084"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:352-357 | Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:443-448 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e97237dbc49b2e4ef7a919c24dd870515af48d3420dc1596588a8eb1c76919f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:604-612 | Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:667-672 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift:604\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoverageStore.swift"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"347ac91ab6428c5d2096c0b545c0faf2acb927e132927b0e5c69ef5bae2b1e8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:389-394 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:563-568 \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 \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:389\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"00f289e4e00ea74301d3a9dca537dc7251d1705bfbf4b41143633e1ac596560c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:614-619 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:626-631 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060bindings\u0060 to \u0060[Binding] = []\u0060 in one and \u0060[Binding]\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":"Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd699f16369f3cb1de768d0584b023fbf847e9c04c3e6dc83190bd44945e1a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalShadowCompactionCoordinator.swift:99-104 | Atria/Atria/HistoricalArchive.swift:9964-9969 \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 \u0060Atria/Atria/AtriaHistoricalShadowCompactionCoordinator.swift:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalShadowCompactionCoordinator.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d0195d2644c659b46668a7f216d56443185a303b3ec070cba372a9a07b1298"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaLearnedInsightsBoard.swift:268-273 | Atria/Atria/AtriaOverviewSections.swift:10445-10450 \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 \u0060Atria/Atria/AtriaLearnedInsightsBoard.swift:268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaLearnedInsightsBoard.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ce864321d16c57d8c329400eb2e75fa1771e9887a819f4047e732a569f8155"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaLiveWorkoutView.swift:1934-1939 | Atria/Atria/AtriaLiveWorkoutView.swift:1970-1975 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaLiveWorkoutView.swift:1934\u0060 it does not close everything it opens, so those exact 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 \u00604\u0060 in one and \u006012\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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1934}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ba69d522c03eaa69af2124e73e9c93ee913479890ca37b4a7e456611513ac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaNightTimelineView.swift:328-333 | Atria/Atria/HRV.swift:610-615 \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 \u0060Atria/Atria/AtriaNightTimelineView.swift:328\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":"Atria/Atria/AtriaNightTimelineView.swift"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe6fcddf892137347a44a2517d0aa19636978567544e560358c9c2a68eb36e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaPhysiologicalStressModel.swift:667-672 | Atria/Atria/AtriaStressMonitor.swift:3328-3333 \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":"Atria/Atria/AtriaPhysiologicalStressModel.swift"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"541544e2b33fe0a853f1e527917ddb56b57f4b9a6c683be401932e482a1fdacb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaSharedChrome.swift:150-155 | Atria/Atria/AtriaSharedChrome.swift:213-218 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaSharedChrome.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc34e219400c45f032b92ec45c1c1a6e17b85a6ff8b22018fa3e677846dc365"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaSleepBudget.swift:244-251 | Atria/Atria/AtriaSleepBudget.swift:337-344 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaSleepBudget.swift:244\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":"Atria/Atria/AtriaSleepBudget.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"335005a77c51c68a15ebcfdd5a19fb3757015410f0961503852a598d07144868"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaSleepHypnogram.swift:936-941 | Atria/Atria/AtriaVitalsCollectionSections.swift:5212-5217 \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 \u0060Atria/Atria/AtriaSleepHypnogram.swift:936\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"9552a526baa13ef05c6bcda9f9115d3173a8c66d481156477d0068397fcfb97a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Atria/Atria/AtriaStressDetailView.swift:1442-1458 | Atria/Atria/AtriaStressDetailView.swift:1764-1780 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaStressDetailView.swift:1442\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0264ed9ea1db64c7e6d0dc8987ce47cc928a973c1427169622785cb3e22239"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaTrendChart.swift:939-944 | Atria/Atria/AtriaTrendChart.swift:1308-1313 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaTrendChart.swift:939\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7615436897ac69f2fca3337b5825631acf8da1e6688c908d1cc6375a616af9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:7346-7351 | Atria/Atria/HistoricalArchive.swift:7425-7430 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7346}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb19825247e85f26bdceb283566ee56b2ce00e221378e8d3db85f61976f5034d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/Sessions.swift:22390-22395 | Atria/Atria/Sessions.swift:22512-22521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":22390}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d819aa8989d7f110f9d60147427a7d12a7769b6643cc7c89939b775d8cba09c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/Sessions.swift:30091-30096 | Atria/Atria/Sessions.swift:30114-30119 | Atria/Atria/Sessions.swift:30128-30133 \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 \u0060Atria/Atria/Sessions.swift:30091\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":30091}}}],"partialFingerprints":{"codehealthFindingId/v1":"3853713cad7151feb4840dc59c8a2b1db3a8bda4b6c0937d7d8901de46191c48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): Atria/Atria/Sessions.swift:51349-51353 | Atria/Atria/Sessions.swift:51361-51366 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:51361\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51349}}}],"partialFingerprints":{"codehealthFindingId/v1":"d48772ecd8076a063c6c682af4fc97f8a35f4584c29687515caf59b2538e56f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/Sessions.swift:51412-51417 | Atria/Atria/Sessions.swift:51556-51562 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:51412\u0060 it does not close everything it opens, so those exact 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51412}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cbd0b2908c004beacf3577282c63f91e36a752a3c7d41d1b6f198a30041cb53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/Sessions.swift:54196-54203 | Atria/Atria/Sessions.swift:54637-54644 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:54196\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":54196}}}],"partialFingerprints":{"codehealthFindingId/v1":"019202d19a4059b0780ff07be6349a0118c68f78a4dc809d7a80c08f4f4d6a73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/Sessions.swift:60631-60636 | Atria/Atria/Sessions.swift:60644-60649 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:60631\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":60631}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2daa57b34e39fbfeacf543ffadc7f0e67fba3739249dfd7d17029db0841f615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): Atria/Atria/AtriaBLEManager.swift:25429-25434 | Atria/Atria/AtriaBLEManager.swift:25652-25657 | Atria/Atria/AtriaBLEManager.swift:26537-26542 | Atria/Atria/AtriaBLEManager.swift:26877-26882 | Atria/Atria/AtriaBLEManager.swift:26943-26948 | Atria/Atria/AtriaBLEManager.swift:30744-30749 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:25429\u0060 it does not close everything it opens, so those exact 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, \u0060Atria/Atria/AtriaBLEManager.swift:25428\u0060 calls \u0060set\u0060 and \u0060Atria/Atria/AtriaBLEManager.swift:25651\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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25429}}}],"partialFingerprints":{"codehealthFindingId/v1":"d92b2652f69c2568313bdea414bd3688af4d65961f8b89e58d43619e65ba5555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:481-485 | Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift:345-349 | Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift:383-387 | Atria/Atria/AtriaHistoricalReplayPayloadCompaction.swift:162-166 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b612042aaaba2b041ff3e5eb380e11b1bcb62dcb0e1c07aeea302818460116f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Atria/Atria/AtriaStrainRecoveryComboChart.swift:182-186 | Atria/Atria/AtriaStressDetailView.swift:1557-1561 | Atria/Atria/AtriaStressDetailView.swift:1816-1820 | Atria/Atria/AtriaVitalsCollectionSections.swift:3328-3332 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaStrainRecoveryComboChart.swift:182\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaStressDetailView.swift:1556\u0060 calls \u0060chartXScale\u0060 and \u0060Atria/Atria/AtriaStrainRecoveryComboChart.swift:181\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":"Atria/Atria/AtriaStrainRecoveryComboChart.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"541dd20e4a08d95e79dda504939e0688d4355df412527a6941f6f1eef04cac4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaColdSessionMigration.swift:123-128 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:353-358 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:535-540 \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 \u0060Atria/Atria/AtriaColdSessionMigration.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":"Atria/Atria/AtriaColdSessionMigration.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd4a4e598e0c5a2145d451d9e591d9d5770620821f49ef99e59a60828aa39d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaHealthScreen.swift:1847-1851 | Atria/Atria/AtriaHealthScreen.swift:1858-1862 | Atria/Atria/AtriaVitalsCollectionSections.swift:1411-1415 \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. 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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2b120a26c23a2f72eaafe8e42b01af6ae64950613b3c3bae51c13028742f743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:389-393 | Atria/Atria/AtriaHistoricalRetiredReplayIndex.swift:563-567 | Atria/Atria/AtriaStrapCalibrationArchive.swift:700-704 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift:389\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalLiveIdentityLookup.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba033226c69b186dca18198bdf38f3d1c4d805c2ddd2e94f80e6bbaa7da51759"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaHistorySection.swift:954-958 | Atria/Atria/AtriaHomeView.swift:4100-4106 | Atria/Atria/AtriaHomeView.swift:4139-4145 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb0b0f9b65f6f930c09aeb9e7b94109e99031ba6ae94e1c0345b6ee526aa960"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/AtriaNightTimelineView.swift:326-332 | Atria/Atria/AtriaStressDetailView.swift:1707-1713 | Atria/Atria/HRV.swift:608-614 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaNightTimelineView.swift:326\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaNightTimelineView.swift:323\u0060 calls \u0060chartXScale\u0060, \u0060chartYScale\u0060, \u0060chartXAxis\u0060 and \u0060Atria/Atria/HRV.swift:607\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":"Atria/Atria/AtriaNightTimelineView.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"44bbe3f468d7218c663f9e8456f24c7486854656f6a0b082a697926568f491f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaOverviewSections.swift:217-221 | Atria/Atria/AtriaOverviewSections.swift:9856-9860 | Atria/Atria/Sessions.swift:59117-59121 \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 \u0060Atria/Atria/AtriaOverviewSections.swift:217\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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ba3bd81c3b575ff6052d77f896b6e43f7b63c9a1c004c8b7e7139e47118d756"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaR10Motion.swift:100-104 | Atria/Atria/AtriaStrapCalibrationArchive.swift:177-181 | Atria/Atria/AtriaStrapCalibrationArchive.swift:195-199 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"707ba60ec47cf21d54750931dc82d4b70906e9caea483fbacc3ce7e67a75776b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/HRV.swift:555-559 | Atria/Atria/Sessions.swift:32436-32440 | Atria/Atria/Sessions.swift:54844-54848 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HRV.swift"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"df47281d7f2d3cd4f24bc93dc2155afdc3b70bde88ca8108ef875ea134c14f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:1528-1533 | Atria/Atria/AtriaStressMonitor.swift:2428-2433 \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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":1528}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da8c5b6b112a4eb1353131675a2eb2fce59d717a71f11dc3ac2de406460ac06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:24794-24798 | Atria/Atria/AtriaBLEManager.swift:24843-24847 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:24794\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24794}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3b7954b5e8f53ff6e0c5deb06d284f11ecc9eee2475c8acf74f802081b6620"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:26720-26725 | Atria/Atria/Sessions.swift:56313-56318 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26720}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32dde2e17b1d75ad933965b7177b5634b767fd3507db98a9771ae7ae15b352c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:26727-26732 | Atria/Atria/Sessions.swift:56320-56325 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":26727}}}],"partialFingerprints":{"codehealthFindingId/v1":"d715a7eed6d552139a7f364ba19f78a89a2cd372f7dc4831ccedc500f86bdedd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaDeviceUseJournal.swift:190-194 | Atria/Atria/AtriaWhoop4MotionBankCoverageLedger.swift:954-960 \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 \u0060Atria/Atria/AtriaDeviceUseJournal.swift:190\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":"Atria/Atria/AtriaDeviceUseJournal.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"471dea90219edaa9b9ba9ebadb148dea13f845d45d7c8f24486cdb915ce8f810"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHealthScreen.swift:2754-2761 | Atria/Atria/AtriaHealthScreen.swift:2804-2808 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHealthScreen.swift:2754\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2754}}}],"partialFingerprints":{"codehealthFindingId/v1":"e170fbf4bf56ff47ae5416bf36782be4556290a874cd49af59d5db0d42ea34f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHealthScreen.swift:2818-2822 | Atria/Atria/AtriaStrapScreen.swift:467-471 \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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":2818}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc3e52f3a607bfb43ea2ad646f28b6e041454be7e49a12ef6d172965cb83266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHeroConnectionSections.swift:973-977 | Atria/Atria/AtriaHeroConnectionSections.swift:980-984 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":973}}}],"partialFingerprints":{"codehealthFindingId/v1":"646d2e66efad772bde655f5ce866ae85ad2de203883746db12c489a0e1fe89bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift:454-459 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:489-494 \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 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":"Atria/Atria/AtriaHistoricalSealedJSONLCompression.swift"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0afc3bd97b4bc77e8883fce5e6496d2d49c4bb9965cb3d7c4521e0e5fab74a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:6450-6455 | Atria/Atria/AtriaHomeView.swift:8107-8112 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6450}}}],"partialFingerprints":{"codehealthFindingId/v1":"58936eb46f40d593071a48beaa46c5d04651938c714000349bc5c203cdb11d9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:13079-13084 | Atria/Atria/WidgetSnapshot.swift:2123-2128 \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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13079}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2e6feb584b037c59c4fe9887cb69bc052445d0fe6777fbee8aab7268596d3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1307-1312 | Atria/Atria/AtriaVitalsCollectionSections.swift:286-291 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"16adfa423856c8c08b0638ac557c6ead713f380793b5a1579d0cd7738d0e1f6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3575-3582 | Atria/Atria/AtriaSettingsView.swift:2053-2060 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3575}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29287dc6cf38dd1af94227ac6f0c321c1ccef4fb2c6a6ef1c14041c7ff9451e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaShareCard.swift:497-504 | Atria/Atria/AtriaShareCard.swift:508-515 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaShareCard.swift:497\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaShareCard.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d00a6d52fc4e5633e4a070bd92897d43b3dd5bb496a4bc33bf22152cfc691a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaSleepHypnogram.swift:132-137 | Atria/Atria/AtriaSmartWakeView.swift:55-60 \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 \u0060Atria/Atria/AtriaSleepHypnogram.swift:132\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":"Atria/Atria/AtriaSleepHypnogram.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"5413ca015ec95c6c4d16a341b8a831bfe68a205ef18bbd5052ce56428a72f53f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaStrapCalibrationArchive.swift:186-190 | Atria/Atria/AtriaStrapCalibrationArchive.swift:205-209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"38f73551562544cf651bc2b97e42a6e4a8ad7f9bac5966e90bc8065968028c1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaTodayScreen.swift:4829-4836 | Atria/Atria/AtriaTodayScreen.swift:4923-4930 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaTodayScreen.swift:4829\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":4829}}}],"partialFingerprints":{"codehealthFindingId/v1":"255669a66e46477f2cfa177d8ea499d435688206c6f91e951f40f0ed6d4c0bce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistoryMetadata.swift:63-68 | Atria/Atria/AtriaWhoop4HistoryResearchProtocol.swift:234-239 \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":"Atria/Atria/AtriaWhoop4HistoryMetadata.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb6f04e2625ed8e74b73ba1387a1004a1e1a8f78fd0d06ada3e92e0c44fb752"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/HRV.swift:365-370 | Atria/Atria/Sessions.swift:2024-2028 \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 \u0060Atria/Atria/HRV.swift:365\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/HRV.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"88af053a35532fcde6f7f7b810dbf779f16d3d3388d26a2de7bef4cdc36e7e3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 7): Atria/Atria/AtriaEventNotificationScheduler.swift:318-323 | Atria/Atria/AtriaStrainPacing.swift:19-21 | Atria/Atria/LocalNotificationScheduler.swift:2388-2392 | Atria/Atria/Sessions.swift:3396-3401 | Atria/Atria/Sessions.swift:14523-14527 | Atria/Atria/WidgetSnapshot.swift:1466-1474 | Atria/AtriaWidget/AtriaWidget.swift:112-119 \u2014 there are 7 copies across 6 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/LocalNotificationScheduler.swift:2388\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/AtriaEventNotificationScheduler.swift"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"143b4c922798ceeb353b179cf2fa400911de331691156af7c3be3841cdae6f87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/Sessions.swift:7211-7216 | Atria/Atria/Sessions.swift:55969-55974 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:7211\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7211}}}],"partialFingerprints":{"codehealthFindingId/v1":"733991a4cfd119dfa482041196619c1d5fa02d292e2eec0cb1bea782e23ac1f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:7812-7816 | Atria/Atria/Sessions.swift:7910-7916 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7812}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c06cd0ed8f37b2859007253c176d2cd1c0e38f4b48ea68905ab722ac799a6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:7883-7887 | Atria/Atria/Sessions.swift:7981-7991 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:7883\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":7883}}}],"partialFingerprints":{"codehealthFindingId/v1":"a25ff7cce032d3fffd98eed413c80c0eab9de206cbe90ede45de721a5f5d8825"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:21356-21360 | Atria/Atria/Sessions.swift:21397-21402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:21356\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":21356}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eeacff35f9ade9cf822e79c1b23bcf18dea7ae380001ea2ada6b8540afedc75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:23373-23377 | Atria/Atria/Sessions.swift:23791-23795 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":23373}}}],"partialFingerprints":{"codehealthFindingId/v1":"462859be53765d390cf80fa1da9c68ea1c05b7a873d5d3da33738c82923a6d07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:33962-33968 | Atria/Atria/Sessions.swift:35055-35059 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:33962\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":33962}}}],"partialFingerprints":{"codehealthFindingId/v1":"a90bc161f295571e9dd16b2e25e8ad7c8c1501cf77c3ab474b2b137c3216b6ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:54707-54711 | Atria/Atria/Sessions.swift:54736-54740 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:54707\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":54707}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fefa96e8e8bbc92b299305201c028f463425a31fdb37f542b60cb5ee242ed19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:55280-55284 | Atria/Atria/Sessions.swift:55285-55289 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":55280}}}],"partialFingerprints":{"codehealthFindingId/v1":"7984eef2efce6f284a68b458c3e89c0fead1f87de5255f18fcf30eae0502d2b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): Atria/Atria/AtriaGlanceSettings.swift:24-93 | Atria/AtriaWidget/AtriaGlanceSettings.swift:24-93 \u2014 \u0060Atria/Atria/AtriaGlanceSettings.swift\u0060 and \u0060Atria/AtriaWidget/AtriaGlanceSettings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 1 separate duplicated blocks between them, totalling at least 70 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaGlanceSettings.swift:24\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":"Atria/Atria/AtriaGlanceSettings.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"06917f2652f1defe96d48757254db23c5c2a450156648105060c1f23f6bf685f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:347-351 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:387-391 | Atria/Atria/AtriaHistoricalDailyConsumerProjection.swift:982-986 | Atria/Atria/AtriaHistoricalGapLedger.swift:1453-1457 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"1147deb5c2adec8b0556b4bf9081547dc9e3a08ca8b8129a56a5e827a32c078c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:103-109 | Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:19-23 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:66-72 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7156c1cfed9614dab2303df8c060f6e985ff0f0cfa337c80a8c1e9f3924aa83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:31932-31939 | Atria/Atria/AtriaBLEReadOnlyHistoryCapture.swift:141-148 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":31932}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfcdbd7f5949b694821ec6853c61850d947f4f1873f27494c78e0dbbba5d45c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): Atria/Atria/AtriaColdSessionFacts.swift:354-358 | Atria/Atria/AtriaColdSessionStore.swift:383-387 | Atria/Atria/AtriaFullFidelityColdSessionStore.swift:925-929 | Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:425-430 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:462-466 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:117-121 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:470\u0060 calls \u0060contains\u0060 and \u0060Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:434\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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ad8e7ee02cd6062c0132adeb81803f0461d22c1a75210f465dc91e48a8a825"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaDiagnosisReport.swift:132-136 | Atria/Atria/AtriaOverviewSections.swift:3947-3951 | Atria/Atria/AtriaOverviewSections.swift:3983-3987 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d716c262e1adb047281f45eb08d86a196497432f8da8d701091fc7f3a4cf09e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:847-852 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:374-379 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift\u0060 and \u0060Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f894346866a83bb9d4b465d69ed1788ba404f9d589fc09206dab9f851ba3ef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHistoricalActivityProjection.swift:350-354 | Atria/Atria/AtriaHistoricalSleepWorkoutProjections.swift:30-34 \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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"9734e1cf93f9bb68e196b0850b83b9ab6e8a77e2141c43d0df4f0f0f8e49721e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalAggregateReader.swift:834-839 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:645-650 \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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"3188281e6f241abe58485c819fb3fe520037ad1f06544bf85cb3e955adc46821"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift:408-413 | Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:445-450 \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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad6b17359249611d118e16d9bcba649d2dad5750ea7444a307302b93ce5835d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:136-142 | Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:179-185 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.swift:177\u0060 calls \u0060NSLock\u0060 and \u0060Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:134\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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"895139454c958c03d33d8f3798c89c46c57f0323c2c9287c10105e208024f7b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaHistorySection.swift:909-917 | Atria/Atria/AtriaVitalsCollectionSections.swift:927-935 \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":"Atria/Atria/AtriaHistorySection.swift"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b8aee82e2937116577ae427e3fc7c9ed75ac20a4da96dd46c10e6d88f4a957"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaMonthlyReport.swift:194-198 | Atria/Atria/AtriaWeeklyReport.swift:167-171 \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":"Atria/Atria/AtriaMonthlyReport.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd56eece21531b804e430fffb426ccb54d844b98a45ccd51c5c08090a53e9bcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaOnboardingFlow.swift:846-852 | Atria/Atria/AtriaSettingsView.swift:1396-1402 \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":"Atria/Atria/AtriaOnboardingFlow.swift"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e46ac90d6b2b82667502371188fd66d991a8efc3fddad5ec8164525119ba00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:346-355 | Atria/Atria/Sessions.swift:59218-59227 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6040f165070dcbdc26ad8b0049b8f44bcad2144980d2df0f124d9da7fac8943"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1595-1601 | Atria/Atria/AtriaTodayScreen.swift:4688-4694 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1595}}}],"partialFingerprints":{"codehealthFindingId/v1":"413ed136977bf9af270e3f4bc1a3bc77554ec24c503c43dc302069ae716d22b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1603-1609 | Atria/Atria/AtriaTodayScreen.swift:4696-4702 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1603}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae97e874a6f61eb3ff398f88a590ee90bfdd9247d28dd6751310f7cd71c88a30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:3689-3697 | Atria/Atria/AtriaVitalsCollectionSections.swift:5101-5109 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":3689}}}],"partialFingerprints":{"codehealthFindingId/v1":"20a0f40aad328e85ab1a9a4458380ac3440359713095bc40f05ec7d9f293b8a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:9570-9574 | Atria/Atria/AtriaSmartWakeView.swift:130-134 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":9570}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c15aea3e56d78798c60469e06178b0ba688b05672bd6edede9fe6663e79d7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaR10Motion.swift:1398-1403 | Atria/Atria/AtriaStrapStepLedger.swift:404-409 \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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac4efd8220392dda10cbe0d74a371cbb60b5147e9918e9626e5d9fea3eaaaa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaRoutineCard.swift:240-244 | Atria/Atria/AtriaWeeklyPlan.swift:145-149 \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":"Atria/Atria/AtriaRoutineCard.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"98072f01fede32ebc1bc9b6a2f905585aad8b73e6a67605940a2d4a2aa11afb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistoryACKGate.swift:123-127 | Atria/Atria/AtriaWhoop4HistoryReadPreflightGate.swift:95-99 \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":"Atria/Atria/AtriaWhoop4HistoryACKGate.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ba90187fd6bfad1131d1aeafe6f1f8c95383599f4df90d7159276912be5c01e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:102-106 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:611-615 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"30398aeef0c3feee2f2e6f65134851fb04571a0750073c3fe9458b7203375a1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:675-681 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:279-283 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"277d96c52b8df515d3b91367096da227397db60ef722e1c18304785fa1b69aa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift:683-689 | Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift:285-289 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4SacrificialHistoryTrimReceiptVerifier.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4SacrificialFastDrainReceiptVerifier.swift"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52709337cfbada1822c259475cca15c77daa81167a2df47dc24b1498e9a945f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Atria/Atria/ActiveSessionJournal.swift:66-72 | Atria/Atria/AtriaBreathworkSession.swift:97-103 | Atria/Atria/Sessions.swift:1565-1571 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060t\u0060 to \u0060Date\u0060 in one and \u0060Double\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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a24c16665d0e0c9f2d59102ebdc39e42547c55cb83f94c30d2caa39c097e92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaAICoach.swift:38-44 | Atria/Atria/AtriaHapticAlerts.swift:46-52 \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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"f50bc9bb137c1f20925fcf75d856e4f30e12e63b4f0fa6e810acfcbee627dc1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaCustomizeSheet.swift:488-494 | Atria/Atria/AtriaTodayScreen.swift:2556-2562 \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":"Atria/Atria/AtriaCustomizeSheet.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae80c2fc7efcb4c3a6ee5e13564e014793681603fcca238900c2d6fbe2c9e3e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaDetectionLog.swift:151-158 | Atria/Atria/AtriaNightInterruptionPrompt.swift:33-40 \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":"Atria/Atria/AtriaDetectionLog.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a51190e243b877de544956e49ed4754bee85f2cdfd39c4f7a2e2fb50e433e4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaEventNotificationScheduler.swift:307-315 | Atria/Atria/LocalNotificationScheduler.swift:2313-2319 \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":"Atria/Atria/AtriaEventNotificationScheduler.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c6468d0fa588d15568b98b56c00b49b6fc4c552da93372411911fd7c12fa326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift:473-478 | Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:716-721 | Atria/Atria/AtriaHistoricalLongTermRollup.swift:987-992 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. 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":"Atria/Atria/AtriaHistoricalCanonicalConsumerDestinationStore.swift"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"1596aa16cfa640bdcffeb634c6980780da719fdda752354401692a2de487884a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift:703-708 | Atria/Atria/AtriaHistoricalReplayPayloadCompaction.swift:144-149 \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":"Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5012ce18efcee11abd901ac044a7c180670bbd5dcf0518a90829da64f70b6e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Atria/Atria/AtriaLearnedInsights.swift:746-755 | Atria/Atria/Sessions.swift:963-970 \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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa86a07196f83f3ec5c92ff4af83b49b42082cdb1576a42bdb4aa567d2aa543"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift:25-29 | Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift:74-84 \u2014 before extracting anything, compare \u0060Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift\u0060 and \u0060Atria/Atria/AtriaWhoop4MotionTickDailyStore.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4HistorySequenceContinuityStore.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"7470f8cc9152fe1138fc7c656c53fd41e305306c3ec73ffab22165d34ad27df7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaActivityMonitor.swift:4556-4561 | Atria/Atria/AtriaHomeView.swift:4515-4520 \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 \u0060Atria/Atria/AtriaActivityMonitor.swift:4556\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4556}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8bb708637e9f61af322476a386d33018ff85d2e6eaef58539e96f0ac60b0a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift:353-358 | Atria/Atria/AtriaBLEHistoryTerminalPublicationStore.swift:393-398 | Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift:292-297 | Atria/Atria/AtriaHistoricalFullScanCompletionStore.swift:351-356 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The 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":"Atria/Atria/AtriaBLEHistoryRequestAuthorityStore.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"00df27a1fb6ecec6db7bd9f2136b7f7b4be1fbf7eb75b5d6637dfc22798ae3e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:24986-24990 | Atria/Atria/AtriaBLEManager.swift:25052-25056 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":24986}}}],"partialFingerprints":{"codehealthFindingId/v1":"68993615a16bd465149503aa7c668a66fbdd48e8060828bee6e6505343325929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25406-25411 | Atria/Atria/AtriaBLEManager.swift:26844-26849 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:25406\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25406}}}],"partialFingerprints":{"codehealthFindingId/v1":"458503cb803a3cd9a47d015a472b33591114d83d9bd44f4e220e1788d93fd88e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:25415-25420 | Atria/Atria/AtriaBLEManager.swift:26864-26869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaBLEManager.swift:25415\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":25415}}}],"partialFingerprints":{"codehealthFindingId/v1":"b344a15d63fca00b7887acc4dc5f50f85d51f3e762eba04fa3f298e1b0374dde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:52804-52808 | Atria/Atria/Sessions.swift:56751-56755 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":52804}}}],"partialFingerprints":{"codehealthFindingId/v1":"694cdcd9aeb0a740da318596aab8fd036b592ae6ad42811b67298cb0ad369917"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:57669-57673 | Atria/Atria/AtriaBLEManager.swift:57745-57749 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57669}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2adc131db0bddba480c4a7180ff9c5b606b35c433cfa315e10fd2b53a16258"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:57682-57686 | Atria/Atria/AtriaBLEManager.swift:57762-57766 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57682}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6c627892effd93ae1fc4061cf1475523381eace52db277bd7f52885fb11cce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaBLEManager.swift:57858-57862 | Atria/Atria/AtriaMotionBankDutyCycleDiag.swift:66-70 \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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":57858}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce82628eeea850d8f5846829083afdc15362737c4318df998ed2ad8ad2eee7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHighlights.swift:46-50 | Atria/Atria/AtriaHighlights.swift:83-87 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHighlights.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b3d1009a1fe7d2f512ff138809871ba6b9797f7552523f48d83dfde0ad038b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:1977-1981 | Atria/Atria/AtriaHistoricalArchiveDurableStore.swift:2030-2034 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1977}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfef0adcb5cdc904bdfdd5745978272206d444b192bd0dad3124c8109dbbea9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:373-377 | Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift:433-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHistoricalFullDrainCoveragePolicy.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58a6725ae20e9d197aab4dcee9a2c9569402554d771e242cc525e16c95446ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/AtriaHomeView.swift:2101-2105 | Atria/Atria/AtriaHomeView.swift:2108-2112 | Atria/Atria/AtriaHomeView.swift:2115-2119 \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. 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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2101}}}],"partialFingerprints":{"codehealthFindingId/v1":"d39987adbe39b54c73dadb612ec142dd82050a5d77e1053a81de769aa2103a61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaHomeView.swift:9118-9122 | Atria/Atria/AtriaHomeView.swift:9126-9130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaHomeView.swift:9118\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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9118}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6ad806d3354562c4a15c348045ba20856558b1368c1b8d687424791784fe46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaIMUDecoder.swift:124-128 | Atria/Atria/AtriaIMUDecoder.swift:147-151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/AtriaIMUDecoder.swift:124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaIMUDecoder.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"d56bede9312be5a10c2804c1fdfaaeca98c5b956b5004b071cfe07c32ce55cb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:1334-1340 | Atria/Atria/AtriaVitalsCollectionSections.swift:294-300 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":1334}}}],"partialFingerprints":{"codehealthFindingId/v1":"c51d3830a6182b9d9e194beb8279363e6dca539d7b7321d872ca0ae851a1de03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/AtriaOverviewSections.swift:8832-8836 | Atria/Atria/AtriaTrendChart.swift:1134-1138 \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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":8832}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5945ca1b0e04e1650cf92ddc3f28b1296e9bca9436425bb315dfa295e081da8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Atria/Atria/HistoricalArchive.swift:3297-3302 | Atria/Atria/HistoricalArchive.swift:3315-3320 \u2014 both copies are in the same file, so extract the block 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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":3297}}}],"partialFingerprints":{"codehealthFindingId/v1":"d814711f529761a80f50043761f7423fb2d55e7683827e1d545179e14788f613"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Atria/Atria/Insights.swift:432-436 | Atria/Atria/Sessions.swift:22711-22715 | Atria/Atria/Sessions.swift:60835-60839 \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 \u0060Atria/Atria/Insights.swift:432\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":"Atria/Atria/Insights.swift"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"1035751fd0da6b464f0e0b7238aa4e89adc6521acbf6babb22b99a397cbc2677"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:8226-8230 | Atria/Atria/Sessions.swift:56692-56696 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8226}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db518080097238ebe8522d88f2b37e17222d0048a0cc4b2ae14a5e12bc2f819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:22844-22848 | Atria/Atria/Sessions.swift:23108-23112 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:22844\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":22844}}}],"partialFingerprints":{"codehealthFindingId/v1":"97162080582deae904aaaea2df15b25a4b538c04d5738f414941d614d32f753f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Atria/Atria/Sessions.swift:50112-50116 | Atria/Atria/Sessions.swift:52300-52304 | Atria/Atria/Sessions.swift:52357-52361 | Atria/Atria/Sessions.swift:53661-53665 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/Sessions.swift"},"region":{"startLine":50112}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26469ce776586bdc7d34c510f189fbf9d6c18469a6dd75e128bf903f44dc5f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/Atria/Sessions.swift:54693-54697 | Atria/Atria/Sessions.swift:54721-54725 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Atria/Atria/Sessions.swift:54693\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":54693}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c10b6fd1f129be08c18cbb91bfa638c8936efe62ce4fd32be6058916f1840e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Atria/AtriaWidget/AtriaWidget.swift:3894-3898 | Atria/AtriaWidget/AtriaWidget.swift:3942-3946 \u2014 both copies are in the same file, so extract the block 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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3894}}}],"partialFingerprints":{"codehealthFindingId/v1":"06a133378f90c46c4436a9aa35595e395179b0c125c0fd2c9aadaa182281bf28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): validate_hrv.py:760-785 | validate_hrv.py:1075-1100 \u2014 both copies are in the same file, so extract the block 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":"validate_hrv.py"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"18819aed6516164af26e29e58d775ac05171693b1740d8f659c45ae6fa97a1c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): validate_hrv.py:810-831 | validate_hrv.py:1025-1046 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060validate_hrv.py:810\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"validate_hrv.py"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c13b4eb8f031888a58a59c7a3af160941d084b2e30069ed6869806abd9cfa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): validate_hrv.py:860-874 | validate_hrv.py:1056-1070 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060validate_hrv.py:860\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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":"validate_hrv.py"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"d48347a82cd63cc31099a979766d962ef676f0be54498178577ba86dbaa2040c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): validate_hrv.py:107-118 | validate_hrv.py:134-145 \u2014 both copies are in the same file, so extract the block 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":"validate_hrv.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0b8c64124563eaae5e30767076bd610e96b23d0b2afe883e0abb9b801aedb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): validate_hrv.py:833-844 | validate_hrv.py:1047-1058 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060validate_hrv.py:847\u0060 calls \u0060join\u0060, \u0060sorted\u0060, \u0060items\u0060 and \u0060validate_hrv.py:1059\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":"validate_hrv.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4428002ce19a68860b650771bc51473f9c2c4f3025d6f281a96cf2f6ea77f54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): validate_hrv.py:803-812 | validate_hrv.py:867-876 | validate_hrv.py:1063-1072 | validate_hrv.py:1134-1143 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"validate_hrv.py"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a15469748d10668aefa042a246846989eb48f617af56576bc82e80c38f2b96b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): validate_hrv.py:122-130 | validate_hrv.py:149-157 | validate_hrv.py:161-169 \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":"validate_hrv.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ebe2f91ef08e5ac03537424551290331e5cb5da9617e80b6f4ef1dd528d025"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): validate_hrv.py:750-758 | validate_hrv.py:1074-1082 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060validate_hrv.py:1073\u0060 calls \u0060metric_deltas\u0060 and \u0060validate_hrv.py:749\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":"validate_hrv.py"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe20aeedf40916c1b666ae779315c42632b15fa782a0f32bc62391b54549980f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): validate_hrv.py:628-634 | validate_hrv.py:1148-1154 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"validate_hrv.py"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c00e2f93b4f52ead3377c70da4c9466aecba8284edac741de0e2b65a08a5f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): validate_hrv.py:989-995 | validate_hrv.py:997-1003 \u2014 both copies are in the same file, so extract the block 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":"validate_hrv.py"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"119436dca226fc6c98612066849d6d734d1b4e3b9fdd473fe21d70fbfb2cceb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (72 shared lines): tools/replay_whoop4_day_steps.swift:17-147 | tools/verify_whoop4_autonomous_step_corpus.swift:309-413 \u2014 These two members are variants of one another: 72 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":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e700c80599728c559efa140f599ffa4625cbbff873db2ff1ae5e7de3e156c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): tools/evaluate_activity_classifier.py:226-244 | tools/evaluate_overnight_load_model.py:197-212 | tools/evaluate_recovery_model.py:214-230 | tools/evaluate_sensor_decoder.py:237-253 | tools/validate_research_corpus.py:288-302 \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":"tools/evaluate_activity_classifier.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41263d2ce6ae5673943a41df9f0c1c28f31206953fca699f3d19658f61fe37e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): tools/strap-mac/ff_sweep.py:60-64 | tools/strap-mac/pairing_6a.py:29-33 | tools/strap-mac/pairing_window.py:28-32 | tools/strap-mac/r10_capture.py:67-71 | tools/strap-mac/r10r11_probe.py:47-51 \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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f6131ac30356ab7b7d4060d1bf63247106c5b9c318e51cbfb93b4c43dcf81d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): tools/strap-mac/ff_sweep.py:229-243 | tools/strap-mac/flush_probe.py:241-255 | tools/strap-mac/night_capture.py:301-315 | tools/strap-mac/r10_capture.py:218-232 | tools/strap-mac/r10r11_probe.py:216-231 \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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd80f8d38b6ebdf397d5775d56e42d044cb8e47f39d2d60a4872c57a10b73dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): tools/evaluate_activity_classifier.py:47-53 | tools/evaluate_overnight_load_model.py:33-39 | tools/evaluate_recovery_model.py:30-36 | tools/evaluate_sensor_decoder.py:31-37 \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":"tools/evaluate_activity_classifier.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf3f61dd8062704b11b5431f4d17499cb12cb71a505bef0dd89c36012b26476"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): tools/evaluate_activity_classifier.py:131-159 | tools/evaluate_overnight_load_model.py:112-139 | tools/evaluate_recovery_model.py:135-164 | tools/evaluate_sensor_decoder.py:136-159 \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":"tools/evaluate_activity_classifier.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dab6b6d9994af097b50f4bcf198d506fdafc198fa4d62f6c88ba296069c5307"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): tools/analyze_workout_store.py:594-639 | tools/analyze_workout_store.py:643-698 \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":"tools/analyze_workout_store.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a4717ac710607001e3212f790ca14d32b0cdf62dd0b9e6959da36c0d62ff600"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): tools/validate_hr_reference.py:60-86 | tools/validate_hrv_reference.py:86-123 \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":"tools/validate_hr_reference.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6820b66562c458f25056afa36928b0711e7c5fb9fe474d9b6e4f4288721ed94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): tools/preflight_reference_csv.py:93-114 | tools/preflight_reference_csv.py:118-139 \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":"tools/preflight_reference_csv.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0c55dd556ffa0b3e13f482a5fcbd2cb6763c54d67b8420def6aad5459dd055"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): tools/analyze_historical_2f.py:644-682 | tools/analyze_historical_usability.py:231-273 \u2014 These two members are one piece of code written twice and then edited apart: 39 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":"tools/analyze_historical_2f.py"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"879cb1823cfcbe488b2e1e856e2d0bfa75ecaa7f8cd44b592fbc8a54d21b9541"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): tools/strap-mac/ff_sweep.py:372-383 | tools/strap-mac/ff_sweep.py:423-436 \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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"25aed65799c29564c1b57e3c1a7b25f5d0c140230af1726ec6211563f438b2c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): tools/strap-mac/pairing_6a.py:148-159 | tools/strap-mac/pairing_window.py:117-127 \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":"tools/strap-mac/pairing_6a.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"4812dd16e56e08003c9c076551633dbd6fa00be9285377f69632a1f9057646b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): tools/analyze_sleep_store.py:34-44 | tools/analyze_workout_store.py:111-124 \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":"tools/analyze_sleep_store.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea0908d45c075d9df04c6200eca8b7744922007b8a1159a7836b11ee3f77584"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): tools/analyze_gate_e_workout_log.py:22-33 | tools/analyze_historical_usability.py:150-160 | tools/verify_whoop4_exact_history_transaction.py:54-63 \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":"tools/analyze_gate_e_workout_log.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"12942252cffcef5db3ef1b05192c6689659effb99f0c5c5d7b6b8bce8e36c6e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): tools/replay_whoop4_day_steps.swift:149-165 | tools/verify_whoop4_autonomous_step_corpus.swift:459-474 \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":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf1fa92db87707b73ecf01608dff1835869ce0d18493e9bbdc83b7f36291c5a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): tools/analyze_sleep_store.py:165-185 | tools/analyze_workout_store.py:551-565 \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":"tools/analyze_sleep_store.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2351da025b113aeeab01b8fdcae0a068af350be7c986e04b44e2cdccde6859"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): tools/app_build_provenance.py:151-159 | tools/v4_morning_acceptance.py:76-83 \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":"tools/app_build_provenance.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf9d080614f1cdda56802de77e52fd7aa9a16787a28b08c894fe83174462c07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): tools/strap-mac/night_capture.py:77-83 | tools/strap-mac/r10_capture.py:95-103 \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":"tools/strap-mac/night_capture.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52e10e7d9d6f2d619c04ac66119bb3ff45ef751d95c8d9169244e0456f4a02b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): tools/analyze_historical_2f.py:245-264 | tools/analyze_historical_2f.py:414-428 \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":"tools/analyze_historical_2f.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fef31384ff1bfa693913bbada1d71ca33fc3ca16e2d0ecb48c4641439788c21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): tools/validate_hr_reference.py:46-56 | tools/validate_hrv_reference.py:72-82 \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":"tools/validate_hr_reference.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"9440ce0b73d7183b8c0d417f343bc0989233d58746c116517c593735efe1cb61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): tools/strap-mac/session.py:78-86 | tools/strap-mac/session.py:90-98 \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":"tools/strap-mac/session.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f26d514591e82dc441a3cd253da070c3aa8c5d37ca615c8f29c0edad935b95c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): tools/strap-mac/ff_sweep.py:133-151 | tools/strap-mac/r10r11_probe.py:80-96 \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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3d67a2dcb87867dadafb1a9122c52e7b6bb98e4868ef3251d2f48dde48fc153"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): tools/build_physical_window_manifests.py:117-126 | tools/validate_research_corpus.py:48-54 \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":"tools/build_physical_window_manifests.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"373f302a7010c4c4b273a9c651da335874f31a7713e5424bd8b34d3f8c164ef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): tools/strap-mac/score_walks.py:32-38 | tools/strap-mac/score_walks.py:56-62 \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":"tools/strap-mac/score_walks.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2a450652f8f87866efbb00011aa67f2d133ead584d50cedb2b071c9c05c02b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): tools/strap-mac/flush_probe.py:145-150 | tools/strap-mac/pairing_6a.py:122-128 | tools/strap-mac/r10_capture.py:209-213 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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":"tools/strap-mac/flush_probe.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f2a7ef67b03f70dcbabca13faffe9c8ac2904f350320eba95a5c0fef20ecd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): tools/audit_handoff_status.py:280-285 | tools/audit_handoff_status.py:680-688 \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":"tools/audit_handoff_status.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"976210de086f709b0a40c39e33287a2fddc1c80b9314cb744c57c4dc3b82aaba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): tools/analyze_gate_status.py:84-91 | tools/analyze_historical_archive.py:18-24 \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":"tools/analyze_gate_status.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0dd5429736e403783371c0fa635f6e91f4563cad606bccbf38c5fde1289abf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 3\u002B corresponding lines): tools/strap-mac/ff_sweep.py:82-84 | tools/strap-mac/flush_probe.py:62-64 | tools/strap-mac/night_capture.py:71-73 | tools/strap-mac/pairing_6a.py:55-57 | tools/strap-mac/r10_capture.py:89-91 | tools/strap-mac/r10r11_probe.py:73-75 \u2014 These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"f223bceeea891031aa58f760fb36591a3a9b081a157dc3aeaff555069559c669"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): tools/validate_hr_reference.py:113-120 | tools/validate_hrv_reference.py:162-167 \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":"tools/validate_hr_reference.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"834e8db04643320b25d566fe3b12ac14035f1de676932805f4d4bc5a8f7e328c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 6\u002B corresponding lines): tools/audit_handoff_status.py:692-701 | tools/compare_hist1_analytics.py:21-26 | tools/v4_morning_acceptance.py:20-27 | tools/verify_hist1_acceptance.py:33-40 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 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":"tools/audit_handoff_status.py"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"aadcff544390bc27338e22d8b8d38d2d3aa93b10731afd552652739125586e20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): tools/strap-mac/ff_sweep.py:159-165 | tools/strap-mac/r10r11_probe.py:105-112 | tools/strap-mac/session.py:153-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 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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc2849c82f92c5c8123978e99db3022613faa7adecea523f1c4449958c6d1fd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): tools/analyze_sleep_store.py:116-121 | tools/analyze_sleep_store.py:125-128 | tools/analyze_sleep_store.py:132-135 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"tools/analyze_sleep_store.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3d2656d135e89d652ae8010d0363e2fb34d713728f34ca01404347e1b0e062"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): tools/analyze_sleep_store.py:101-105 | tools/verify_hist1_acceptance.py:178-182 \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":"tools/analyze_sleep_store.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"242c31f7bda98d75ac46fa66a91dd1626489b1de06e642d59e98253292a84fef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): tools/strap-mac/flush_probe.py:122-127 | tools/strap-mac/night_capture.py:164-171 \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":"tools/strap-mac/flush_probe.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ea29d79320e54ee84cf30409aef8d06744432a43a0c238e156fbe6157b9c20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): tools/preflight_reference_csv.py:192-200 | tools/validate_hrv_reference.py:134-142 \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":"tools/preflight_reference_csv.py"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1fb06e185639890ce1f1f2c7e54309bf563107639b9777a0c928e6947e5df56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): tools/strap-mac/overnight_watch.py:36-40 | tools/strap-mac/session.py:64-68 \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":"tools/strap-mac/overnight_watch.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"538b9f40d2a78c89e8a600690201573acfab0a8eb6beb13669af7a37a59beca9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): tools/strap-mac/flush_probe.py:88-93 | tools/strap-mac/night_capture.py:109-114 | tools/strap-mac/r10_capture.py:147-153 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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":"tools/strap-mac/flush_probe.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8bd62bdd38c023744c0642d5ad010256b9db70c872c195e62de2de33a3eef28"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): tools/compare_hist1_analytics.py:37-40 | tools/verify_hist1_acceptance.py:44-48 \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":"tools/compare_hist1_analytics.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd238972b21489376d552b4dc0aeed947c874e95c4e1662702ce158992d9823"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): tools/strap-mac/flush_probe.py:230-233 | tools/strap-mac/night_capture.py:286-293 \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":"tools/strap-mac/flush_probe.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"4189487c8cbd0f9e45718f9e9be81e59f989b2fedb4a18e12a4bfe3f04e7ee4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): tools/verify_gate2_release_artifacts.py:60-63 | tools/verify_hist1_acceptance.py:89-92 | tools/verify_hist1_resumable_recovery.py:58-61 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"tools/verify_gate2_release_artifacts.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8f7085b0893ba227c25c65f3caed10b6ed0ba2ddc324f63a79385ded32eda4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): tools/fit_step_calibration.swift:687-690 | tools/replay_step_calibration.swift:545-548 \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":"tools/fit_step_calibration.swift"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d517058a0084a5d30f3e7f82bc17ba813a894d900b51d1136fd46a10bd458f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 2\u002B corresponding lines): tools/strap-mac/ff_sweep.py:68-69 | tools/strap-mac/flush_probe.py:48-49 | tools/strap-mac/night_capture.py:57-58 | tools/strap-mac/pairing_6a.py:41-42 | tools/strap-mac/pairing_window.py:40-41 | tools/strap-mac/r10_capture.py:75-76 | tools/strap-mac/r10r11_probe.py:59-60 \u2014 These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 2 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 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"71524a5e78fa124b171444461dddaf68a9880ef74e752105348a4e0de443329f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): tools/analyze_historical_archive.py:51-53 | tools/analyze_historical_usability.py:50-52 | tools/analyze_sleep_store.py:56-58 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"656692e374c52e51d3d3d3622724616f1e0b72d1fc2bdae019133ce7a7bc1586"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): tools/strap-mac/overnight_watch.py:86-89 | tools/strap-mac/pairing_6a.py:74-76 | tools/strap-mac/r10r11_probe.py:100-102 \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":"tools/strap-mac/overnight_watch.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"e330602cb4586a177da2b075405ad0ae63e848999439e7ea4e14925517369361"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): tools/analyze_sleep_store.py:62-64 | tools/analyze_workout_store.py:133-135 \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":"tools/analyze_sleep_store.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b3d37b54d3a7b4df8ca1441d1837e94579673e41f9d952ee1edae7d1bf0461"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): tools/app_build_provenance.py:144-147 | tools/run_hist1_resumable_recovery.py:44-47 | tools/v4_morning_acceptance.py:202-205 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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":"tools/app_build_provenance.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4b318a543c700c082afefa4cba79edce028983fbfc870ad374cbbfc865a0b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): tools/validate_hr_reference.py:281-284 | tools/validate_hrv_reference.py:329-332 \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":"tools/validate_hr_reference.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea37a1b4cfec729f19572ea20d65a8caaf98e3cfa1e9f08bff4ff24d17c0377a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 4\u002B corresponding lines): tools/evaluate_activity_classifier.py:67-70 | tools/evaluate_overnight_load_model.py:43-46 | tools/evaluate_recovery_model.py:40-43 | tools/evaluate_sensor_decoder.py:41-44 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 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":"tools/evaluate_activity_classifier.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c13617305eb2b73755489ec757531d3755b415fb10ca980c706bcf9ed5b8a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): tools/strap-mac/r10_capture.py:204-206 | tools/strap-mac/r10r11_probe.py:197-199 \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":"tools/strap-mac/r10_capture.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"b469f52972207c7a3d05340ff9b14cc4e0d308ac67253e3343773f73e199fafc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (1 corresponding lines): tools/analyze_historical_archive.py:57-57 | tools/analyze_historical_usability.py:56-56 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2902fa7b8288d7370075f5ef2ef1444a4b05b972f4a928bd5b349444cbfde9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 1\u002B corresponding lines): tools/strap-mac/overnight_watch.py:44-46 | tools/strap-mac/pairing_6a.py:37-37 | tools/strap-mac/pairing_window.py:36-36 | tools/strap-mac/r10r11_probe.py:55-55 | tools/strap-mac/session.py:72-74 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/overnight_watch.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81ea5ebd4e75c3a27e03c64b8ae3046929755df153a5e8338b9fec273a19b18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): tools/replay_whoop4_day_steps.swift:33-63 | tools/verify_whoop4_autonomous_step_corpus.swift:312-342 \u2014 before extracting anything, compare \u0060tools/replay_whoop4_day_steps.swift\u0060 and \u0060tools/verify_whoop4_autonomous_step_corpus.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060tools/verify_whoop4_autonomous_step_corpus.swift:344\u0060 calls \u0060min\u0060, \u0060max\u0060 and \u0060tools/replay_whoop4_day_steps.swift:64\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":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed1a0a4e94c32700d6ee9e611312548b35443b81ed0508c98a7a1169a3fb8da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): tools/fit_step_calibration.swift:664-685 | tools/replay_step_calibration.swift:522-543 \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 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":"tools/fit_step_calibration.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"4015896f9a5d990ee350dccb5a720a0487a8394ca6ee2389a7ced59f2d91d9a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 2): tools/replay_whoop4_day_steps.swift:92-108 | tools/verify_whoop4_autonomous_step_corpus.swift:381-400 \u2014 before extracting anything, compare \u0060tools/replay_whoop4_day_steps.swift\u0060 and \u0060tools/verify_whoop4_autonomous_step_corpus.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/replay_whoop4_day_steps.swift:92\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9e0c77212b7c95a46b270c77ee3ba57a2f40b3e57c5558442c267c5657e084"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): tools/replay_whoop4_compact_steps.swift:90-105 | tools/replay_whoop4_day_steps.swift:130-147 \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 \u0060tools/replay_whoop4_compact_steps.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060tools/replay_whoop4_compact_steps.swift:88\u0060 calls \u0060min\u0060, \u0060max\u0060 and \u0060tools/replay_whoop4_day_steps.swift:129\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":"tools/replay_whoop4_compact_steps.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2905b5245e415bacbf13dd15cf1960bbf5213d65450cd9579fc9c3661c70ee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): tools/replay_whoop4_day_steps.swift:75-88 | tools/verify_whoop4_autonomous_step_corpus.swift:360-374 \u2014 before extracting anything, compare \u0060tools/replay_whoop4_day_steps.swift\u0060 and \u0060tools/verify_whoop4_autonomous_step_corpus.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d75e29f225c385a5f65b8fc970dfed8c45fcb556fa2626a4c95b662e3ce0c70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/fit_step_calibration.swift:473-486 | tools/replay_step_calibration.swift:40-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/fit_step_calibration.swift:473\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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":"tools/fit_step_calibration.swift"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"74930862e043e3a4c0adc77180bf3da9d1c4062b4efeec603f6ba4a3452d8a50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/fit_step_calibration.swift:636-649 | tools/replay_step_calibration.swift:493-506 \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":"tools/fit_step_calibration.swift"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"971c702ad97e4b7957a8c9702fd270efc0718c4b97b347e4d7dc9a4e9b2303d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tools/replay_whoop4_day_steps.swift:149-161 | tools/verify_whoop4_autonomous_step_corpus.swift:459-471 \u2014 before extracting anything, compare \u0060tools/replay_whoop4_day_steps.swift\u0060 and \u0060tools/verify_whoop4_autonomous_step_corpus.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/replay_whoop4_day_steps.swift:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8383b1731509cd2d650f33bb7d5e3dc8dd82304e1522bf49ae72f51652f738f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): tools/replay_whoop4_day_steps.swift:64-73 | tools/verify_whoop4_autonomous_step_corpus.swift:346-357 \u2014 before extracting anything, compare \u0060tools/replay_whoop4_day_steps.swift\u0060 and \u0060tools/verify_whoop4_autonomous_step_corpus.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/replay_whoop4_day_steps.swift:64\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060tools/verify_whoop4_autonomous_step_corpus.swift:344\u0060 calls \u0060min\u0060, \u0060max\u0060 and \u0060tools/replay_whoop4_day_steps.swift:63\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":"tools/replay_whoop4_day_steps.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"756dc98584e924360ddb3690fd0f26fb18a9ebd9091ac6ca7b2ab2e3d6fb38f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): tools/replay_whoop4_compact_steps.swift:16-26 | tools/replay_whoop4_day_steps.swift:17-26 \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 \u0060tools/replay_whoop4_compact_steps.swift:16\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/replay_whoop4_compact_steps.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"9958170c3bacec1e85268d6c20f0b1eb8a8776b472fde26b7807697856c1f02f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): tools/fit_step_calibration.swift:187-194 | tools/fit_step_calibration.swift:232-238 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/fit_step_calibration.swift:187\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":"tools/fit_step_calibration.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6a1a86b39de8db25928c0ea7507119301a381ebe68ca4d6cf8ec019f963e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): tools/dump_imu_samples.swift:19-25 | tools/fit_step_calibration.swift:464-470 | tools/replay_step_calibration.swift:31-37 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/dump_imu_samples.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"195af2ba2de7eaefb4ff1214b382af68f3f33b5b35ee214377d728d624d0af26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/dump_imu_samples.swift:35-39 | tools/replay_step_calibration.swift:50-54 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060tools/replay_step_calibration.swift:49\u0060 calls \u0060Int64\u0060 and \u0060tools/dump_imu_samples.swift:34\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":"tools/dump_imu_samples.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"758e91c59a0f7225caf0da55909a67309e5b125fed2ff8864cb02582d471e09e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/fit_step_calibration.swift:651-658 | tools/replay_step_calibration.swift:508-515 \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":"tools/fit_step_calibration.swift"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c1a781a7c07f5fde645de93397d5905bc7330f2883525dbf765ef0df2e878b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201337 lines \u00D7 2): tools/analyze_historical_archive.py:97-133 | tools/analyze_historical_usability.py:193-227 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ca9a29b035d3546372543666b89ccdd83ca3d07645188e219b56a02863454d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): tools/analyze_historical_2f.py:648-682 | tools/analyze_historical_usability.py:239-273 \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":"tools/analyze_historical_2f.py"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b02471f7d40772fe55d87d595c572af14b2ecde7182e210d6628833880b18b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): tools/analyze_whoop4_gravity_walk.py:666-695 | tools/analyze_whoop4_gravity_walk.py:743-771 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_whoop4_gravity_walk.py"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7727affe1a5ba0fdf3771ec5cd64bffaa29d70afd69bb0aa7213e2193afba8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): tools/analyze_historical_2f.py:319-341 | tools/analyze_historical_2f.py:432-454 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_historical_2f.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccf1ee04a43a59d54e2f174c142b37b87c42d49500ba356bd95b9ab4b1c727d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): tools/analyze_workout_store.py:622-639 | tools/analyze_workout_store.py:680-698 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_workout_store.py"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa9d00d67a02f18e8ebe4f5d83772adfcc4dc8671214d2ad76442d19f86f999"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): tools/evaluate_recovery_model.py:108-124 | tools/evaluate_sensor_decoder.py:109-125 \u2014 before extracting anything, compare \u0060tools/evaluate_recovery_model.py\u0060 and \u0060tools/evaluate_sensor_decoder.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_recovery_model.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcfb7796abbf7216db8a27c7f672dd17262bc193f7fb521915280cb5316921b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): tools/verify_hist1_acceptance.py:320-334 | tools/verify_hist1_resumable_recovery.py:230-244 \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":"tools/verify_hist1_acceptance.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"9909bc822a81a9000e7c03e0d28147eb64c5d20d83142286e1256105a4f40d00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): tools/analyze_historical_2f.py:950-963 | tools/analyze_historical_2f.py:1054-1067 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/analyze_historical_2f.py:950\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_2f.py"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"128e4dc254e5cf19acfecc91735c690de3071c62c453f0453c5a0a887c064828"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tools/analyze_historical_archive.py:78-90 | tools/analyze_historical_usability.py:77-89 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6048a63ec9e7646d494189b16c8ebd62fa36519a138a49483004b4a7771e60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): tools/audit_handoff_status.py:90-101 | tools/monitor_long_wear.py:322-333 | tools/prepare_accessibility_performance_evidence.py:34-45 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/audit_handoff_status.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a5978c42ec8f343807bc5b5885c20f4141ef4a66d6e8311802b48e945c966c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): tools/strap-mac/ff_sweep.py:230-240 | tools/strap-mac/flush_probe.py:242-252 | tools/strap-mac/night_capture.py:302-312 | tools/strap-mac/r10_capture.py:219-229 | tools/strap-mac/r10r11_probe.py:217-227 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9a4d6db26d3e28c9829ecd54cfdd264b512a7c5e5f48c5fb1550d11d5073aaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): tools/app_build_provenance.py:220-229 | tools/app_build_provenance.py:254-264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/app_build_provenance.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c123dd33b3599a64877e37bebf203021dccb9edb0e2fb22f7f3f589c3fe6bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tools/analyze_historical_archive.py:37-47 | tools/analyze_historical_usability.py:36-46 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"23801b694e6275ca0c76e21ca916db15ca3890e3f1b445b667fa53e946a63151"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): tools/run_hist1_resumable_recovery.py:249-258 | tools/run_hist1_resumable_recovery.py:285-293 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"tools/run_hist1_resumable_recovery.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c2529bfdace3dab2fd98839b1cdacd041fb5a5914a7ccb40df2044f6ec93f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): tools/evaluate_activity_classifier.py:133-141 | tools/evaluate_overnight_load_model.py:114-122 | tools/evaluate_recovery_model.py:137-145 | tools/evaluate_sensor_decoder.py:137-144 \u2014 before extracting anything, compare \u0060tools/evaluate_activity_classifier.py\u0060 and \u0060tools/evaluate_overnight_load_model.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/evaluate_activity_classifier.py:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060tools/evaluate_activity_classifier.py:142\u0060 calls \u0060text\u0060 and \u0060tools/evaluate_overnight_load_model.py:123\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":"tools/evaluate_activity_classifier.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b67bebdd6421e4918ed1f5e78f759f2a828f0594e39195a26987a653956693e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/analyze_whoop4_gravity_walk.py:146-154 | tools/analyze_whoop4_gravity_walk.py:386-394 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_whoop4_gravity_walk.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6360a53f64ed15c864d8aff520abf9fcde39d44d0f8b7db5ad6ca98ae8edb44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/audit_handoff_status.py:322-330 | tools/monitor_long_wear.py:571-579 \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":"tools/audit_handoff_status.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea47a8305b98f68758d7dee55561f9dce2ec743c4fc73a004f32443b6bf2eaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/audit_realtime_ble_validation.py:119-127 | tools/monitor_realtime_ble.py:247-255 \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":"tools/audit_realtime_ble_validation.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c941cec361612a46a1da6bd59e6e04a49714f92b05dfa93cb385d28024efbbd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): tools/preflight_reference_csv.py:95-103 | tools/preflight_reference_csv.py:120-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/preflight_reference_csv.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba5a3b6b5e05836c657925c6f6c1e2300bfe3df98debac0cae93051cc00bba6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): tools/evaluate_activity_classifier.py:237-244 | tools/evaluate_overnight_load_model.py:205-212 | tools/evaluate_recovery_model.py:223-230 | tools/evaluate_sensor_decoder.py:246-253 | tools/validate_research_corpus.py:295-302 \u2014 before extracting anything, compare \u0060tools/evaluate_activity_classifier.py\u0060 and \u0060tools/evaluate_overnight_load_model.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_activity_classifier.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a054b2bbe555b7836d7b414d19ac6ab2c1ad13670a53ff63ab3595a09141f48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/analyze_gate_e_workout_log.py:233-240 | tools/analyze_gate_e_workout_log.py:241-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_gate_e_workout_log.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b58b0ecaabc971baafab87b1dd3d6ae4ce66b6cc8d3db2a2e22773070c45ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/analyze_historical_2f.py:233-240 | tools/analyze_historical_2f.py:420-427 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_2f.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e72e2aaa294957295d95812eb96df3b42c335c70b1b98eb2af049e10adf3a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/analyze_workout_store.py:604-611 | tools/analyze_workout_store.py:654-661 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_workout_store.py"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7bb01f445605a06eb07f3e5720714247a7e1eac4cf9000cda6128662437685"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/validate_runtime_evidence.py:114-121 | tools/validate_runtime_evidence.py:180-187 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/validate_runtime_evidence.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"df23716332803f93b8dcfcd1bae9587f6cf0d3f79b0687bf1be47ada21859a7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): tools/analyze_historical_archive.py:39-45 | tools/analyze_historical_usability.py:38-44 | tools/analyze_sleep_store.py:36-42 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bfa89848c46c1b14647cc81b7c23ae3f59e8c0a98e64d799471348f944c987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): tools/evaluate_activity_classifier.py:57-63 | tools/evaluate_overnight_load_model.py:71-77 | tools/evaluate_recovery_model.py:68-74 \u2014 before extracting anything, compare \u0060tools/evaluate_activity_classifier.py\u0060 and \u0060tools/evaluate_overnight_load_model.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_activity_classifier.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82f63d1d30e11186ee15413465bdbb859475308442d31a8116ac8a79e017e86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/analyze_gate_e_workout_log.py:23-29 | tools/analyze_historical_usability.py:151-157 \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":"tools/analyze_gate_e_workout_log.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd7ba4df6582d0bb4354689ba6a88efc065d35f38a7eca23f2df991e6ef57ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/analyze_gate_status.py:206-212 | tools/analyze_gate_status.py:247-253 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_gate_status.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb15cf8e15a829c124122a21437b355824152b1a01f0de193a6226c95938150"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/analyze_workout_store.py:594-603 | tools/analyze_workout_store.py:643-652 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_workout_store.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"31631cf12f99f3f0df9e1e0da7d6e3fce379217ec82b484f40a958e2b4ab118f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): tools/app_build_provenance.py:229-234 | tools/app_build_provenance.py:269-275 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/app_build_provenance.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ef7257862e4f5e7ccb388e65d92e003bee292dccb01f4b0ebe12b16938b906"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/verify_hist1_acceptance.py:555-561 | tools/verify_hist1_acceptance.py:567-574 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/verify_hist1_acceptance.py:567\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"tools/verify_hist1_acceptance.py"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"d347d930a5439d61ef85a99d4252cbb637f65a0b01b791b86bb91988486513e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): tools/analyze_gate_e_workout_log.py:22-27 | tools/analyze_historical_usability.py:150-155 | tools/verify_whoop4_exact_history_transaction.py:54-59 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, 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, \u0060tools/analyze_gate_e_workout_log.py:28\u0060 calls \u0060group\u0060 and \u0060tools/verify_whoop4_exact_history_transaction.py:60\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_gate_e_workout_log.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"6949f8c02c98acd5ed513e82e81c31195a618c65c161ca34d5d34d6eb2f93d9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): tools/analyze_historical_2f.py:236-241 | tools/analyze_historical_2f.py:259-264 | tools/analyze_historical_2f.py:423-428 \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":"tools/analyze_historical_2f.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"963ec71c2696500941268c0b647bb2df2e062038358e88e8f300cf8b7e51cded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/analyze_gate_status.py:800-805 | tools/analyze_gate_status.py:812-817 \u2014 both copies are in the same file, so extract the block 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":"tools/analyze_gate_status.py"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be2a03e7cc4183909ac28cb361b4f5a8e4faa437cdd6141c9cda48e795b39b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tools/app_build_provenance.py:238-244 | tools/app_build_provenance.py:283-289 \u2014 both copies are in the same file, so extract the block 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, \u0060tools/app_build_provenance.py:280\u0060 calls \u0060extend\u0060 and \u0060tools/app_build_provenance.py: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":"tools/app_build_provenance.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"55dc9b0fbcff09535f894bdc59c9e646fb297fd161cf3f87d7fd0597e78a0b73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 3): tools/evaluate_overnight_load_model.py:122-128 | tools/evaluate_recovery_model.py:148-153 | tools/evaluate_sensor_decoder.py:151-153 \u2014 before extracting anything, compare \u0060tools/evaluate_overnight_load_model.py\u0060 and \u0060tools/evaluate_recovery_model.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/evaluate_sensor_decoder.py:151\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, \u0060tools/evaluate_recovery_model.py:145\u0060 calls \u0060EvaluationError\u0060, \u0060integer\u0060 and \u0060tools/evaluate_overnight_load_model.py:121\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":"tools/evaluate_overnight_load_model.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ac3c2412b2e6082711ab955e1a80344f2ddda0b054c6e79571689e6207de85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/preflight_reference_csv.py:61-66 | tools/preflight_reference_csv.py:76-81 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/preflight_reference_csv.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd049254ca62945698a69ed6402fede8b0df9d0648f31c9cbb8d77112f427a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/strap-mac/ff_sweep.py:388-393 | tools/strap-mac/ff_sweep.py:443-448 \u2014 both copies are in the same file, so extract the block 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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"a23d9aa8f0dfc6bc4eefa64435dbf492f4281f4937281ddd836f5a54b3361f34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/strap-mac/night_timeline.py:84-89 | tools/strap-mac/strap_metrics.py:136-141 \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":"tools/strap-mac/night_timeline.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a09e39e1c74a6798891e60212cadd4a4616c2285dcbdca3426b9f3f47d0b95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): tools/run_hist1_resumable_recovery.py:223-228 | tools/run_hist1_resumable_recovery.py:270-275 | tools/run_hist1_resumable_recovery.py:303-308 \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":"tools/run_hist1_resumable_recovery.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"7112365fa530f8878950039b77623fd172b9a5e4a10c3c3cd68817f5a7ae88fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): tools/evaluate_overnight_load_model.py:131-135 | tools/evaluate_recovery_model.py:156-160 | tools/evaluate_sensor_decoder.py:152-154 \u2014 before extracting anything, compare \u0060tools/evaluate_overnight_load_model.py\u0060 and \u0060tools/evaluate_recovery_model.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tools/evaluate_overnight_load_model.py:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060tools/evaluate_overnight_load_model.py:130\u0060 calls \u0060key\u0060, \u0060text\u0060, \u0060time\u0060 and \u0060tools/evaluate_sensor_decoder.py:152\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":"tools/evaluate_overnight_load_model.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bea4af5ef03672df57388ca1c680308f663e634027777063dfeb23a1c2c8af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/evaluate_recovery_model.py:82-91 | tools/evaluate_sensor_decoder.py:95-104 \u2014 before extracting anything, compare \u0060tools/evaluate_recovery_model.py\u0060 and \u0060tools/evaluate_sensor_decoder.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_recovery_model.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"f777f99fb669c75ebde908373d11f564fcd7714ac836c5007a24d87bc340cc3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/strap-mac/night_capture.py:77-82 | tools/strap-mac/r10_capture.py:95-100 \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":"tools/strap-mac/night_capture.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"4880f455256f4b8edf87dce5babc146744a32c7963b286250f534077ceafc5fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tools/analyze_historical_archive.py:61-65 | tools/analyze_historical_usability.py:60-64 \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":"tools/analyze_historical_archive.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d31994550d415c210ee29e691f9524ddd109c8d4c0799217e2d16c2df08efe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): tools/analyze_historical_archive.py:69-74 | tools/analyze_historical_usability.py:68-73 | tools/analyze_sleep_store.py:25-30 | tools/analyze_workout_store.py:27-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d1012567d0fc60b06e4fc0f39af934ffb4610a025cc2a2de78219722aabc80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): tools/app_build_provenance.py:34-38 | tools/v4_morning_acceptance.py:183-187 | tools/verify_physical_qualification.py:223-227 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/app_build_provenance.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"076428b7d692b03570cbfea6135e6b6f7e1882d784f2fa7763dbc081f64c610a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): tools/strap-mac/ff_sweep.py:73-78 | tools/strap-mac/flush_probe.py:53-58 | tools/strap-mac/night_capture.py:62-67 | tools/strap-mac/pairing_6a.py:46-51 | tools/strap-mac/r10_capture.py:80-85 | tools/strap-mac/r10r11_probe.py:64-69 | tools/strap-mac/session.py:48-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 all 7 call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"54508c085b8acc32c3f9d10d88c0b5e1d9b11476ec9d13e4082b2835b2bdb142"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): tools/strap-mac/ff_sweep.py:181-186 | tools/strap-mac/pairing_6a.py:105-110 \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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb46be51c558d879bcbca6d5922bb0f4578fff6c3134d016552efefb59125fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tools/strap-mac/r10_capture.py:176-183 | tools/strap-mac/r10r11_probe.py:132-139 \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":"tools/strap-mac/r10_capture.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce2cabd94134ec38be3cfbc1e0a2d0e02f303a74c830013e955e0d986ebf775"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tools/audit_handoff_status.py:340-349 | tools/monitor_long_wear.py:587-600 \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":"tools/audit_handoff_status.py"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"7702e1ae3057845056e3b2cec84b54349ae0983d70f6c26fe5bdc6f8c1d599ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): tools/build_physical_window_manifests.py:108-113 | tools/evaluate_activity_detection.py:61-66 | tools/validate_research_corpus.py:39-44 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/build_physical_window_manifests.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"f149c29461f5c891b31349a50444ea4c3ef4bc9f7b501cb250e4b105cce0f02d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): tools/evaluate_activity_classifier.py:47-53 | tools/evaluate_overnight_load_model.py:33-39 | tools/evaluate_recovery_model.py:30-36 | tools/evaluate_sensor_decoder.py:31-37 \u2014 before extracting anything, compare \u0060tools/evaluate_activity_classifier.py\u0060 and \u0060tools/evaluate_overnight_load_model.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_activity_classifier.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ebbc4d9b0b52cb65caee95bd4aaa652277ab5636f5d35cd11ec5f170477767"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): tools/strap-mac/ff_sweep.py:60-64 | tools/strap-mac/pairing_6a.py:29-33 | tools/strap-mac/pairing_window.py:28-32 | tools/strap-mac/r10_capture.py:67-71 | tools/strap-mac/r10r11_probe.py:47-51 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060tools/strap-mac/pairing_6a.py:36\u0060 calls \u0060err_text\u0060 and \u0060tools/strap-mac/ff_sweep.py:67\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":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"076d057ed3b585ba97d7ced2200a63532f00b425fb680b074f87790c55fd7511"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AtriaBLEManager (LCOM4 8): AtriaBLEManager\u0027s methods fall into 8 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 8 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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"003d95ce92993d75ff2252482249b5cc238d75f27144da04276396f1ce62c7ff"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SessionStore (LCOM4 7): SessionStore\u0027s methods fall into 7 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 7 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":"Atria/Atria/Sessions.swift"},"region":{"startLine":8847}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c24b7c1de8a0bfbbd91821440caa54043e1099ed5270c98ad20892c7ff1f42c"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testPacerDutyCyclesOnceTheLeaseIsHeld: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaBackgroundProjectionTests.swift"},"region":{"startLine":4145}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ee22cfaff41664488821d69e7df0858dcc618afd92009dd62934ef3dbd9dba"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testTheRealTwentySeventhDetects: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaDaytimeQuiescentSleepDetectorTests.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2322dcab15bd4cdd28c0ff440cef7855fe954ec5981088899bed03c2b74c619"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testPreservedJuly27PhysicalWalkProducesBoundedReadyReview: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaDetectedActivityReviewTests.swift"},"region":{"startLine":1031}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b7a80f73abfb3509ec3f63a1acf6f106899c9b45df5b2d8b40e1794604beae"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testGoldenNightSummaryIsPlausible: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaNightBaselineTests.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"0476953f7916a5b0cc9f351280cf0ec57d673b5fbde84afe560630aad4a2ad64"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testGoldenNightRoundTripsThroughTheBuilder: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaNightMinuteBuilderTests.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"14b5ad6b165ca30adebb8e2df3837a4180fac4cce7d1fcf9d2b09cb610088885"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testReportedJuly26SleepIsNotHiddenByShortPreludeAcrossLongAwakeGap: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaSleepAuditRegressionTests.swift"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd362dfbe1adda5253c1d25077b8afbb2ec29d6c7e87fe53fcc54a85d60f24ff"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testTheRealNoWalkEveningIsDetectedAndTheWalkIsNot: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaUnattributedMotionRunsTests.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"d48a6719f2d65153adbf7a53daa451cd641b2db486060a9e47591f23f18afbf2"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testMatureRestingBandGuidesWhileHRVIsStillCalibrating: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaWhiteboardCoachSentenceTests.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"34bad346ab43e9f9f332e4befb85af367042d6c9cdc59bf30e544b964046bbb3"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testRestingOnlyLaneStillCallsAnElevatedRestingHeartRate: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/AtriaTests/AtriaWhiteboardCoachSentenceTests.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde85fa5267062db4a323f085ae5bbeefb49a5c2f8a1cc5db280779c3434e73a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testHealthKitExportIsANoOpWhileDemoIsActive: 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":"Atria/AtriaTests/AtriaAppReviewDemoTests.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ba7f3f20e62851b567c05b7a3e3e4a09ee7188237fb0d1eef2db20ee5445a6"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testReviewSliceCancellationStopsMidTraversal: 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":"Atria/AtriaTests/AtriaCompactLatestNightSettlementTests.swift"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd37c8fb8f057ed0ed007a592eb827bddfec885f3d6108532b24b220a39537e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testJuly15CapturedNightCannotRecoverFromLegacyRRAndUnvalidatedMotion: 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":"Atria/AtriaTests/AtriaExistingRecordReplayTests.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"8157d2d07c84c0078ed165291f688801551b302f53f52ec53a54d6eb64f0fb92"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testJuly16CapturedNightDoesNotPromoteSparseQualifiedRRWithoutSleepEvidence: 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":"Atria/AtriaTests/AtriaExistingRecordReplayTests.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"31762ae676048c7a5b896992b9d37af47947165c3224119ab8bb07bfcc7ff033"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testJuly17CapturedNightKeepsQualifiedHRVSeparateFromRejectedSleep: 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":"Atria/AtriaTests/AtriaExistingRecordReplayTests.swift"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"2666f6a5ff6e200503e27c9631b6bdcb76c8816d93437ea899443ec7498c6893"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testJuly18CapturedNightKeepsQualifiedHRVSeparateFromFragmentedWear: 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":"Atria/AtriaTests/AtriaExistingRecordReplayTests.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f2d7350c8fd4a5af5ba613a49bfd2f3e10c6ceff5475b5871542601cf21a12"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testTwoKilobyteFrameIsCheap: 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":"Atria/AtriaTests/AtriaFrameCRCTests.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a100da298e0e8f98ccff32aec488b6c07dab7af6afaab07a9eecc562fca915"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testArtifactByteLimitFailsClosedBeforeDecode: 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":"Atria/AtriaTests/AtriaHistoricalVerifiedConsumerReaderTests.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96504053d33c2d9eeea3ca20f6da0f32fb2b84994faa059ec778413291fe1f3"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testAggregateByteLimitFailsClosedBeforeAggregateDecode: 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":"Atria/AtriaTests/AtriaHistoricalVerifiedConsumerReaderTests.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ce1196915c97075b2223fa9a6c2b83bf112dd32e6c381c45608c1206a4480f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testTotalAggregateByteLimitFailsClosedBeforeAggregateDecode: 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":"Atria/AtriaTests/AtriaHistoricalVerifiedConsumerReaderTests.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0776c0a8eda82aed21d673efafceb82c9713c0b6d90d683ff580c4e4a13bc35"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testRecoveryCardRendersWithTimestampAndStatus: 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":"Atria/AtriaTests/AtriaMetricProvenanceCardRenderTests.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe8df3a96989a59adb98a0ae4b4d83bf3b0a43d09e4dd5f0cd3e2c8871437c0"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testUngradedCardRendersNeutral: 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":"Atria/AtriaTests/AtriaMetricProvenanceCardRenderTests.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c07e4db41192940a966ffac4bcce2a75211b4367128baa3d744a7a68e5e97cd"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPartialStrainCardRendersInDarkMode: 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":"Atria/AtriaTests/AtriaMetricProvenanceCardRenderTests.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7729f0f1421b8a64f4baedf442f59f8368a5f28a6db9e3a82075d6f4b3e04132"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testProbeMisalignedLedgerVetoesOverlappingRowRun: 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":"Atria/AtriaTests/AtriaMotionRowDerivedCoverageTests.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"c896bc56ed835f38a646918d020bdbf3199ed1c633c7895a08242eb6c4be70b9"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testProbePartialOffloadTailVetoesRowRun: 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":"Atria/AtriaTests/AtriaMotionRowDerivedCoverageTests.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"8159dea557cb626f4723a634620e80f7140c05e7c8752104ef6e2f369c72b5f7"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testGaitQualityChallengerHundredHertzCost: 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":"Atria/AtriaTests/AtriaR10MotionTests.swift"},"region":{"startLine":1196}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17135ca8e087138db31ad9ba8e5241c74bb3c722a36c0475dfdfa26599a506f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testRoundTripParityFullyPopulated: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f9ab28f78c30a241f20ac4005f8fbd7d428ac350a7f11975d8d645654480d2"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testRoundTripParityAllOptionalsAbsent: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"b807101e1d88a3fa8c4e27f42f83142c253bb88f95ab3861444d0f8d5f5c6a6b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testHandWrittenLineWithNullsAndUnknownKeys: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a08a404b0c0a2cf891a1f87779c3d45c1c32947b769d9dc1d92ee18fb32115"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testBothRejectMissingRequiredKey: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"92750daccab143632df88faa0f4ac669ec69f69d33002c3b5757ba90e82ecb89"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testBothRejectMalformedLine: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1163d23421144ae0521ff0350eee18af427f729d984e3cc5fd3cf0027a863b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testNegativeZeroRoundTripsWithFullParity: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce7dc7fbb0cb89db29062aaf4ab16ee0850754e1e080ad728c034f70f7c3a17"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testParityAcrossRepresentativeVariations: 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":"Atria/AtriaTests/AtriaRecordScanParserParityTests.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3512c77aded276c381bc9d919b1c3baa499f9b80bf7a40b546c2bb9a0b0a6e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testEightHourDenseReviewPublishesParityStagesWithinSharedDeadline: 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":"Atria/AtriaTests/AtriaSleepReviewCacheTests.swift"},"region":{"startLine":1519}}}],"partialFingerprints":{"codehealthFindingId/v1":"643c242c3fa0484245a285fdc0ccf5980fb6114b5fde880a2cee199aaf0aadf8"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testTwelveHourDenseReviewPublishesParityStagesWithinSharedDeadline: 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":"Atria/AtriaTests/AtriaSleepReviewCacheTests.swift"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a584c1e01db8730f7923f17345cc69d047d3096ebde021ced23a5687860498b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPaletteMatchesDesignStageTable: 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":"Atria/AtriaTests/AtriaSleepStagePaletteTests.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"993a2c3df4522e47970e33863afbaf5ee23470db4a3a43eaa927f17d31d31912"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPolicyAndNestedInputsAreSendable: 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":"Atria/AtriaTests/AtriaWhoop4DailyMotionBankRearmPolicyTests.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9c6a45f78a5dd41a17b33ffd202ca48e684612d7d5c2615d4918aaed79adba2"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testSynchronizePublishesOnlyNewDurableGenerations: 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":"Atria/AtriaTests/AtriaWhoop4MotionTickCompactStoreTests.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"93806900eaba0b91a619fab592f1edf7bce663eb0ce5018b3f1d2be016b7191d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testAthleteProfile: 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":"Atria/AtriaTests/AtriaWorkoutSaveDurabilityTests.swift"},"region":{"startLine":2140}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d976ce0e1dc1c81edaf2111f32b9b841a3f0d7ec12b250ddcecb3726c5d7a1"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testDetectedWorkoutSurfaces: 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":"Atria/AtriaUITests/AtriaVisualAuditUITests.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c35ca4eaf9f6ce7bf49e160178e7e085d0d52509ad96d05f24f2e78ca03f728"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testWorkoutReviewSheet: 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":"Atria/AtriaUITests/AtriaVisualAuditUITests.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6bff6b5ba14ae305d6db7ee69cf51b37c7ed9d32db4081d27ba21c6a8651c85"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testAssistantOnDeviceAnswer: 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":"Atria/AtriaUITests/AtriaVisualAuditUITests.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"5546d7acea6a4e07360430c3f4f00aefc7e9fa02ca6bce4d7aa76733da36aa24"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/Sessions.swift: Atria/Atria/Sessions.swift changed 327 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 360 in SessionStore.validateSessionBackupEnvelopeForImport at line 48099. 78 of those changes were fix/bug commits, and the other 249 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/Sessions.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":"Atria/Atria/Sessions.swift"},"region":{"startLine":48099}}}],"partialFingerprints":{"codehealthFindingId/v1":"78cbe216ee3af77208cc7965127f64c451bef9cb7c45a70988bf9923b8767fa4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaBLEManager.swift: Atria/Atria/AtriaBLEManager.swift changed 383 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 177 in AtriaBLEManager.requestOfflineHistoricalSyncIfNeeded at line 13289. 61 of those changes were fix/bug commits, and the other 322 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaBLEManager.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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":13289}}}],"partialFingerprints":{"codehealthFindingId/v1":"05aa8c8756aa684472d6f09d4e47dc17e998670f7f0f4acceca8a1c8fb399955"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHomeView.swift: Atria/Atria/AtriaHomeView.swift changed 253 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in AtriaTopStatusProjection.presentation at line 14203. 27 of those changes were fix/bug commits, and the other 226 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHomeView.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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":14203}}}],"partialFingerprints":{"codehealthFindingId/v1":"49081c87695b1f2e7e422502b453cdab887ed2b83d8114e57159a1db74742329"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaOverviewSections.swift: Atria/Atria/AtriaOverviewSections.swift changed 225 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in AtriaMetricDetailSheet.detailTemplate at line 4783. 27 of those changes were fix/bug commits, and the other 198 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaOverviewSections.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":"Atria/Atria/AtriaOverviewSections.swift"},"region":{"startLine":4783}}}],"partialFingerprints":{"codehealthFindingId/v1":"d656a5ba39658d3b39a5e39ae7ac808d5fc06dae84d44f40d1b539390a5e0aef"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/HistoricalArchive.swift: Atria/Atria/HistoricalArchive.swift changed 83 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in HistoricalArchive.compactArchive at line 9722. 24 of those changes were fix/bug commits, and the other 59 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/HistoricalArchive.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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":9722}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ca4340174debbbee96ac207e9e005c19e987597a26f312be4ea16914efb1f0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaTodayScreen.swift: Atria/Atria/AtriaTodayScreen.swift changed 163 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in AtriaTodayScreen.glanceItem at line 2960. 21 of those changes were fix/bug commits, and the other 142 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaTodayScreen.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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":2960}}}],"partialFingerprints":{"codehealthFindingId/v1":"38db9a9b0d4135581a5c86d915624b20ebc98f13dd5953a1233d907e620cd189"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/WidgetSnapshot.swift: Atria/Atria/WidgetSnapshot.swift changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in WidgetSnapshotPublisher.publish at line 1653. 5 of those changes were fix/bug commits, and the other 40 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/WidgetSnapshot.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":"Atria/Atria/WidgetSnapshot.swift"},"region":{"startLine":1653}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f3962ffec3eeba271955df8616d051c51d1fe28c29d6fd7397affbc21f11a9e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaDailyStepPresentation.swift: Atria/Atria/AtriaDailyStepPresentation.swift changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in AtriaDailyStepPresentation.resolve at line 480. 4 of those changes were fix/bug commits, and the other 37 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaDailyStepPresentation.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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e8d362f467208fcecd5a92e4292a5654743dde987ba1dfb411d9e8e614dc77"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaActivityMonitor.swift: Atria/Atria/AtriaActivityMonitor.swift changed 106 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AtriaActivityWorkoutDetailSheet.body at line 4025. 9 of those changes were fix/bug commits, and the other 97 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaActivityMonitor.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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":4025}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e498bd7c395b2ab15406147f642ebf0e0fad77e9049b6933f4e781fc6195a2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/AtriaWidget/AtriaWidget.swift: Atria/AtriaWidget/AtriaWidget.swift changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in AtriaWidgetMetric.statusText at line 3653. 7 of those changes were fix/bug commits, and the other 43 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/AtriaWidget/AtriaWidget.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":"Atria/AtriaWidget/AtriaWidget.swift"},"region":{"startLine":3653}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7935ad18a268a69f9f4d487bf3796437dcf2d2979ec852fe30573cc8589f6ff"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHealthScreen.swift: Atria/Atria/AtriaHealthScreen.swift changed 116 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AtriaSleepStressCard.body at line 3284. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHealthScreen.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":"Atria/Atria/AtriaHealthScreen.swift"},"region":{"startLine":3284}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ccb7386de97f5c5675d7c4b46065520f5470ae768441b75890f88098838ad3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaApp.swift: Atria/Atria/AtriaApp.swift changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in AtriaApp.scheduleLaunchExportsIfRequested at line 1536. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaApp.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":"Atria/Atria/AtriaApp.swift"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ffbfd9a08f396336e4deb9865357185d2ec8574b93687521731094cda0a5e48"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaVitalsCollectionSections.swift: Atria/Atria/AtriaVitalsCollectionSections.swift changed 106 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AtriaHeartRateAxisChart.baseChart at line 4709. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaVitalsCollectionSections.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":"Atria/Atria/AtriaVitalsCollectionSections.swift"},"region":{"startLine":4709}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc53f898e0210ffee9a31a35a7eb2077b74d4ec5e881133a1014be2ba5461bc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaDiagnosisReport.swift: Atria/Atria/AtriaDiagnosisReport.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in AtriaDiagnosisReport.discrepancies at line 285. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaDiagnosisReport.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":"Atria/Atria/AtriaDiagnosisReport.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"583ce2d11dc368a0b2172d5177be917dbd5b0cf476df01523232632c06d61bd2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaStressMonitor.swift: Atria/Atria/AtriaStressMonitor.swift changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in AtriaHistoricalStressReplay.materialize at line 1665. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaStressMonitor.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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"7505487505a31ec8d2c8bdb3bd96869768d03d66b6f156ed1291635b5aca9929"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift: Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AtriaBLEManager.resilientHistoryDrainSeekUnix at line 2820. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.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":"Atria/Atria/AtriaBLEHistoricalRecoveryPolicy.swift"},"region":{"startLine":2820}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4fc7acc918f0bf05916ff8b7114969422166dc56dc25807daf665ab9d458863"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaAnalytics.swift: Atria/Atria/AtriaAnalytics.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Recovery.estimate at line 1374. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaAnalytics.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":"Atria/Atria/AtriaAnalytics.swift"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ed0d7c5056309271bcd90d8ba070fb246c7d1440b80004ee7023581673a6e4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaLiveWorkoutView.swift: Atria/Atria/AtriaLiveWorkoutView.swift changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AtriaLiveWorkoutView.workoutActionsCard at line 2845. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaLiveWorkoutView.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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2845}}}],"partialFingerprints":{"codehealthFindingId/v1":"65415190542a7a26bccf396908f54d383a4e923e4883e352469477e795e8d6d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalArchiveDurableStore.swift: Atria/Atria/AtriaHistoricalArchiveDurableStore.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in AtriaHistoricalArchiveDurableStore.decodeCanonicalIndexEntry at line 1651. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalArchiveDurableStore.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":"Atria/Atria/AtriaHistoricalArchiveDurableStore.swift"},"region":{"startLine":1651}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6c151d535eb2e94316d48e42f8ea6846776ef50ae7596cc3632d84b198d308"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaSettingsView.swift: Atria/Atria/AtriaSettingsView.swift changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AtriaSettingsView.dataSection at line 1121. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaSettingsView.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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac561ba8c36172d62e38af1183a899331e13907f5e05652ff69ce2b9dcc3231"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaTrendChart.swift: Atria/Atria/AtriaTrendChart.swift changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AtriaTrendChartCard.body at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaTrendChart.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":"Atria/Atria/AtriaTrendChart.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ddb44ceb9d4a6c094b356795acf64ac0c1336dd1186115d1983b14a53fb7f78"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaR10Motion.swift: Atria/Atria/AtriaR10Motion.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in AtriaR10MotionPipeline.accept at line 1829. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaR10Motion.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":"Atria/Atria/AtriaR10Motion.swift"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b436e04e983fa6c0ed8aa3883a48f6f4fa5d8d576a3c5a823e4964add1f0f86"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaSleepWakeResearch.swift: Atria/Atria/AtriaSleepWakeResearch.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in AtriaSleepWakeResearch.stage at line 693. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaSleepWakeResearch.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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"10220c18e5e56c99523261051ef130fc5126511288ddfa88d12f342bd06e9971"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/LocalNotificationScheduler.swift: Atria/Atria/LocalNotificationScheduler.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in LocalNotificationScheduler.schedule at line 1167. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/LocalNotificationScheduler.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":"Atria/Atria/LocalNotificationScheduler.swift"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b339cddee0dd5349cb7e2ad158db546c7a459958abb55266da3133695d746b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaAboutMetricSheet.swift: Atria/Atria/AtriaAboutMetricSheet.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AtriaAboutMetricTrend.make 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaAboutMetricSheet.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":"Atria/Atria/AtriaAboutMetricSheet.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5a03eefabbdf55b34c2bea2cd8bf8606203537fc6118849a88e4fbcd92a96f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalAggregateReader.swift: Atria/Atria/AtriaHistoricalAggregateReader.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in AtriaHistoricalAggregateReader.streamedWholeArchiveDigest at line 269. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalAggregateReader.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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"0008613d3b336a50dafe92dcbd8918657d5daf9432e7d94e489c2f696cc37879"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaLearnedInsights.swift: Atria/Atria/AtriaLearnedInsights.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AtriaLearnedInsight.emphasisLabel at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaLearnedInsights.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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"695c3ae1d38ba569dc40d16af3506424dc7343628545dce575999d9623011b43"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/DailyRollupStore.swift: Atria/Atria/DailyRollupStore.swift changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in DailyRecoveryResolver.summary at line 427. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/DailyRollupStore.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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"662e525da461e5b482aebfe2194a5be43a61869b9847ede88b131fd975ff6e8e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaLiveActivityCoordinator.swift: Atria/Atria/AtriaLiveActivityCoordinator.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AtriaLiveActivityCoordinator.update at line 295. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaLiveActivityCoordinator.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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15a3aef994cd7b0356f33a6a9c2418b3dac173926d980be6719ecdaee8c0ad9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/Metrics.swift: Atria/Atria/Metrics.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in StrainPresentation.resolve at line 258. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/Metrics.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":"Atria/Atria/Metrics.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f362b593dea717d8818cae03c6a1fabb8bf85bbeabd93253b763764d1f7d4b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4MotionTickStepModel.swift: Atria/Atria/AtriaWhoop4MotionTickStepModel.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in AtriaWhoop4GravityCadenceStepModel.estimateQualifiedWindow at line 527. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4MotionTickStepModel.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":"Atria/Atria/AtriaWhoop4MotionTickStepModel.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"27154f332f756118f370a9e7e9dbddc7b4d274dc78ee27dd19592fb8483f956d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaStepsWeekChart.swift: Atria/Atria/AtriaStepsWeekChart.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AtriaStepsWeekChart.body at line 247. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaStepsWeekChart.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":"Atria/Atria/AtriaStepsWeekChart.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff49b3e7a635256e1bfbcd4e955fd7d2a1b56aa40f4487e646b6a93d5df9c215"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift: Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AtriaHistoricalActivityInspectionProofFactory.prepareVerified at line 583. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df9b5b4b00818a291d3358f0e89b116114f569643dda35cec90cbab328298f2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalRetentionTransaction.swift: Atria/Atria/AtriaHistoricalRetentionTransaction.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in AtriaHistoricalRetentionTransaction.commit 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalRetentionTransaction.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":"Atria/Atria/AtriaHistoricalRetentionTransaction.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"46310dbbc944ec4f098829da931916b536f2b78ab3c5c36267fc17c8c8cafc67"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaResearchBundle.swift: Atria/Atria/AtriaResearchBundle.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in AtriaResearchBundleBuilder.makePayload at line 310. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaResearchBundle.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":"Atria/Atria/AtriaResearchBundle.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ab561d756e38fdaf33ea5d2fee99a851bda70f43beb7f3b86f5ad28a811871"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/Dashboard.swift: Atria/Atria/Dashboard.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AtriaDailyStrainTargetStore.resolve at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/Dashboard.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":"Atria/Atria/Dashboard.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5dd8992d259383b0518ee5ae1bce9fb3c5ce9928b8b62fd7f748a0177deb4eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift: Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AtriaWhoop4MotionTickCompactStore.motionTickDayEvidenceProjection at line 2252. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4MotionTickCompactStore.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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2252}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d418cac19c42c36433c3b063540840c9499fc499adaa2733407109e199ee0ed"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaOnboardingHistoryBootstrap.swift: Atria/Atria/AtriaOnboardingHistoryBootstrap.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in AtriaOnboardingHistoryBootstrap.startOrResumeIfPossible at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaOnboardingHistoryBootstrap.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":"Atria/Atria/AtriaOnboardingHistoryBootstrap.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"069c1da8651db51b3551606aa2887de0dc4710ce33c63ff8f534b9ad1c02029f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift: Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaHistoricalConsumerProjectionCoordinator.publishEligibleReceipts at line 257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.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":"Atria/Atria/AtriaHistoricalConsumerProjectionCoordinator.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"956792d83c9bc8833230712b27e12fde6997b2b064a6cb1a8c3c4fca03125319"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift: Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AtriaHistoricalJSONLRecentScanner.scan at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalJSONLRecentScanner.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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0a2077753d60905f23dbb45e792a61bf9e0da53455459403bde9934cc09e19"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift: Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaBLEManager.heartRateContinuityRecoveryDisposition at line 466. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.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":"Atria/Atria/AtriaBLEHeartRateRecoveryPolicy.swift"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd9c2094a7b15d81fbefe6d155b8b99c5b71f3d7dd7f20b6beb9a54d156a8dc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4HistoryDrainState.swift: Atria/Atria/AtriaWhoop4HistoryDrainState.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in AtriaWhoop4HistoryDrainState.receiveFrame at line 336. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4HistoryDrainState.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":"Atria/Atria/AtriaWhoop4HistoryDrainState.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"c126101e96c3ee388c5e89ad840625644666e2b01c9815c2745d18758e4640e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tools/validate_research_corpus.py: tools/validate_research_corpus.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in validate_research_corpus.validate 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- tools/validate_research_corpus.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":"tools/validate_research_corpus.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"055b030baf6c5abcfd63c97f06a9f5ca326073cbecb44383da269ff2d60e610d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift: Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in AtriaHistoricalVerifiedConsumerReader.readSource 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalVerifiedConsumerReader.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":"Atria/Atria/AtriaHistoricalVerifiedConsumerReader.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f8a8efcc98ed3adc17e085c57222e21e11e73eb0d8f61742ffd3a4bb16ec328"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift: Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AtriaWhoop4HistoryArchivePipeline.prepare at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4HistoryArchivePipeline.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":"Atria/Atria/AtriaWhoop4HistoryArchivePipeline.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"31aaaa1b6a66cdb1a471e3d53de08cd6a89c3141cd28ec35fb46e1bae47a83e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift: Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AtriaWhoop4HistoryAdmissionLedger.markCurrentPrefixArchiveDurableWithReceipt at line 427. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.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":"Atria/Atria/AtriaWhoop4HistoryAdmissionLedger.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f99b2709b85463f3cf92ecfdb41d2770c74bd906d2b816bdb7b705abff8996"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaStrapStepLedger.swift: Atria/Atria/AtriaStrapStepLedger.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AtriaStrapStepLedger.isValid at line 351. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaStrapStepLedger.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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"867508faafb31d8c518e8144090cb8af9f869371a96003832193439d964fecb2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift: Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaRecoveredDataRecomputeCoordinator.request at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.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":"Atria/Atria/AtriaRecoveredDataRecomputeCoordinator.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfecf2269393950f20482ed4998724bf42fed4dbd8deb371eab8b7afd4ae5cbb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/ActiveSessionJournal.swift: Atria/Atria/ActiveSessionJournal.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ActiveSessionJournal.saveIncremental at line 441. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/ActiveSessionJournal.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":"Atria/Atria/ActiveSessionJournal.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"6214cff9590e810a5c7397dddacfec31f9f516fe652128b37c7fc51fa1a000fc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift: Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in AtriaHistoricalRawRetirementExecutor.retire at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalRawRetirementExecutor.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":"Atria/Atria/AtriaHistoricalRawRetirementExecutor.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a870d52cea1c8f5b69772554fe9fd06c021d46c4b7c70b44fbe6db5a8a066e20"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaJournalInsights.swift: Atria/Atria/AtriaJournalInsights.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AtriaJournalInsights.insightsCancellable at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaJournalInsights.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":"Atria/Atria/AtriaJournalInsights.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"42101de76d755ffa9fd4e9c1caeaceec08dc803f4cf00161c48a9c986cf77cf2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWorkoutRoute.swift: Atria/Atria/AtriaWorkoutRoute.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaWorkoutRouteRecorder.locationManager at line 474. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWorkoutRoute.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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"662a8b62dbbd700bf84cbb2f1a1bf1974bea2c21405ad75d5b76c18955be91da"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaStrapPowerPolicy.swift: Atria/Atria/AtriaStrapPowerPolicy.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AtriaBLEManager.batteryLevelAcceptanceDecision at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaStrapPowerPolicy.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":"Atria/Atria/AtriaStrapPowerPolicy.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c097c5e6d620f1a56d6a67fd859f94a978cbf28dc11ea1889aa18db49748f10c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaBehaviorImpact.swift: Atria/Atria/AtriaBehaviorImpact.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AtriaBehaviorImpact.summariesCancellable at line 46. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaBehaviorImpact.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":"Atria/Atria/AtriaBehaviorImpact.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e657c33caabcaab00881dd68091e93f983d4deed83b3189aa85674a42223575"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaBackgroundProjectionThrottle.swift: Atria/Atria/AtriaBackgroundProjectionThrottle.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaBackgroundProjectionThrottle.checkpointShouldAbort at line 219. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaBackgroundProjectionThrottle.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":"Atria/Atria/AtriaBackgroundProjectionThrottle.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"557850d42cdfa28d61113071b1777928093b119dc28ff6b61bb900fd8684bc22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tools/strap-mac/r10_capture.py: tools/strap-mac/r10_capture.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Delegate.on_frame at line 248. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- tools/strap-mac/r10_capture.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":"tools/strap-mac/r10_capture.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7fe327ccae0124fdabc26e47aed09aa8829ec1121eb34725eb5106243a52e8c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaStrapSetup.swift: Atria/Atria/AtriaStrapSetup.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Tracker.observe at line 152. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaStrapSetup.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":"Atria/Atria/AtriaStrapSetup.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6040bc36863ed80e859ac0c56ce1a730268557cd4b7a909833c30c9aecb69916"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaWhoop4LiveFlushPlanner.swift: Atria/Atria/AtriaWhoop4LiveFlushPlanner.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AtriaWhoop4LiveFlushPlanner.tick at line 221. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaWhoop4LiveFlushPlanner.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":"Atria/Atria/AtriaWhoop4LiveFlushPlanner.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc02391fdbbf781f696c089e9fee3c28dfe4ee3effb34b1fbb835be10c2bcdc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift: Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AtriaHistoricalGeneratedArtifactGC.prune at line 40. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-16 02:25:31 \u002B05:30\u0027 --until=\u00272026-10-14 02:25:31 \u002B05:30\u0027 --full-history --no-merges -- Atria/Atria/AtriaHistoricalGeneratedArtifactGC.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":"Atria/Atria/AtriaHistoricalGeneratedArtifactGC.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"606f76509f6d0ec63c7885540a5db10b708772ff307a7786b65623c4c3d87c4e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(unbuilt spec): docs/23 \u0022Sleep review morning wording checkpoint\u0022 (July 1, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"75a501cf2cb141827df446dec2dda0e9252c44085ea06159e491071d7f636bce"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(unbuilt spec): reviewProgressRail/reviewProgressStep (the compact \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"a371f8dac0594cc9624f78cf0deb6c16d570b771449c24bcf13e62705c826133"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(unbuilt spec): reviewProgressRail (the compact review path meant to sit \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3a0f2d1640fe7e701075e9ceaeb59202fb18123d5774563ac038fcab285777"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # before sleepReviewNightArc) was never landed -- see TODO above. No ordering \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb2ced805b2076f4c0b162900b997b8885edd8bb44689708d99b0665ba3d1235"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(removed feature): the hapticAlerts glance card was deliberately \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":1590}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af34ab0656da85c46e1c1f915eb77edd568534d38ab5bcafb8b89d3228e143f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(removed feature): the Backfill glance card was dropped along with the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf5d82dca232c7eefd6736a9876ae24de7030689c916ed315e1933128311697"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(superseded by consolidation, ac1a820f): pre-merge there were separate \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fb95fb869319fd0994ca55889de77e1daba4e418aa38c3424f681982678e10"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(removed feature): the Workout glance card was dropped along with the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":1644}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a4239b8324fb986cb5e0010921380e6d6860342bbd4a03a0ec1ba2c4a71728"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(unbuilt spec / superseded): \u0022Health\u0022 and \u0022Strap\u0022 Today glance cards \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":9620}}}],"partialFingerprints":{"codehealthFindingId/v1":"a911795a5e4e1d3003cd09801604caa1330543a9c044f7081c794acc788aa875"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(unbuilt spec): the original IA-6.1 handoff also named \u0022Health\u0022, \u0022Strap\u0022,"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test_handoff_static_checks.py"},"region":{"startLine":10051}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09554b3b040ad044617ffbe5a79901e5a3e58cac1e9bbf7344d0fc25d2b415b"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060Atria/Atria.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3988f695efb39adb90fab034b99489e8aa31779ad730fc67cf8b10952318af"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060fallbackHrv\u0060 spells \u0060Hrv\u0060 where 154 names in the project spell it \u0060HRV\u0060: 154 of 155 names in project repository spell the token \u0060HRV\u0060 (154 of 155; unit: names in project repository containing \u0060HRV\u0060). Peers: Estimate.usesHRV (Atria/Atria/AtriaAnalytics.swift:1348); Recovery.limitedEvidenceEstimateWithoutSleepOrHRV (Atria/Atria/AtriaAnalytics.swift:1616); Recovery.limitedEvidenceEstimateWithoutHRV (Atria/Atria/AtriaAnalytics.swift:1672); CalibrationExamples.recoveryHRV (Atria/Atria/AtriaAnalytics.swift:2417); CalibrationExamples.overnightPreferredHRVBaseline (Atria/Atria/AtriaAnalytics.swift:2559). Rename to \u0060fallbackHRV\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13429}}}],"partialFingerprints":{"codehealthFindingId/v1":"553335dfcee5f75a658b2fbb6d8ade7c6b993c7b6730e817e2e43ad5c0ed818c"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060lastGyroCsvKey\u0060 spells \u0060Csv\u0060 where 36 names in the project spell it \u0060CSV\u0060: 36 of 37 names in project repository spell the token \u0060CSV\u0060 (36 of 37; unit: names in project repository containing \u0060CSV\u0060). Peers: AtriaBLEManager.exportCSV (Atria/Atria/AtriaBLEManager.swift:30770); AtriaBLEManager.saveCaptureCSV (Atria/Atria/AtriaBLEManager.swift:30782); AtriaBLEManager.saveCaptureCSV (Atria/Atria/AtriaBLEManager.swift:30789); AtriaTodayMetric.glanceGridSize(sizeOverridesCSV) (Atria/Atria/AtriaOverviewSections.swift:1126); AtriaTodayMetric.glanceColumnSpan(sizeOverridesCSV) (Atria/Atria/AtriaOverviewSections.swift:1136). Rename to \u0060lastGyroCSVKey\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaWhoop4CompactIMU.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec67ec335e810fe6272c9dd6126d659af023016bb87e126ce0a2a6175ac94306"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060Atria\u0060 (321023 LoC, 2311 module-visible types across 3 directories) overshoots its size bounds. 2 of 3 build unit(s) (SwiftPM, Xcode, checkout) overshoot their size bounds, lowering Project Cohesion to 0.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":"Atria/Atria.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea60755cee2a709bfb321a1901b17d9d4a5df8afb114d1b76dc9cdf15ed633d"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (24422 LoC, 130 module-visible types across 4 directories) overshoots its size bounds. 2 of 3 build unit(s) (SwiftPM, Xcode, checkout) overshoot their size bounds, lowering Project Cohesion to 0.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":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6cd543a71a70e38d7703a5797335abd4d6e2075eb04db33c0622ef6810fb27e8"},"properties":{"commitSha":"cbe64e6b6d0788d80fac76fe3e33ac744fb0ac30"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d60df7e108c7a8de7b0d1f76519ce30b761d84933407109f031012b8617c5e4a"},"properties":{"commitSha":"13fb5a02ea02871d2cf91964cd9ec9f868c07468"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"381b6a220a30df893745ffdacef543bed6872fe361cb0320a843817ae845766c"},"properties":{"commitSha":"13fb5a02ea02871d2cf91964cd9ec9f868c07468"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ae62639fde39610622f3ae5149a70c836c11283f4daf33190bf446336cbe563b"},"properties":{"commitSha":"13fb5a02ea02871d2cf91964cd9ec9f868c07468"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4f16fbd05bde1a6871ebf9d7c416ee7fa0bf441de85356f942f7960b667dbf65"},"properties":{"commitSha":"387cb979938cab0c8b03a92dfb6f00a3f1561b54"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6e2a71c440ce7ed5ada89a404bf0c9b6f3c9ddd5e482c79ff53b8bf88e84f3dc"},"properties":{"commitSha":"387cb979938cab0c8b03a92dfb6f00a3f1561b54"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3bd865d0b619456dc25ea2210f5cb4f6feb7e934a7392ff1d627862f14ed8a84"},"properties":{"commitSha":"6e63fd08b5dc524a1a79c51ed36c196c7de8a2e1"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fa414f2c718e0a9404157ef37c509a105aa3ae093e737713b93e554bfa80cef7"},"properties":{"commitSha":"d346bb51e8537987c5899fd49dccbb1554a552b5"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"133952da77244f72d4219fb88fa4b836e33bc1bcd45853cdd01b7a3f3193e89a"},"properties":{"commitSha":"4e13eedf6a2e0687fa9faa42cb9766a457b231d8"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d3b0f94cfe78bcf5507cfe9dd03a29836135f54635cdaf5f039ea497c601e7f9"},"properties":{"commitSha":"dc3f1d4084f33faaf8528086efaa92a60b7eb10d"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5fb8d0515d304ab5b186f861f1ef04507cf1600d741624895ec33aa731cb698c"},"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":"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":"df1c8438e4bbc0d7df2daa8ff61cc80f428c1dd3f2b70c92604106911666891a"},"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":"D35","level":"warning","message":{"text":"Change coupling: AtriaCustomizeSheet.swift \u2194 AtriaTodayScreen.swift: \u0060Atria/Atria/AtriaCustomizeSheet.swift\u0060 and \u0060Atria/Atria/AtriaTodayScreen.swift\u0060 change together 72% of the time (13 of the 18 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 13 shared commits counted here, the most recent 3 are \u00609b5ca707\u0060 Colour only for data and state: neutral Liquid Glass everywhere else; \u0060c9ad66b0\u0060 UI pass: glass cards, no nested card surfaces, bigger numbers, 44pt taps; \u0060135393be\u0060 Stop cloning RHR as a Highlights strip under the glass tab. \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaCustomizeSheet.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a51e8999bccf5f600a03d31ecb2e553f03e5bf2f014b0b7f506cfcdbe6f32a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AtriaAssistantScreen.swift \u2194 AtriaOverviewSections.swift: \u0060Atria/Atria/AtriaAssistantScreen.swift\u0060 and \u0060Atria/Atria/AtriaOverviewSections.swift\u0060 change together 64% of the time (7 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 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 7 shared commits counted here, the most recent 3 are \u0060ef4a732f\u0060 Add morning insights, sync health, Shortcuts and a CI static gate; \u0060c9ad66b0\u0060 UI pass: glass cards, no nested card surfaces, bigger numbers, 44pt taps; \u00607e048d96\u0060 One strain number on the weekly report too \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaAssistantScreen.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f0d5644a0e7dc0e5cf41c55ffabd807cc4b3c45af28f37d00a0a5757864f2f"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AtriaHeroConnectionSections.swift \u2194 AtriaOverviewSections.swift: \u0060Atria/Atria/AtriaHeroConnectionSections.swift\u0060 and \u0060Atria/Atria/AtriaOverviewSections.swift\u0060 change together 54% of the time (28 of the 52 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 28 shared commits counted here, the most recent 3 are \u0060c9ad66b0\u0060 UI pass: glass cards, no nested card surfaces, bigger numbers, 44pt taps; \u00608e6ca405\u0060 Remove the strain lower-bound marker; finish the dead-view cascade; \u00604ecc4578\u0060 Remove 51 more unreachable View types (2,932 lines) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Atria/Atria/AtriaHeroConnectionSections.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a151bfcf75c65c3e93cfb562ca9523b9829f843ee4e7b15ece6a2b9d747e50e4"}},{"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":"7f9899b397070234ff3c663f07d41588a3040c045a6b02f6c273cb9877ac50ce"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Most of the production code is in directories of its own, but 35 application file(s) sit at the repository root beside the build and tooling files (\u0060enumerate.py\u0060, \u0060listen.py\u0060, \u0060prepare_reference_rr.py\u0060, \u0060probe.py\u0060, \u0060scan.py\u0060 and 30 more)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"P1","level":"note","message":{"text":"CI build step not evidenced: A CI pipeline exists but no build step was matched \u2014 changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"251015acef1a259fcc13b7c60660cc8917ccb3ae8056cb5165ae03312dd586e8"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"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 1 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/static-gate.yml"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060best is None or ( current[\u0022overlap\u0022], -current[\u0022separation\u0022], current[\u0022end\u0022], ) \u003E ( best[\u0022overlap\u0022], -best[\u0022separation\u0022], best[\u0022end\u0022], )\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_archive.py, tools/analyze_historical_usability.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8a8ed05ae472f8650ee22ae1a308820ad7160d9eb28c06d24a93f24bee2bea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(data, dict) and isinstance(data.get(\u0022sessions\u0022), list)\u0060 appears character-identically in 3 files \u2014 tools/analyze_historical_archive.py, tools/analyze_historical_usability.py, tools/analyze_sleep_store.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"661d84d1be2fde8afd0f17c2bb1fd4b1a6f872a4fea2368b41861493638f0723"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(row.get(\u0022clockCorrectedUnix7\u0022), int) and int(row[\u0022clockCorrectedUnix7\u0022]) \u003E 0\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_archive.py, tools/analyze_sleep_store.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7c5b99149b8fe880dfe7f729c7c8a610fddd5cedae27b89e2dba024cdd0983"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(row.get(\u0022unix7\u0022), int) and int(row[\u0022unix7\u0022]) \u003E 0\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_archive.py, tools/analyze_sleep_store.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"118a9d906107f039456666095239e5401fee348b7abbd4ce1b7fa70424272811"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(value, bool) or not isinstance(value, (int, float))\u0060 appears character-identically in 3 files \u2014 tools/verify_gate2_release_artifacts.py, tools/verify_hist1_acceptance.py, tools/verify_hist1_resumable_recovery.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/verify_gate2_release_artifacts.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbcf165a18b65558e605081af7acb0f8ce8bcb34cff5ce58a143054a0d8f58b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(value, bool) or not isinstance(value, int)\u0060 appears character-identically in 3 files \u2014 tools/build_physical_window_manifests.py, tools/evaluate_activity_detection.py, tools/validate_research_corpus.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/build_physical_window_manifests.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"36bbfd13e0d8ec54b623fb9b98ccce01cdad7596ec0766ad8b859331ba144e58"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(self.ready) == 5 and self.tx is not None and not self.started\u0060 appears character-identically in 2 files \u2014 tools/strap-mac/ff_sweep.py, tools/strap-mac/r10r11_probe.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/ff_sweep.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"d282f3b67a341098010e2045e5cefd8374aa2bcaf3da407d9b4f0f34c85a5a63"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(value) == 152 and value[:5].hex() == \u0022aa9400b533\u0022\u0060 appears character-identically in 2 files \u2014 tools/strap-mac/pairing_6a.py, tools/strap-mac/pairing_window.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/strap-mac/pairing_6a.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"8163df3b2d7b90a7b44f7565c843c2e411644f6fcfc23c87c490a82f2b8f8499"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lower.endswith(\u0022_ms\u0022) or \u0022elapsed_ms\u0022 in lower or \u0022timestamp_ms\u0022 in lower\u0060 appears character-identically in 3 files \u2014 tools/preflight_reference_csv.py, tools/validate_hr_reference.py, tools/validate_hrv_reference.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/preflight_reference_csv.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0f388b08da461bc09714302b47a802709da8bd3ba9c4bd9d11842891ab1b16"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not historical_times or not realtime_unix\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_2f.py, tools/analyze_historical_usability.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_2f.py"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"29dd23e73d0b7fb9b5444e73c65acdcd48b904ba1720ca0ac030f74f9e9539c1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(activity, str) or activity not in SUPPORTED_ACTIVITIES\u0060 appears character-identically in 2 files \u2014 tools/build_physical_window_manifests.py, tools/evaluate_activity_detection.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/build_physical_window_manifests.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"b23758402212e547d9be78da3743406796b73ed642bb912ed25fc23f6754f828"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(row, dict) or not is_validated_metric_row(row, layouts)\u0060 appears character-identically in 2 files \u2014 tools/verify_hist1_acceptance.py, tools/verify_hist1_resumable_recovery.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/verify_hist1_acceptance.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dce135ab88703b63246ad4bd2045eae3176c5bceaefbab9101d6c7492af24e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(value, str) or not value.endswith(\u0022Z\u0022)\u0060 appears character-identically in 2 files \u2014 tools/audit_handoff_status.py, tools/verify_physical_qualification.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/audit_handoff_status.py"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7c65ed3e9b00250575249f9752973668f404c06627245c515c9c56fb3160e6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060previous is not None and abs(value - previous) / previous \u003E 0.20\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_2f.py, tools/analyze_live_rr_windows.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_2f.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac194ac18f815dd1b0bcbd613a1b4258bbd9121778ffa22405b0259c123cea1a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060previous_end is not None and start_ms \u003C previous_end\u0060 appears character-identically in 2 files \u2014 tools/build_physical_window_manifests.py, tools/evaluate_activity_detection.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/build_physical_window_manifests.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"1792142116f99a92b3c5a3d237a22dd22fa8c45d631c1105819686f9563b149f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060result \u003C 0 or abs(result * 10 - round(result * 10)) \u003E 0.000_001\u0060 appears character-identically in 4 files \u2014 tools/evaluate_activity_classifier.py, tools/evaluate_overnight_load_model.py, tools/evaluate_recovery_model.py, tools/evaluate_sensor_decoder.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/evaluate_activity_classifier.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b2cdca71960ba0509ac3c4551fc6031610797ca306f444f58afbba89b19a79"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060same_file and not args.allow_self_compare\u0060 appears character-identically in 2 files \u2014 tools/validate_hr_reference.py, tools/validate_hrv_reference.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/validate_hr_reference.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fbb47ac4b9c0b0135de4c1ec6e419f720584669d644ac88e226e8ace29d5150"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060timestamp is None or not isinstance(identity, str) or not identity\u0060 appears character-identically in 2 files \u2014 tools/verify_hist1_acceptance.py, tools/verify_hist1_resumable_recovery.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/verify_hist1_acceptance.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"1128bb64f2f99e9d43b61a265975e585050f693b288e9ce59336c9f9779599c7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value is None or not math.isfinite(value)\u0060 appears character-identically in 2 files \u2014 tools/analyze_historical_archive.py, tools/analyze_historical_usability.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tools/analyze_historical_archive.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"33476f5a84dfdb4744aa6a29e1c607c6b881d603bb0a7d92a13fbe4343bd33d7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!value.isEmpty \u0026\u0026 URL(fileURLWithPath: value).lastPathComponent == value \u0026\u0026 value != \u0022.\u0022 \u0026\u0026 value != \u0022..\u0022\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHistoricalAggregateReader.swift, Atria/Atria/AtriaHistoricalConsumerReceiptLedger.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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7d2896c1c421e63b691f53f46628e2d9a6f3beb90e5bc365e1d408777bd440"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!value.isEmpty \u0026\u0026 value == URL(fileURLWithPath: value).lastPathComponent\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift, Atria/Atria/AtriaHistoricalVerifiedActivityConsumerStore.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":"Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6aab95707a982100a6b7d93899e2b8efd11b54e177f541d262c7d2438f14d75"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.end \u003E interval.start \u0026\u0026 $0.start \u003C interval.end\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaClosedCycleStrainStore.swift, Atria/Atria/AtriaHomeView.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":"Atria/Atria/AtriaClosedCycleStrainStore.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"83422c3ac5a0c01063883090a9e8344ef6c0dfe0dea790ed3154d890820238e3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.end \u003E window.start \u0026\u0026 $0.start \u003C window.end\u0060 appears character-identically in 3 files \u2014 Atria/Atria/AtriaActivityMonitor.swift, Atria/Atria/AtriaHealthScreen.swift, Atria/Atria/AtriaTodayScreen.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":"Atria/Atria/AtriaActivityMonitor.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"62ae52d6388db610f031a90c0960ceb64d1990c15537926718084dcf35fc6b0f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.motionContext.qualified \u0026\u0026 $0.motionContext.kind == .activity\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaStressDetailView.swift, Atria/Atria/AtriaVitalsCollectionSections.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":"Atria/Atria/AtriaStressDetailView.swift"},"region":{"startLine":1492}}}],"partialFingerprints":{"codehealthFindingId/v1":"83897dc68a8e9e8a48780efd145cb6563485d96dd1ab5d34959b4b7fe802b6e3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.state == .missing \u0026\u0026 $0.knownCoverageSeconds \u003E 0\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaDailyStepPresentation.swift, Atria/Atria/AtriaWhoop4MotionTickDailyStore.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":"Atria/Atria/AtriaDailyStepPresentation.swift"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"756838dae4dec5977386ab4aca047d7c7fdd21c9bc4ea8d061b47ca154fc4f7c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.timestamp \u003E= start \u0026\u0026 $0.timestamp \u003C= end\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaWorkoutRoute.swift, tools/verify_whoop4_autonomous_step_corpus.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":"Atria/Atria/AtriaWorkoutRoute.swift"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6744f338df9a374af225e77a90194367aecea2abb9d7d0c083974446457fa69e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060displayCivilDayKeyMatchesCurrentDay \u0026\u0026 displayTimeZoneMatchesCurrentCalendar\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaWidgetDayFence.swift, Atria/AtriaWidget/AtriaWidget.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":"Atria/Atria/AtriaWidgetDayFence.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7259c5d69e442cd327a71dd8aa3a4026006d3f3374223c4fa714c593653441"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060incomingLevel \u003C= 10 || incomingLevel \u003E= 100\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaBLEBatteryTransportPolicy.swift, Atria/Atria/AtriaStrapPowerPolicy.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":"Atria/Atria/AtriaBLEBatteryTransportPolicy.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0092a2944758a09ec78dbaa1f796d5fe49728b19c0244de78848e9d3b45bf5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060interval.start.timeIntervalSince1970.isFinite \u0026\u0026 interval.end.timeIntervalSince1970.isFinite \u0026\u0026 interval.end \u003E= interval.start \u0026\u0026 interval.r\u2026\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHistoricalActivityProjection.swift, Atria/Atria/AtriaHistoricalSleepWorkoutProjections.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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"d34bb42bb0081caaaa2bbd1b10384f03681d2cc0ed8bce71eec059feaca60fdf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mean \u003E= 0.85 \u0026\u0026 mean \u003C= 1.15 \u0026\u0026 stillness \u003E= 0.60\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaIMUDecoder.swift, Atria/Atria/AtriaR10Motion.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":"Atria/Atria/AtriaIMUDecoder.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f41e42aa2b12d7780383050e59cb3475e3f8013ac3d669fdff99763ef81c5ea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060physiologicalCycle.boundaryKind == .mainSleep \u0026\u0026 calendar.isDate($0.day, inSameDayAs: physiologicalCycle.start) \u0026\u0026 $0.recovery != nil\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHomeView.swift, Atria/Atria/LocalNotificationScheduler.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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":12912}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbc57583b9093cfb08cc7e304bdeb9f39b640616c7429a1eede0f202abe1cda4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060powerOnMarkers.silentStreamRebuild || silentStreamRebuild\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaBLECallbackEpochFence.swift, Atria/Atria/AtriaBLECentralEventFence.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":"Atria/Atria/AtriaBLECallbackEpochFence.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd26808e4d7cadc1292054abc5a3b90ef11617142119bbb7a179a1fa4192617"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060powerOnMarkers.standingConnect || standingConnect\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaBLECallbackEpochFence.swift, Atria/Atria/AtriaBLECentralEventFence.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":"Atria/Atria/AtriaBLECallbackEpochFence.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7f33ea35a2a7438568f7891d17237e1d2985797108f0c5e337e81b85700c4ab"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060settings.authorizationStatus == .authorized || settings.authorizationStatus == .provisional || settings.authorizationStatus == .ephemeral\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaEventNotificationScheduler.swift, Atria/Atria/LocalNotificationScheduler.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":"Atria/Atria/AtriaEventNotificationScheduler.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb6b83d93cf68b0a67be5ed865257a4a48c4fdf35d7143c72add2ffe8cfd69f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status == .connecting || status == .scanning\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHomeView.swift, Atria/Atria/AtriaOverviewSections.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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":9162}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2bf8114851c19fd719fc01ccfa1cd30266c1cf44ad81920897e31d8cbc89dc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060store.hasLoadedSavedSessions \u0026\u0026 store.trainingLoadSummaryIsPrepared\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHomeView.swift, Atria/Atria/LocalNotificationScheduler.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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":13047}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04e591d5b717a1827d71b04b3880310713597b5704b12b181e1eae9913cc234"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060timestamp \u003C epochEnd || (isFinalEpoch \u0026\u0026 timestamp == epochEnd)\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaRecoveredMotionProjection.swift, Atria/Atria/AtriaWhoop4MotionTickCompactStore.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":"Atria/Atria/AtriaRecoveredMotionProjection.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"66803f8c5e19d8d21c36266f62805f1424bcf5cfaa3f62e90aabd2faa9373738"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value.count == 64 \u0026\u0026 value.unicodeScalars.allSatisfy( CharacterSet(charactersIn: \u00220123456789abcdef\u0022).contains )\u0060 appears character-identically in 6 files \u2014 Atria/Atria/AtriaColdSessionFacts.swift, Atria/Atria/AtriaColdSessionStore.swift, Atria/Atria/AtriaFullFidelityColdSessionStore.swift, Atria/Atria/AtriaHistoricalCanonicalConsumerApplicationStore.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":"Atria/Atria/AtriaColdSessionFacts.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"def23c66a43363b876f3efcd77f5a80533f570e7e63561defdf49c2d7ade61b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value.count == 64 \u0026\u0026 value.unicodeScalars.allSatisfy(hex.contains)\u0060 appears character-identically in 2 files \u2014 Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift, Atria/Atria/AtriaHistoricalFullScanCompletionStore.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":"Atria/Atria/AtriaHistoricalActivityInspectionProofFactory.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"add6501b8a586c3dd48acc50cced9cd0614f4ee903dcef0229c53ac6568e4311"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value.count == 64 \u0026\u0026 value.unicodeScalars.allSatisfy(lowercaseHex.contains)\u0060 appears character-identically in 3 files \u2014 Atria/Atria/AtriaHistoricalActivityProjection.swift, Atria/Atria/AtriaHistoricalConsumerReceiptLedger.swift, Atria/Atria/AtriaHistoricalDailyConsumerProjection.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":"Atria/Atria/AtriaHistoricalActivityProjection.swift"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f94f69a8a277a16e4b9b5ac10938fb78b1b9bf7093b46d180b3e2d688d7dcb"}},{"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":"listen.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d288afc73145147cb634a177c2ea4ca8bbd4cc8d1045beca5076999493dfff85"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\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":"symbolicate_atria_reports.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d620dc48d9d584c11ada9b5a07e1e7c383ad412561818c95017287ee381755e"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":19060}}}],"partialFingerprints":{"codehealthFindingId/v1":"5545f15a7f2f97d3d93d6b73a31e4f0a0f1ec34972b6d9c32eb8f9c3ebf397f8"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":30799}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8ee9ceb71e5a5faff00234df80f4f2147a983c949639691094c59af6117174"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":42975}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0a4f34db7cf7ae4fac1b8257c68aeaa69a5001770bc0a57cd93ff5baec6e41"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43458}}}],"partialFingerprints":{"codehealthFindingId/v1":"def61593c7cd72039f87d722dcb1c9cc41e509ed36a631058d15d313519c8642"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":43566}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4d83f0c51f33186e6a1bb48225c6409414cd3d54da28200d8c796787959cf4"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45320}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed10c636bf212016a18ce5e11cacdc769fb1d26eafd3f713c6aeea39612cb4f6"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45358}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9283076e6951cc2207305e20d6bc242e6ac915e8b7a6f524e434d4f89727b3"}},{"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":"Atria/Atria/AtriaBLEManager.swift"},"region":{"startLine":45375}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa185daad3f10772d883a98984daabc5432e0dc7fad9d9ec8027788b0b57df2"}},{"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":"Atria/Atria/AtriaBreathworkSession.swift"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa3c4acf50ddba2ae82a5d4554c73101719b5bd840da9a13c51109879b6dc92"}},{"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":"Atria/Atria/AtriaFullFidelityColdSessionStore.swift"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"6768110bb17fa46d42fd3c43a14c7fb5e3b262b0f4d39bf5e4a2c954e00292a3"}},{"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":"Atria/Atria/AtriaGeneratedArtifactRetention.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb025a025fc10e5452dfcc55b616f7f77f40297bf1f0f699d386c5c5abd8f8b"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"79c9b1a34e04a208868f414ca9c47f3d22ceca7c4fcaa243f282aa76ce6ca1ae"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bb5dcbf7773738914f54a056746941e30f8e8d62cd7679cb43251f6f2dabab2"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2544622af21d01f0edd968fd7edcfe301576083b65feccaeddab81b408fac71"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"590e3ffab3999183e7b306a2cdb708578d0a47e500e4b47106032230846bcf87"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d0a2db92fdb4aefbe60ba4a1fdbdb32710a0e09bfd1b6fac846d3849c6757f"}},{"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":"Atria/Atria/AtriaHistoricalAggregateReader.swift"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"012f7ce28f1beb911c96ce416374daab7cb115e039670a831dcb35c3b9ffa4d0"}},{"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":"Atria/Atria/AtriaHistoricalArchiveCatalog.swift"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"765af381275f4475ecabc4c802683f73464ffbe986f4f9cdcaacf86528137dc5"}},{"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":"Atria/Atria/AtriaHistoricalGapLedger.swift"},"region":{"startLine":1261}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e735e5979dec935648f7d7907dd0b2694e848d7426e654523cc9c33ffaf14c4"}},{"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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8222d0f6c6e2edd26cd1ac23aa33ff9b80aa0d4d8dea68d13d9125a6947079"}},{"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":"Atria/Atria/AtriaHistoricalJSONLRecentScanner.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"39da8473064b547e0cdeeacfd7c4f891754692218e57a35c08a118329903bdca"}},{"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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":2850}}}],"partialFingerprints":{"codehealthFindingId/v1":"762c16e7d04f498eefaba60159753d9c79810658132f826b86440f3b79548bbf"}},{"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":"Atria/Atria/AtriaHomeView.swift"},"region":{"startLine":6405}}}],"partialFingerprints":{"codehealthFindingId/v1":"b380812ef1a02156f901431a87e05a33294c4757a955f51034030c850e852587"}},{"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":"Atria/Atria/AtriaIMUDiagnosticTransport.swift"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cccf699b04919154bbf3740511ec57f50297a07f4ba81bb44ef8e9a25cb3f6"}},{"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":"Atria/Atria/AtriaLearnedInsights.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6c8b6d6f9ed9a461ccc9eb111b192572dd956050ed9808c0c84d15888dbffa"}},{"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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2caed6761853df0ac4d272539a3787ec115833fda9b33f1176ded8058f3e37"}},{"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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f17a410d35516db3cd3ac216caaae7d098a4c4b64f12feef2243079b388c6b"}},{"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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":1504}}}],"partialFingerprints":{"codehealthFindingId/v1":"f985a146d8867fdca146455a2a72b14434f3ea7993f65817b350233e5cac6c52"}},{"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":"Atria/Atria/AtriaLiveWorkoutView.swift"},"region":{"startLine":2289}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff36acacc7ca32ee8dbf1d8b27a9bb85873d784dfb1e7c9cf07c19c21ba9166"}},{"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":"Atria/Atria/AtriaMorningCheckIn.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d1f29c4e6d233b7a0d6e32891aa38c61b6e524b8dc8e3eac0aa751a853541b"}},{"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":"Atria/Atria/AtriaRecoveredDataPublicationFence.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b7f23d3f81c5df95923ee9cf609c363673a301f01a37cfeb5d3574e6b17f305"}},{"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":"Atria/Atria/AtriaRelativeSkinNightStore.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5029f76eb19c7c83caa9c5b42a579d922ced1a2c10627a0e6cf0975a6aa98e5"}},{"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":"Atria/Atria/AtriaRestoreTransaction.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"d33e6624378840cc10c77219888f74cf7058774c0b9e648cb21444863cdad3b7"}},{"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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80c22198b726cc494a2eac62298aada8d078d7deb0f561907955eddcc21ea1d"}},{"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":"Atria/Atria/AtriaStrapStepLedger.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc5aec8401f2f4103b7620925fe8af03cb47bb0ba7147125518ce13067fb8aa"}},{"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":"Atria/Atria/AtriaStressMonitor.swift"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"50254adfe1e1e8dbbd8487d0d6bd074e57d29fd8ac41ecf64468264ec4a59728"}},{"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":"Atria/Atria/AtriaTodayScreen.swift"},"region":{"startLine":4089}}}],"partialFingerprints":{"codehealthFindingId/v1":"9658a59a9d57101c753abf0ab2676e153a284815f11899345866c1fbd264e4a7"}},{"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":"Atria/Atria/AtriaWhoop4HistoricalIngressSpool.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8faaca3c5e786fa8619590439006fc0715b5e4e4652ce30182c9d6b0ce6a93"}},{"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":"Atria/Atria/AtriaWhoop4MotionTickCompactStore.swift"},"region":{"startLine":2720}}}],"partialFingerprints":{"codehealthFindingId/v1":"c00696aaa2d36eb3c3513595076b467fb55e80e6d22bcc2967128b82bb86e751"}},{"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":"Atria/Atria/AtriaWorkoutRuntime.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e5fcd7758c0679e5865e850a26c222702b9643afa2d899d0a3b938f3483e15"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4777}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a7ea347c46a6f2b3b4b98f04f0ae2a9c08dd68ee5ae40e897aa1d0ea90b6d5"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4792}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c6fd2501581ddb513500776d47de35e5905a319ac2ba50711cc079697e089a"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4859}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3cf5e276c7298451f6422197b3de358c02b6f61a7351736c3d711168903a3f9"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":4915}}}],"partialFingerprints":{"codehealthFindingId/v1":"a597a64d6b12870f377d29d383f091070ab6a610feab80620e18f02d5b411c3c"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":6256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb07d86dffa360193507d7f3292002f0182aaf9e2907c05f1113f14db7f21ec"}},{"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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":8274}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5385669d48ba73ca5589cd33eadfb4f75960621a2acf0e2b9b32788b88e1e9"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":19343}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8d7400458e03e768fe1d938f1baddba6d108bb761961b73357808c621a282a"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37743}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1f6f420e72fe0bebeb8e8ebdd6bb627afef5cdcc792bc49dade49d8f4b70b2"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":38640}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfd9160cfcd8c79f9485626cf2f1d38c5f7df0a4c38690e708261e1010ee284"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":44795}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e54a4ed2fd0920911629e436c9cf8f4393d2ddab256f9eecff6b965e8ee1f49"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":46648}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71f0b0aaae12f0189566abd9d322d84df7ed853ee795f2cd6df84e4919f1d2d"}},{"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":"Atria/Atria/Sessions.swift"},"region":{"startLine":47113}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db733e9b7f366ecc6f5b07a2c699840ac36c93e2de131284256f1d31ca13038"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060parse_hex\u0060 returns \u0060b\u0027\u0027\u0060 when \u0060ValueError\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. 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":"tools/analyze_sensor_research_probe.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"e91d17747497eadcef7a06cced3e09a8eaf556525db42b3bb50082a1a5f42c48"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060decoded_history_identity\u0060 returns \u0060\u0027\u0027\u0060 when \u0060ValueError\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. 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":"tools/analyze_whoop4_gravity_walk.py"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d43107f961cc82fa6c9f9003fc34b904dae494893a83d6cba88791f1ae5f9c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060load_running_metadata\u0060 returns \u0060{}\u0060 when \u0060(OSError, ValueError, json.JSONDecodeError)\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. 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":"tools/audit_handoff_status.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bb700df7289c918adecb12f42b8a8bf7b4b0e05ede58aad32a8a6f2bcdfc509"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060numeric\u0060 returns \u00600.0\u0060 when \u0060ValueError\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. 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":"tools/audit_realtime_ble_validation.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2975fbc53b90f8183f05126940458f25767e3b94a24e2e8a053d34c7e52af5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060positive_int\u0060 returns \u00600\u0060 when \u0060ValueError\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. 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":"tools/verify_hist1_acceptance.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c63607113c507a2439a55bd347fc56159277e5a688e65485d7259cac81f07b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060numberTokens\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":"Atria/Atria/AtriaAICoach.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92ca54d692153de2480e0068108470d3a879371591fcf49bfca5ae384ec2ee9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060consumeClaimedFiles\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":"Atria/Atria/AtriaLiveActivityCoordinator.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"507d4219a16f73283fd3149cb925ca7b4436a75ad17341149ba0dedcdf25e016"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060contents\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":"Atria/Atria/AtriaReconnectLeaseTrail.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee794b8d1636f8dc64a34955b7c0d0f77f6957b8457bd849b9831c13eb40ff7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060size\u0060 (in \u0060storageFootprint\u0060) turns every thrown error into \u00600\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":"Atria/Atria/AtriaSettingsView.swift"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a0002a261b8b93b61d002d9a7538dddbee40f7f3367cfb0af6d2d360e52c4c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060stageSegments\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":"Atria/Atria/AtriaSleepWakeResearch.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcd8b261501cd001235c8ce2dc07aa6ab1e5c49012411ad0a81b6a0fd8410ec"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060importArchivedCompactIMUJSONL\u0060 turns every thrown error into \u00600\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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e2c30e8caa5d36d4c85b2f9d6044961559e96f52bfed95db040238e602eb9e3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060materializeDecodedCompactIMUSamplesFromArchive\u0060 turns every thrown error into \u00600\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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"05ab159d3af48dcb33ab75b9fa91bbd478538319a6218a3e9251ebb4579a39da"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060lastNotifyCompactIMUDeviceTimestamps\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":"Atria/Atria/AtriaStrapCalibrationArchive.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6ed6c1d85e7edeb2b385292f6a329a701d29e378325253a212e67b3d3e5097"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadRecoverySummaries\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":"Atria/Atria/DailyRollupStore.swift"},"region":{"startLine":1169}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6b83ae3883607cb8d0d905879a9a8cb3f97f95ffddeba33a7bb48b069272a6"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060legacyRotatedSegmentFileURLs\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":"Atria/Atria/HistoricalArchive.swift"},"region":{"startLine":7855}}}],"partialFingerprints":{"codehealthFindingId/v1":"6818fd1402085a215fc07abf2c377d7c6e3d5ca6baea022efb0f9dbacdebe865"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060coldSessionIndexForClosedCycles\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13852}}}],"partialFingerprints":{"codehealthFindingId/v1":"11014a621b34f725e85daff5dab85fd9d2f2a0e6c6ce3fc0706501ea6ceeb84b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060coldSessionsForClosedCycle\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":13857}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef5ee14123f6975b9bcdfe2dbe66043cf45797caaa294d11245d69a2a89c9bc6"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060makeNapReviewNightsForCache\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":37525}}}],"partialFingerprints":{"codehealthFindingId/v1":"945799f13b6fd03d38ba5269db37fe263338e0a57c5ebd1d195b6a8f8f2a5871"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060sleepStageResearchSegments\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":43740}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53c0746ddd66274531232a837c17767d72d183cda4e15854dc961a747744356"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060aggregateSleepCandidates\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":49992}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d14c04313eb24923e747833fc206de6924ad2f386ec0ed03c745bf58299be6e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060resumedSleepReviewCandidates\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":"Atria/Atria/Sessions.swift"},"region":{"startLine":51612}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eff87ae913a8ffa3b312ad3ce1f368a05e9f880ba1d8dbc67c728f4b6652eb7"}}],"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-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-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"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-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-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-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":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"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/"}]},{"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-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"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"}]}],"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":15,"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."]}]}