{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"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":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED1","name":"Handler temporal coupling","shortDescription":{"text":"Handler temporal coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/ED1"},{"id":"ED4","name":"Outbox / dual-write","shortDescription":{"text":"Outbox / dual-write"},"helpUri":"https://codehealth.canine.dev/dimensions/ED4"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"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":"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":"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":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"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":"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":"ChatMessageFormatter.formatMessageAsText (cyclomatic 95): ChatMessageFormatter.formatMessageAsText has cyclomatic complexity 95 (threshold 15). Of this number, 83 points are the body\u0027s own statements and 12 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dd5fb96d9d88cf88c98afbb7dabb9e9bb92d1aa121435e6464a172d3edc784"}},{"ruleId":"D1","level":"warning","message":{"text":"MimeType.matches (cyclomatic 60): MimeType.matches has cyclomatic complexity 60 (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":"bitchat/Services/BLE/MimeType.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f6267987ca46d46c24c51f000cf09b7f48f22c83e49673e4651d2d268a82fd"}},{"ruleId":"D1","level":"warning","message":{"text":"NoiseSessionManager.handleIncomingHandshakeWithResult (cyclomatic 54): NoiseSessionManager.handleIncomingHandshakeWithResult 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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67a98ca810bd8bc59228fcc582bc2de08e65ec395c82f40d733fde82798024d"}},{"ruleId":"D1","level":"warning","message":{"text":"BinaryProtocol.decodeCore (cyclomatic 48): BinaryProtocol.decodeCore has cyclomatic complexity 48 (threshold 15). Of this number, 44 points are the body\u0027s own statements and 4 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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2404eea7ff26d597cf3585b5a5796feb89906c42282c0ec0817efd2453aebbe"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageOutboxStore.retryDeferredLoad (cyclomatic 43): MessageOutboxStore.retryDeferredLoad 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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd8a2bf707621f2dae71a07128e231e0f463ddf3bacf489b558b873cbbc1b5d"}},{"ruleId":"D1","level":"warning","message":{"text":"BoardWire.decode (cyclomatic 41): BoardWire.decode 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":"bitchat/Protocols/BoardPackets.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"45082847cba263f12394fd8ffe05620dcf33491c91038c4bd74d16076d5c338e"}},{"ruleId":"D1","level":"warning","message":{"text":"BinaryProtocol.encode (cyclomatic 41): BinaryProtocol.encode 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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7e1afbf89d774e40165eec7ecd9c037ab33f32b73132cd2c5d97be5b3de77b6"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageOutboxStore.save (cyclomatic 40): MessageOutboxStore.save 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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d00453e064e01c0a37b836d723f931677ab9ee999c5cfbd4cb2d72325a8ef5e"}},{"ruleId":"D1","level":"warning","message":{"text":"GossipSyncManager._handleRequestSync (cyclomatic 37): GossipSyncManager._handleRequestSync 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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ca9b2e62042838ce750ff50716d69caf8ee7b8bf8005c77266d03ad5fdd062"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageListView.body (cyclomatic 36): MessageListView.body 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":"bitchat/Views/MessageListView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f00799c80fb1bd9658141b476649f4a22141e865a15cfb99d8857456a7a04ca"}},{"ruleId":"D1","level":"warning","message":{"text":"MeshPeerList.body (cyclomatic 35): MeshPeerList.body 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":"bitchat/Views/MeshPeerList.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcefadd4e24b0c40645c40397d31d7128979bdbaee2ab921d77e2b88dc72fac6"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.loadDurableStateIfNeeded (cyclomatic 35): BLEPrivateMediaReceiptStore.loadDurableStateIfNeeded 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"932f208a98c1d5a3dba317b34b744e3cb8b059ad672c3e101d4fbc63b073785b"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEAnnounceHandler.handle (cyclomatic 34): BLEAnnounceHandler.handle 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":"bitchat/Services/BLE/BLEAnnounceHandler.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"e832bbdc22ddc057a18c4bc31ee4c6eedb644978eb69edea5f03e1e8bb0ed4ba"}},{"ruleId":"D1","level":"warning","message":{"text":"GeoRelayDirectory.validatedDirectoryAddress (cyclomatic 33): GeoRelayDirectory.validatedDirectoryAddress has cyclomatic complexity 33 (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":"bitchat/Nostr/GeoRelayDirectory.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"c38c020abdbfb5033bffe18ecf81ee0223c894eebabdb2e97df56ef6076ab86d"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.sendOnAllLinks (cyclomatic 32): BLEService.sendOnAllLinks 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":2261}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf472035fa93c79550c00f01432e395618cee7f4ec0c91efc468b0f931c29ce"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageFormattingEngine.findAllMatches (cyclomatic 31): MessageFormattingEngine.findAllMatches has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 10 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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d8516b31e3b309eff3cda9c25edff8ab93398d2d639bff3d686f58fee30191"}},{"ruleId":"D1","level":"warning","message":{"text":"NotificationStreamAssembler.append (cyclomatic 31): NotificationStreamAssembler.append 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":"bitchat/Services/NotificationStreamAssembler.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"7279da4f93ea7d3cc8d228de9fd05e731ace8a40629108ba40d0768b7e40eb75"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandProcessor.process (cyclomatic 30): CommandProcessor.process has cyclomatic complexity 30 (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":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7756ca53d6a9b06e6de0f54a776733f3126fbd102692ff3f71b5da8c6e68946b"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.handleReceivedPacketOnQueue (cyclomatic 30): BLEService.handleReceivedPacketOnQueue has cyclomatic complexity 30 (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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5931}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc6d0f1aaf17b8147e361b276f815ba8f13e91bb4cfd31ef67923de40c3ad309"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.startFragmentedPacket (cyclomatic 28): BLEService.startFragmentedPacket 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5498}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc6edb32fefed9a9ff2b7d7ca07cad2532155db0e85ff84b96713d4424775d1"}},{"ruleId":"D1","level":"warning","message":{"text":"PrivateChatManager.consolidateMessages (cyclomatic 27): PrivateChatManager.consolidateMessages 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":"bitchat/Services/PrivateChatManager.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"787c4e423c72a56b63c2f911c7ef8cc515f84623d4e37c9800c753d487284d78"}},{"ruleId":"D1","level":"warning","message":{"text":"GossipSyncManager._onPublicPacketSeen (cyclomatic 27): GossipSyncManager._onPublicPacketSeen 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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f0bf350922977ee7a79118d5edca75366a695fa7a64174ea1059d9c879c276"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.broadcastPacket (cyclomatic 27): BLEService.broadcastPacket 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1968}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8341c701a1de82947123fe1ad0446a93441b78e545ae2fc69f0df956a42ec90"}},{"ruleId":"D1","level":"warning","message":{"text":"VoiceRecordingViewModel.start (cyclomatic 26): VoiceRecordingViewModel.start 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":"bitchat/ViewModels/VoiceRecordingViewModel.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda4ddef2b7e6b47e39bdc2b6d4af58a1cd36d959963bdfb8d8759bb99a1fdd3"}},{"ruleId":"D1","level":"warning","message":{"text":"BitchatMessage.init (cyclomatic 26): BitchatMessage.init 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":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"87fdd6bed9426b8e0727f59d1bd35925d4fafaab30c8beebbe31407cd9fd1ac2"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestSyncPacket.decode (cyclomatic 25): RequestSyncPacket.decode 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":"bitchat/Models/RequestSyncPacket.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"202e840efa7e1777a6e29143cb4db6b7b439a3974d2174ec11e08902df34604a"}},{"ruleId":"D1","level":"warning","message":{"text":"NoiseHandshakeState.writeMessage (cyclomatic 25): NoiseHandshakeState.writeMessage 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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f96f4680e8455686fb18d480ab916d754bace870bdc821ff1513d42b8d2dad7"}},{"ruleId":"D1","level":"warning","message":{"text":"LocationStateManager.locationNamesByLevel (cyclomatic 25): LocationStateManager.locationNamesByLevel 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":"bitchat/Services/LocationStateManager.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf61d63dfcbd12011a78761d2c551aecca9dcdbbd946af9f6b0f4cf25cd6423"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatViewModel.performPrivateChatClear (cyclomatic 25): ChatViewModel.performPrivateChatClear has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (continueClear, currentRemovalPlan, hasRemainingCopy). 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"80665856ae016f2f0dad565f0a710dfa7f13b8252a4ff191fe507d1a983564d3"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrInboundPipeline.handleNostrEvent (cyclomatic 25): NostrInboundPipeline.handleNostrEvent has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"2605874725daaed61cddae8a8f52e97658fb79171159d42511c855bf51e967fe"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.recordDeleted (cyclomatic 25): BLEPrivateMediaReceiptStore.recordDeleted 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"c334635f71c221cc5e395f21efc88b81f0b7b142fd6cbd51b38a2036ecf2535d"}},{"ruleId":"D1","level":"warning","message":{"text":"GeoRelayDirectory.validatedEntries (cyclomatic 24): GeoRelayDirectory.validatedEntries 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":"bitchat/Nostr/GeoRelayDirectory.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e728959bc315d2518321ff579b6fa4072f12b314f712261e1945ddc631d184"}},{"ruleId":"D1","level":"warning","message":{"text":"BitchatFilePacket.decode (cyclomatic 24): BitchatFilePacket.decode has cyclomatic complexity 24 (threshold 15). Of this number, 21 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":"bitchat/Protocols/BitchatFilePacket.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"621f8ef0d2e0a256c19e04d52e207b98df3e099e33bfa3c13c48187de0b4288d"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRouter.retrySecurePrivateMessagesAfterAuthentication (cyclomatic 24): MessageRouter.retrySecurePrivateMessagesAfterAuthentication 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca3e389d51702c1d954cc83907e38438f0e81016d07a40b9b7bd236a5259e71"}},{"ruleId":"D1","level":"warning","message":{"text":"PrivateConversationModel.resolveDisplayName (cyclomatic 23): PrivateConversationModel.resolveDisplayName 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":"bitchat/App/PrivateConversationModels.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a8167d1c1a3a87b269689c0a86947b2a9bbf66a7afc312d6b7c199fa8688658"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.body (cyclomatic 23): ContentView.body has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentView.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe893014a2f88fba4604a8dd6915e018b02d560d85b67f64fb05c63c4514d79"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.handleLinkEvent (cyclomatic 23): BLEService.handleLinkEvent 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5720}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd6afaf84269ac05201a88d10550b038f9ec92a1644c8904e89a0107b6bdf65b"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.handleAnnounce (cyclomatic 23): BLEService.handleAnnounce 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":6103}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a3c0548a0c4f52b67bf9b5fd5d5f26954c26c6b75050474aac5ee8b146cb19"}},{"ruleId":"D1","level":"warning","message":{"text":"GlobeGeometry.frontRuns (cyclomatic 23): GlobeGeometry.frontRuns 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":"bitchat/Views/Globe/GlobeGeometry.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c3445e4efdcbfd3cdb603c938fe9c8b6f64f313179ecead9a35602e6596dc43"}},{"ruleId":"D1","level":"warning","message":{"text":"KeychainManager.deleteAllKeychainData (cyclomatic 22): KeychainManager.deleteAllKeychainData 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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60b5d3a590d7d649d372f6c0ca54eb0bd5fff353f8e2df84ef0fd8ec05d436a"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.state (cyclomatic 22): BLEPrivateMediaReceiptStore.state 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9877a3481c04d8ffdc93513fddc4c7fe2d660d30ec5d8ca83d9f74be9d0895"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.sendFilePrivate (cyclomatic 22): BLEService.sendFilePrivate 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1569}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d0d6a5478b5af206a53e0ddfb3660eac435cbe37bad9466b9b6ab1e76c5a426"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.configureNoiseServiceCallbacks (cyclomatic 22): BLEService.configureNoiseServiceCallbacks 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":4016}}}],"partialFingerprints":{"codehealthFindingId/v1":"e604fda68ac1c5717771d2c5fbe7d72db04273dad6edddf2c9b37b4d1b85d0d7"}},{"ruleId":"D1","level":"warning","message":{"text":"PrekeyBundle.decode (cyclomatic 22): PrekeyBundle.decode 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":"localPackages/BitFoundation/Sources/BitFoundation/PrekeyBundle.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a558a59468038a340b0fc519e90860da6a975845b73451f5e09d38bc111ea22"}},{"ruleId":"D1","level":"warning","message":{"text":"CBORReader.parseValue (cyclomatic 21): CBORReader.parseValue 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":"bitchat/Services/CashuTokenDecoder.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec5ebbfcb2e1c2916eab81192aa0ceb8391951d9911685818bc2032837fa2318"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMediaTransferCoordinator.handleTransferEvent (cyclomatic 21): ChatMediaTransferCoordinator.handleTransferEvent 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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae98918e05d3b97c3d0e7bcf6e7c70e8ff362750216eaf702edcbb1796166df"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrInboundPipeline.subscribeNostrEvent (cyclomatic 21): NostrInboundPipeline.subscribeNostrEvent 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":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"62e9a6b76dec166e8e8970b3961738f78292f950f30a8656b579fd122e013f2f"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentHeaderView.body (cyclomatic 21): ContentHeaderView.body 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":"bitchat/Views/ContentHeaderView.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"553b07c6336ba379225b0d9376e876a8f12234029408b6ea949af9ab8ff375ce"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.commitAccepted (cyclomatic 21): BLEPrivateMediaReceiptStore.commitAccepted 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c84e273ab02924ef8012cb3f34d9b433c37891fb3cc17b5fbfe886fc0e49af4"}},{"ruleId":"D1","level":"warning","message":{"text":"BridgeService.handleRendezvousEvent (cyclomatic 21): BridgeService.handleRendezvousEvent 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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"972d6c13defbb9ac4525e52cce649b565f9af4bdb9ec9471e3f9e8748dc7a7fc"}},{"ruleId":"D1","level":"warning","message":{"text":"BitchatMessage.toBinaryPayload (cyclomatic 21): BitchatMessage.toBinaryPayload 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":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5e8bf0a7bfe7228d69cdd7e63a5f34057dea502f6698b6df19fc18c19ed4a2"}},{"ruleId":"D1","level":"warning","message":{"text":"NoiseHandshakeState.performDHOperation (cyclomatic 20): NoiseHandshakeState.performDHOperation 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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"9131d61ba5d020acb8bd6d349a3b01dd4c9ab443407fca17e57e3e7f0c99cee0"}},{"ruleId":"D1","level":"warning","message":{"text":"ParsedInbound.init (cyclomatic 20): ParsedInbound.init 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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1733}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3521228b101fdf0257d650b48faa8e3d2f9c0ad0b2b515a8685602aa30fc17a"}},{"ruleId":"D1","level":"warning","message":{"text":"RelayController.decide (cyclomatic 20): RelayController.decide 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":"bitchat/Services/RelayController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"94df92b435ef952401c6fdc78578e1fb0e710abfca0a24c49e83bc49ec15f7a8"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatLifecycleCoordinator.markPrivateMessagesAsRead (cyclomatic 20): ChatLifecycleCoordinator.markPrivateMessagesAsRead 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":"bitchat/ViewModels/ChatLifecycleCoordinator.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"536e1f2dd3330d4ef931103d69a22e8bee7af68b8aec4fa21e65c4875b02666c"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatPublicConversationCoordinator.handlePublicMessage (cyclomatic 20): ChatPublicConversationCoordinator.handlePublicMessage 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":"bitchat/ViewModels/ChatPublicConversationCoordinator.swift"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4c9042fbda18f84794e74d84c5085f005b351fefab5e32c7a067b26f7c0acf"}},{"ruleId":"D1","level":"warning","message":{"text":"GeoPresenceTracker.subscribeNostrEvent (cyclomatic 20): GeoPresenceTracker.subscribeNostrEvent 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":"bitchat/ViewModels/GeoPresenceTracker.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"da97b002e0f2a1bd3e6b167ee1fe0c6692e088be8520028d8c06155de7e9d65e"}},{"ruleId":"D1","level":"warning","message":{"text":"MinimalDistancePalette.rebuildEntries (cyclomatic 20): MinimalDistancePalette.rebuildEntries 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":"bitchat/ViewModels/MinimalDistancePalette.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccb3c8cfde033ceddf3f93817c9572e0cf97b3a0744df6d1beeb6e741e4cd48"}},{"ruleId":"D1","level":"warning","message":{"text":"GeohashPeopleList.body (cyclomatic 20): GeohashPeopleList.body 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":"bitchat/Views/GeohashPeopleList.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7550dd646d711e94ed6aeeb4c8bf2942c32044bcb47447868bcf2292df663c2"}},{"ruleId":"D1","level":"warning","message":{"text":"TextMessageView.body (cyclomatic 20): TextMessageView.body 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":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7bcd9522a9ba8bda90c1e2b858090f2944ca317db63ec27795f8d42ddd99aa"}},{"ruleId":"D1","level":"warning","message":{"text":"MeshTopologyTracker.computeRoute (cyclomatic 19): MeshTopologyTracker.computeRoute has cyclomatic complexity 19 (threshold 15). Of this number, 18 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":"bitchat/Services/MeshTopologyTracker.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec071430fb636bd940f22ea446c667e5b3bc840f5b77117f35effe0791ae60ea"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatTransportEventCoordinator.handleNoisePayload (cyclomatic 19): ChatTransportEventCoordinator.handleNoisePayload 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":"bitchat/ViewModels/ChatTransportEventCoordinator.swift"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6c2e598b78a5d6fd13686f236c9ea53e0b9828df3a20c829b20bc0f41f073cb"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.recoverDeletionJournal (cyclomatic 19): BLEPrivateMediaReceiptStore.recoverDeletionJournal 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"578006a847339bc2d44995c60b10dde14d17cfc0236618db8f1faa0ba9d75120"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageOutboxStore.load (cyclomatic 19): MessageOutboxStore.load 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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6420bb770e21503990f27806c9885bd21d49c63a12ea2be519cbbdc4bf3681"}},{"ruleId":"D1","level":"warning","message":{"text":"GroupStatePayload.decode (cyclomatic 19): GroupStatePayload.decode has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Groups/GroupProtocol.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"a02aecfb72fa023fe2c7d047db2740511809196bdf6cb89b2462fd59ae5a0ac3"}},{"ruleId":"D1","level":"warning","message":{"text":"GroupCrypto.openMessage (cyclomatic 19): GroupCrypto.openMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Groups/GroupProtocol.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d69ea2f095a110dd194f7e42dfd281480f5fce60ac7483c333cfcda6ccb1d74"}},{"ruleId":"D1","level":"warning","message":{"text":"CourierEnvelope.decode (cyclomatic 19): CourierEnvelope.decode 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":"localPackages/BitFoundation/Sources/BitFoundation/CourierEnvelope.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"121b0e1250ebbda43fea7f1d340094ba9a18a2100604d5985230203c193d5769"}},{"ruleId":"D1","level":"warning","message":{"text":"VouchAttestation.decode (cyclomatic 18): VouchAttestation.decode 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":"bitchat/Protocols/VouchAttestation.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d90f4b6dd296a6971baeddefbfa3b461536bd65f80dbc64b32804cce7653385"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandProcessor.handleBlock (cyclomatic 18): CommandProcessor.handleBlock 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":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"133b7847730c91cf184e62bec17eeb48fa6be67e3375119e299fbe628be43abc"}},{"ruleId":"D1","level":"warning","message":{"text":"LocationNotesManager.subscribe (cyclomatic 18): LocationNotesManager.subscribe 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":"bitchat/Services/LocationNotesManager.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d74967caa6ee65e4329ca64b10e87ddfc867ebb19ee2304b23ee81b7868091"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRouter.courierBecameAvailable (cyclomatic 18): MessageRouter.courierBecameAvailable 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fce43c65a642b70ed7840979e3e11da405e6e0873e3540b854e78784abdf74"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRouter.flushOutbox (cyclomatic 18): MessageRouter.flushOutbox 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07647e84790bcfdea1e5af99cc9e679e548da8ee09b28c5a659ea724ab470c6"}},{"ruleId":"D1","level":"warning","message":{"text":"SharedContentPayload.validate (cyclomatic 18): SharedContentPayload.validate 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":"bitchat/Services/SharedContentHandoff.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c8361e4c0ae51929a2dc525dfa73587e14045136e7dd662343cd4c09fb6f70c"}},{"ruleId":"D1","level":"warning","message":{"text":"GossipSyncManager.buildGcsPayload (cyclomatic 18): GossipSyncManager.buildGcsPayload 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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"94374fabb4b8cb008978cfd1b0905d56b3d22d699807bcd751e87543a7060d01"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatMessageFormatter.formatMessageHeader (cyclomatic 18): ChatMessageFormatter.formatMessageHeader 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cedd96cdca53dbdc89c18bd509123145ec7e97f7ef03b7794a51e770cf166a7"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatPrivateConversationCoordinator.migratePrivateChatsIfNeeded (cyclomatic 18): ChatPrivateConversationCoordinator.migratePrivateChatsIfNeeded 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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d38e505edaa46ca719b21e4f6aae582e14b21ce924c8d6df43e2f93c8b745c"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrInboundPipeline.processGeohashGiftWrap (cyclomatic 18): NostrInboundPipeline.processGeohashGiftWrap 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":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b34100f193c6acbcb9b0e51d93c2ead5982994de70ed4c5d1577a752a3266730"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrRelayManager.handleDisconnection (cyclomatic 17): NostrRelayManager.handleDisconnection 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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7573b44392e8feed185f9c490a6897b4219a6bd200588231c5c58e1effc65e0"}},{"ruleId":"D1","level":"warning","message":{"text":"AnnouncementPacket.decode (cyclomatic 17): AnnouncementPacket.decode 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":"bitchat/Protocols/Packets.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"89526ebdff751d42a4e9204c34d556b22c3ea7c44aaaa6e12d287b0842091d6e"}},{"ruleId":"D1","level":"warning","message":{"text":"UnifiedPeerService.updatePeers (cyclomatic 17): UnifiedPeerService.updatePeers 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/UnifiedPeerService.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4e45f737c4e6c8e0c3d703be89c6e60c499ec55f96bf4661f909a140cf2226"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrInboundPipeline.processNostrMessage (cyclomatic 17): NostrInboundPipeline.processNostrMessage 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":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8906194759236a45442955a51b927efb6b4a809cb7615b6fc129db0c49b6c44"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentPeopleSheetView.body (cyclomatic 17): ContentPeopleSheetView.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"a872f31c6e36ce8ee1883e7afa6b553f2e66972e031ec12aedf2c82aea51e95e"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEFileTransferHandler.storeIncomingFile (cyclomatic 17): BLEFileTransferHandler.storeIncomingFile 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":"bitchat/Services/BLE/BLEFileTransferHandler.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f0b9d5ef2af76cfb4719832e34c34850faaf963e067439522e74186d4df0d55"}},{"ruleId":"D1","level":"warning","message":{"text":"BLENoisePacketHandler.handleEncrypted (cyclomatic 17): BLENoisePacketHandler.handleEncrypted 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":"bitchat/Services/BLE/BLENoisePacketHandler.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"b860259f9c45db0e3731c2b42e658c630e707edb8f13f4cd3b71bf953eca1b05"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEPublicMessageHandler.handle (cyclomatic 17): BLEPublicMessageHandler.handle 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":"bitchat/Services/BLE/BLEPublicMessageHandler.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb32bed3c8146c35e3a24b302b7d14aad989d495f0fd6067be120446c2fd734"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEService.sendPendingNoisePayloadsAfterHandshake (cyclomatic 17): BLEService.sendPendingNoisePayloadsAfterHandshake 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":6887}}}],"partialFingerprints":{"codehealthFindingId/v1":"666cc4d8a73f5c4fdee1d9e1dd41e982f8e2205e281e6982f1397461739aca07"}},{"ruleId":"D1","level":"warning","message":{"text":"BridgeService.classify (cyclomatic 17): BridgeService.classify 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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"798ad74edb5a4f712285750971f411e03792fe249da86cfe41b2ab07f430bc40"}},{"ruleId":"D1","level":"warning","message":{"text":"GlobeRenderer.drawCities (cyclomatic 17): GlobeRenderer.drawCities 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":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"e006c60ab570f8c8306876d02afe339e372ca00c07f5db9b879caeb2e0032a9f"}},{"ruleId":"D1","level":"warning","message":{"text":"MediaMessageView.body (cyclomatic 17): MediaMessageView.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Media/MediaMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6a46b610402a9f397aa16b5ac237de5abf9d5ec57751f937611d6316f882213"}},{"ruleId":"D1","level":"warning","message":{"text":"PeerListModel.refresh (cyclomatic 16): PeerListModel.refresh 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":"bitchat/App/PeerListModel.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"f410efcd7d7c5c5102c7dc97fc9727c283e0389f73b1ef62b6809f783d3ea3b6"}},{"ruleId":"D1","level":"warning","message":{"text":"NoiseSessionManager.scheduleOrdinaryResponderTimeoutLocked (cyclomatic 16): NoiseSessionManager.scheduleOrdinaryResponderTimeoutLocked 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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"20ca7da0b3847c015d621b7f66498c26675f2108509feb18623c03a0d81fe4f8"}},{"ruleId":"D1","level":"warning","message":{"text":"NostrRelayManager.subscribe (cyclomatic 16): NostrRelayManager.subscribe 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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff60cbeff09c3e0b86809d684f31096535ca7a22f5608e6bdc4f17c160d9f138"}},{"ruleId":"D1","level":"warning","message":{"text":"GeohashChannelLevel.init (cyclomatic 16): GeohashChannelLevel.init has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Protocols/LocationChannel.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9019bed029f254c26efcc242fb869388bc3af022af13316c80ad50f1ac00ec"}},{"ruleId":"D1","level":"warning","message":{"text":"AuthenticatedPeerStatePacket.decode (cyclomatic 16): AuthenticatedPeerStatePacket.decode 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":"bitchat/Protocols/Packets.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"34006b07a6faf63edca75e71ed5ab5f8ca328feb79b08cba9df0fb3c9125ecbb"}},{"ruleId":"D1","level":"warning","message":{"text":"CashuTokenDecoder.decodeV4 (cyclomatic 16): CashuTokenDecoder.decodeV4 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":"bitchat/Services/CashuTokenDecoder.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2703de57731bcaffcc00626381a9a71e9cd07b9e49e901d2717204afc8eb68c5"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGroupCoordinator.applyGroupState (cyclomatic 16): ChatGroupCoordinator.applyGroupState 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":"bitchat/ViewModels/ChatGroupCoordinator.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"0590c1ac336d7951c45dbdf7473fddf26f68950e94b366d23bf985ca588ca506"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatLiveVoiceCoordinator.absorbFinalizedVoiceNote (cyclomatic 16): ChatLiveVoiceCoordinator.absorbFinalizedVoiceNote has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, 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":"bitchat/ViewModels/ChatLiveVoiceCoordinator.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa00416d06246bac004d97bec61eb63604ca2f0ac0b3038ed3c2ace597776a4"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatPrivateConversationCoordinator.handlePrivateMessage (cyclomatic 16): ChatPrivateConversationCoordinator.handlePrivateMessage 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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3aa7afd49131ab1691b52e34484ccb8b4ff55c5c3db29848385d8ea6edb804"}},{"ruleId":"D1","level":"warning","message":{"text":"BLEConnectionScheduler.handleDiscovery (cyclomatic 16): BLEConnectionScheduler.handleDiscovery 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":"bitchat/Services/BLE/BLEConnectionScheduler.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae14c072cb232691f7f45c10d0a2f7b103f46e140738c49bfda9b7b88085f08"}},{"ruleId":"D1","level":"warning","message":{"text":"BLERadioController.updateScanningDutyCycle (cyclomatic 16): BLERadioController.updateScanningDutyCycle 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":"bitchat/Services/BLE/BLERadioController.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e03a935f8c0168542f993c96347b2bfd2efcde73b58feb3af3d08d0255378bc"}},{"ruleId":"D1","level":"warning","message":{"text":"AnnounceV2Packet.decode (cyclomatic 16): AnnounceV2Packet.decode 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":"localPackages/BitFoundation/Sources/BitFoundation/AnnounceV2Packet.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"b958aa1fef3b10a1e881379a78529c31d0aa9d95ef08d7a4c7229006f5261f8b"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMessageFormatter.formatMessageAsText (cognitive 286): ChatMessageFormatter.formatMessageAsText has cognitive complexity 286 (threshold 15). Drivers by points: if/else 44 (155 pts), ternaries 19 (69 pts), loops 12 (40 pts), boolean chains 22 (nesting depth added 189). Of this number, 249 points are the body\u0027s own statements and 37 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcee5ba83f0cadd482cd13d1b40ec5f85e86a9c3b47d8df0759a2afe8352317c"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseSessionManager.handleIncomingHandshakeWithResult (cognitive 94): NoiseSessionManager.handleIncomingHandshakeWithResult has cognitive complexity 94 (threshold 15). Drivers by points: if/else 34 (68 pts), boolean chains 23, ternaries 1 (2 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b98d973a6cb7b3633ccacd8c7b870c318946d2eee0b4af890dd9eebc666ae40"}},{"ruleId":"D2","level":"warning","message":{"text":"MeshPeerList.body (cognitive 90): MeshPeerList.body has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (55 pts), ternaries 11 (35 pts) (nesting depth added 52). 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":"bitchat/Views/MeshPeerList.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe797514454353fc33b6574230cedee5290192680e7d172477c1d6a3977d0fb"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageOutboxStore.save (cognitive 76): MessageOutboxStore.save has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (38 pts), ternaries 8 (23 pts), boolean chains 12, match/switch 2 (3 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"6efa5dbbbb55ac5f3abe267531ca1d7dfb7f5a0797c3cd86ff0afed26c68fd36"}},{"ruleId":"D2","level":"warning","message":{"text":"GossipSyncManager._handleRequestSync (cognitive 74): GossipSyncManager._handleRequestSync has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (55 pts), loops 7 (14 pts), boolean chains 5 (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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c81f9d8412159108e56b8dcfbd15906ab0901f740414f1d30e6723fd982b32"}},{"ruleId":"D2","level":"warning","message":{"text":"BinaryProtocol.decodeCore (cognitive 74): BinaryProtocol.decodeCore has cognitive complexity 74 (threshold 15). Drivers by points: if/else 41 (63 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 24). Of this number, 70 points are the body\u0027s own statements and 4 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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce633a6f6fe42618e3dd064d8bc19c54ec341d42259d4f9aca5eb0b25207063"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageOutboxStore.retryDeferredLoad (cognitive 63): MessageOutboxStore.retryDeferredLoad has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 9 (18 pts), boolean chains 17, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3280de8f1af1610fcb23f734d1bd19329696adf107898eb2b6568cfdbda487"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivateChatManager.consolidateMessages (cognitive 61): PrivateChatManager.consolidateMessages has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 4 (9 pts), ternaries 2 (8 pts), boolean chains 6 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/PrivateChatManager.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b5bca9c9f4997376df10c50bfe9681cbaf6cd4b4a2e91479e6a7f6154b441e"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationStreamAssembler.append (cognitive 59): NotificationStreamAssembler.append has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (47 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (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":"bitchat/Services/NotificationStreamAssembler.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c773030409ab5a6ecf8eac18414f0ee14819fa856a3784df2b6621e2200f80d"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.sendOnAllLinks (cognitive 56): BLEService.sendOnAllLinks has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (30 pts), ternaries 4 (14 pts), boolean chains 11, loops 1 (nesting depth added 23). 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":2261}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a68b85f25bd54b5f493a14e9a9467364600264741d8813558aad4938ba9cfc1"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.loadDurableStateIfNeeded (cognitive 53): BLEPrivateMediaReceiptStore.loadDurableStateIfNeeded has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 10, error handling 4 (6 pts), loops 5 (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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc151dc16f58a94b5b1bb79f23ba02013b9a2d7cc409c7562585ad07a44577fd"}},{"ruleId":"D2","level":"warning","message":{"text":"MimeType.matches (cognitive 53): MimeType.matches has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 47, if/else 4 (5 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":"bitchat/Services/BLE/MimeType.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5b720595987644c5bb50ffa2299e48a530b8855b77910e9d90402c09d59484"}},{"ruleId":"D2","level":"warning","message":{"text":"BinaryProtocol.encode (cognitive 50): BinaryProtocol.encode has cognitive complexity 50 (threshold 15). Drivers by points: if/else 26 (29 pts), loops 4 (8 pts), ternaries 6 (7 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"9890faec112a9155561655bd3ea29b37aa7fd0c179cfb1edb2e28e4ebd184b5a"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseHandshakeState.writeMessage (cognitive 47): NoiseHandshakeState.writeMessage has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (38 pts), boolean chains 6, match/switch 1 (2 pts), loops 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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"29715c89f61d0bd5aa2f6439b292e231a22f6c270a4c5c9a35796158b32e2589"}},{"ruleId":"D2","level":"warning","message":{"text":"BoardWire.decode (cognitive 47): BoardWire.decode has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 12, match/switch 2 (3 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Protocols/BoardPackets.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ec021fb53be00178efc5ca6dbb2c1418c9c5cef798362d611e92d3c3419c9b"}},{"ruleId":"D2","level":"warning","message":{"text":"GeohashPeopleList.body (cognitive 45): GeohashPeopleList.body has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (25 pts), ternaries 9 (20 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":"bitchat/Views/GeohashPeopleList.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"17a882c2ff28c5e28a82415ed2265df6d9760677e86ce03a8ad1572aa87ccfe2"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.startFragmentedPacket (cognitive 43): BLEService.startFragmentedPacket has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 4, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5498}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98f2436b4c205d815339c37e1cdfdb498d02af9810cf124b999e12d41964cdb"}},{"ruleId":"D2","level":"warning","message":{"text":"BitchatMessage.init (cognitive 43): BitchatMessage.init has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 4, loops 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":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9393185b1fd54edfb5135a98f0171e077c97b9cc380f3fba77ba4212ec6f147"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPrivateConversationCoordinator.migratePrivateChatsIfNeeded (cognitive 42): ChatPrivateConversationCoordinator.migratePrivateChatsIfNeeded has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 23). 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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"95faf8eb756158d5c4681051278b3853e0c30f11df97ddc1e6b231c315ff13af"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestSyncPacket.decode (cognitive 41): RequestSyncPacket.decode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (9 pts), boolean chains 6, 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":"bitchat/Models/RequestSyncPacket.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ce960f0a0b2a45d1c7ba700fad9a825c3aead0487b4e81ce2971d8fd899782"}},{"ruleId":"D2","level":"warning","message":{"text":"BitchatFilePacket.decode (cognitive 41): BitchatFilePacket.decode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 20). Of this number, 35 points are the body\u0027s own statements and 6 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":"bitchat/Protocols/BitchatFilePacket.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a52aa4441164afb62a1ca8cbebc373be08c5549d8da26f228b2afe331f6c60a"}},{"ruleId":"D2","level":"warning","message":{"text":"CashuTokenDecoder.decodeV4 (cognitive 41): CashuTokenDecoder.decodeV4 has cognitive complexity 41 (threshold 15). Drivers by points: loops 5 (19 pts), if/else 5 (18 pts), match/switch 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/CashuTokenDecoder.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f24499ed339041fd5361bafc37b1b580f2c4ff7a40c5fd8679db170ff87e3a13"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageListView.body (cognitive 40): MessageListView.body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 10, ternaries 2 (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":"bitchat/Views/MessageListView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"92f5d07d0c1aee2c7de814406f6e383b723a663b652f7e897b9a7512734fe055"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.broadcastPacket (cognitive 38): BLEService.broadcastPacket has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (30 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1968}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8bf6569bccbb00a448b92559ed3f62a4a224a26e80fe437d76de79efb40c6b"}},{"ruleId":"D2","level":"warning","message":{"text":"GossipSyncManager._onPublicPacketSeen (cognitive 37): GossipSyncManager._onPublicPacketSeen has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 3, 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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"01618ce8fcebe348847d6ffec1555bb20668eb390116d5b831bb881416d89286"}},{"ruleId":"D2","level":"warning","message":{"text":"VoiceRecordingViewModel.start (cognitive 37): VoiceRecordingViewModel.start has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 12, error handling 3 (5 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":"bitchat/ViewModels/VoiceRecordingViewModel.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"a114b4acb8bf9e3d3391802fa55b2ac357d6137a32f1b777f21c6056a51b73cc"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandProcessor.handleBlock (cognitive 36): CommandProcessor.handleBlock has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (6 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"523f97be0f6986f60d021d56831b84f6a7b45bf599a89b7c46a47bb4369a9de6"}},{"ruleId":"D2","level":"warning","message":{"text":"KeychainManager.deleteAllKeychainData (cognitive 35): KeychainManager.deleteAllKeychainData has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8, loops 1 (2 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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be31cef2f462ec624e38b6938a43d1db52dd4a996b8f49f88a34c03ae8df387"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRouter.retrySecurePrivateMessagesAfterAuthentication (cognitive 35): MessageRouter.retrySecurePrivateMessagesAfterAuthentication has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 8, 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff7e425c663bc862376f566afb447a92dcc4fb142015bbbc0e5aeb69b48fdb1"}},{"ruleId":"D2","level":"warning","message":{"text":"GeoRelayDirectory.validatedDirectoryAddress (cognitive 34): GeoRelayDirectory.validatedDirectoryAddress has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 24, if/else 7 (9 pts), 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":"bitchat/Nostr/GeoRelayDirectory.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"42513022ad38addb903f7f0e857a33ffee1c8ccf3aaa41ec4430de0a231ae5a3"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageFormattingEngine.findAllMatches (cognitive 34): MessageFormattingEngine.findAllMatches has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, loops 8, ternaries 7 (nesting depth added 4). Of this number, 21 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0830a5d7fca91b77eae74303aeaf9a6b5388b63a31496be085e907812682e7d"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEAnnounceHandler.handle (cognitive 34): BLEAnnounceHandler.handle has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 9, 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":"bitchat/Services/BLE/BLEAnnounceHandler.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b301ddd2b7cd165caad94d3c1ef0c23e041a1ec6eb92a1510d14dbc016d04f9"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEIncomingFileStore.expireAgedMedia (cognitive 34): BLEIncomingFileStore.expireAgedMedia has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), error handling 2 (5 pts), loops 2 (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":"bitchat/Services/BLE/BLEIncomingFileStore.swift"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c72ce9bf3722fcb4d6a48276e731e812865743f00171989f0c16928b8b0141"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.recoverDeletionJournal (cognitive 34): BLEPrivateMediaReceiptStore.recoverDeletionJournal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 5, 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3c09440aff6209633927e40954e921856129abea79dcde30815edfe10ab394f"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeGeometry.frontRuns (cognitive 34): GlobeGeometry.frontRuns has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 11, loops 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":"bitchat/Views/Globe/GlobeGeometry.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a033ddaa377c2cff1fdc9bd8bfd1ed557820ada58116d8870508909e88895c"}},{"ruleId":"D2","level":"warning","message":{"text":"MeshTopologyTracker.computeRoute (cognitive 33): MeshTopologyTracker.computeRoute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 15). 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":"bitchat/Services/MeshTopologyTracker.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"7816d0552d37ebcda37c5dd385bdcd63496fd6eb32ceed07aec5983782a9139f"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEIncomingFileStore.enforceQuota (cognitive 33): BLEIncomingFileStore.enforceQuota has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (7 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEIncomingFileStore.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"1839684a548e3fde2a76e5ab2e241cf5b9df4138d2ba0d80d469784cb05547c5"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRouter.flushOutbox (cognitive 32): MessageRouter.flushOutbox has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b124f26bd4518fba71c7bfa2d7ccd040e4f9d3c541377b76ccfdfedc10c9f1f"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.handleLinkEvent (cognitive 32): BLEService.handleLinkEvent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (8 pts), boolean chains 3, match/switch 1 (nesting depth added 14). 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5720}}}],"partialFingerprints":{"codehealthFindingId/v1":"c99af5667b753204fbee6c8d6fe81a34afbc439fb9ffff7a7ce73a0eb3a490b4"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRouter.courierBecameAvailable (cognitive 30): MessageRouter.courierBecameAvailable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bc7141278db7936355e933bf34159c12e7cf282bb05c49c3909856fd53b5be"}},{"ruleId":"D2","level":"warning","message":{"text":"MinimalDistancePalette.rebuildEntries (cognitive 30): MinimalDistancePalette.rebuildEntries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 6 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 11). 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":"bitchat/ViewModels/MinimalDistancePalette.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a82c9442a8b79bcd4e2ccc52be2da4612e5bcf2f74352cb5c663b6518b3e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"BLERadioController.updateScanningDutyCycle (cognitive 30): BLERadioController.updateScanningDutyCycle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (26 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":"bitchat/Services/BLE/BLERadioController.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"901d5d21531e01fc4fb5664bb0b976f73d7e27621486511da9f9d1e3dd5efaaa"}},{"ruleId":"D2","level":"warning","message":{"text":"PrekeyBundle.decode (cognitive 30): PrekeyBundle.decode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 6, loops 2 (4 pts), 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":"localPackages/BitFoundation/Sources/BitFoundation/PrekeyBundle.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d52213218fe85cdc01b6f77f04d4b7b7604f5a8ddac9ad5f6e26f530ff0ebd5"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseHandshakeState.performDHOperation (cognitive 29): NoiseHandshakeState.performDHOperation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 6, 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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"d71e15ba96976c104a1d23d9d5cf2f9859ed2234ceb0a4fc696106b9480f3240"}},{"ruleId":"D2","level":"warning","message":{"text":"BLENoisePacketHandler.handleEncrypted (cognitive 29): BLENoisePacketHandler.handleEncrypted has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (26 pts), error handling 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLENoisePacketHandler.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"010c8d876b5c3b136ea09b664ede5757de4d0e8ae693a275d831dea0380e53f9"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.sendPendingNoisePayloadsAfterHandshake (cognitive 29): BLEService.sendPendingNoisePayloadsAfterHandshake has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, match/switch 1 (3 pts), error handling 1 (2 pts), ternaries 1 (2 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":6887}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba39858cceaa62511220e1064b9f4a1cfb301c6e0e51f397f9027855eb3e8cfa"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageOutboxStore.load (cognitive 29): MessageOutboxStore.load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, ternaries 1 (2 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b2746119d5b232cb3e6406324659af2127575e3ea1d71e373ca4ca5ceb272e"}},{"ruleId":"D2","level":"warning","message":{"text":"GeoRelayDirectory.validatedEntries (cognitive 28): GeoRelayDirectory.validatedEntries has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 12, 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":"bitchat/Nostr/GeoRelayDirectory.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9fdea01fa8b838e8d01bd97fd3673e2ceb20bae702673c3c8d0fdb8466dbf56"}},{"ruleId":"D2","level":"warning","message":{"text":"FavoritesPersistenceService.loadFavorites (cognitive 28): FavoritesPersistenceService.loadFavorites has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (10 pts), boolean chains 2, error handling 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":"bitchat/Services/FavoritesPersistenceService.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"70eddff2ae8d06d4bf673d7faca2f39932f0e6783983107c2c7144eedfda80b9"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMediaTransferCoordinator.handleTransferEvent (cognitive 28): ChatMediaTransferCoordinator.handleTransferEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 1 (2 pts), boolean chains 1, 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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"5980048bb4812bf4c28e17d6e2a0e246b2e45993dcfafe5ba2be56349b122d3f"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.state (cognitive 28): BLEPrivateMediaReceiptStore.state has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, ternaries 1 (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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ee33a550804531e8fc78522c7070ce6c24303dd5592f6385e1e5158ec051ae"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrRelayManager.flushMessageQueue (cognitive 27): NostrRelayManager.flushMessageQueue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"91989efcd5c7a0ac8faa617905702b5ecaa755ec9eb1bf90ed4ad480ceb9b50e"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatLifecycleCoordinator.markPrivateMessagesAsRead (cognitive 27): ChatLifecycleCoordinator.markPrivateMessagesAsRead has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatLifecycleCoordinator.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae0002092882a2c7f52c3ea3e3b23add6463cb1e3dc380d172113ce07acc400"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrInboundPipeline.processNostrMessage (cognitive 27): NostrInboundPipeline.processNostrMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 1 (4 pts), boolean chains 1, error handling 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":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"460a5754c3df55b0caccf23539c7e7fb2ab9cfae8738e4e748e56e54a4b16762"}},{"ruleId":"D2","level":"warning","message":{"text":"BitchatMessage.toBinaryPayload (cognitive 27): BitchatMessage.toBinaryPayload has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 3, 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":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a560aae82f3064c5f9b502b51b8a02dee5017dddc4e248afc48ee440f9ef13"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivateConversationModel.resolveDisplayName (cognitive 26): PrivateConversationModel.resolveDisplayName has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/App/PrivateConversationModels.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"5685b981fb9ed529c90446cff1080625904277ac66deda3dd684e9d4ca705b8f"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrRelayManager.subscribe (cognitive 26): NostrRelayManager.subscribe has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"620bb30b7c1f9c28b971a216ea818216d6f5a58097b6aedb605db7f56a59847b"}},{"ruleId":"D2","level":"warning","message":{"text":"AnnouncementPacket.decode (cognitive 26): AnnouncementPacket.decode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (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":"bitchat/Protocols/Packets.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb3dcdfe5eaac526af4b489aee0f5e173a820b47d4d494e4d34c2450c09e54e8"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMediaTransferCoordinator.scheduleReconnectRetries (cognitive 26): ChatMediaTransferCoordinator.scheduleReconnectRetries has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, 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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10cd63463ade3f5ebe6294d5508b5439460b4e18944e4d035ecf0a768e8994c"}},{"ruleId":"D2","level":"warning","message":{"text":"WaveformCache.computeWaveform (cognitive 26): WaveformCache.computeWaveform has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (9 pts), ternaries 1 (3 pts), boolean chains 1, error handling 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":"bitchat/Features/voice/Waveform.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58f3a3f18c4ae1e7e4b46f007fd98c7b0af8d4cee2d5b807d82963f8d2762ef"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.handleAnnounce (cognitive 26): BLEService.handleAnnounce has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (12 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":6103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b72bbd00a6cbc54fb02b3093cd8463a6077e66b3427a266e6e4da5692508cd68"}},{"ruleId":"D2","level":"warning","message":{"text":"CourierEnvelope.decode (cognitive 26): CourierEnvelope.decode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, 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":"localPackages/BitFoundation/Sources/BitFoundation/CourierEnvelope.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94613141fffffc912a41366010e73317246bd44e662dcb9b26613e564728c55"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.recordDeleted (cognitive 25): BLEPrivateMediaReceiptStore.recordDeleted has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (11 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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac342f6e103c8820e83c69002fabd462487b7b6a0bcc465e28d5d8b1a7d35a0"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthenticatedPeerStatePacket.decode (cognitive 24): AuthenticatedPeerStatePacket.decode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Protocols/Packets.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b31b9b4333ecd72e5e364e26e8c209032fc7d15346d8a7021cb9dbd7d08540"}},{"ruleId":"D2","level":"warning","message":{"text":"VouchAttestation.decode (cognitive 24): VouchAttestation.decode 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":"bitchat/Protocols/VouchAttestation.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b72e1bd804525579bd6e2f0f97b7296a012e37fdaebbab575a7412d195b674c6"}},{"ruleId":"D2","level":"warning","message":{"text":"CBORReader.parseValue (cognitive 24): CBORReader.parseValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts), boolean chains 2, ternaries 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":"bitchat/Services/CashuTokenDecoder.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65d82dea52ef3c01214b2a7ff65347f63bebb93159d1f81b58e1074ddfd91b6"}},{"ruleId":"D2","level":"warning","message":{"text":"LocationStateManager.locationNamesByLevel (cognitive 24): LocationStateManager.locationNamesByLevel has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 12. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/LocationStateManager.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca1b7b54fdfdedd075c4d62dbbb82c5828880a54cc0e7aec2ead5125b437d27"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrInboundPipeline.handleNostrEvent (cognitive 24): NostrInboundPipeline.handleNostrEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, boolean chains 10, ternaries 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a10adb09761e882d7bdc846c2334848bc6572ab2c99da5a222145ac9e73132"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.configureNoiseServiceCallbacks (cognitive 24): BLEService.configureNoiseServiceCallbacks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, match/switch 1 (2 pts), error handling 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":4016}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e9727895d4f4d954450f9cfe3ad40a12a10ae4fdb7cc4fe119f8d4dcf55e7d"}},{"ruleId":"D2","level":"warning","message":{"text":"ParsedInbound.init (cognitive 23): ParsedInbound.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9, ternaries 1 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1733}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e41bd66785aa6bb4a2ade5527b1e11470ad4eeb1566b8ab7d57773564419520"}},{"ruleId":"D2","level":"warning","message":{"text":"UnifiedPeerService.updatePeers (cognitive 23): UnifiedPeerService.updatePeers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, boolean chains 2, ternaries 2 (nesting depth added 7). Of this number, 21 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":"bitchat/Services/UnifiedPeerService.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6910428e8d58ee18c1aedcffc19169c38222d334f350fb42db04392d6cce794"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPublicConversationCoordinator.handlePublicMessage (cognitive 23): ChatPublicConversationCoordinator.handlePublicMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, 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":"bitchat/ViewModels/ChatPublicConversationCoordinator.swift"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e4c7138c78cf40f3ecfb28a0e704f9aa7e2308c2a2b926acbc0795480f99d8"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrInboundPipeline.subscribeNostrEvent (cognitive 23): NostrInboundPipeline.subscribeNostrEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb65416e5e62ab723eb016c738e4c69a3a36ddd6e36c3f4cf95c154f18d7a720"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.body (cognitive 23): ContentView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 9, 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":"bitchat/Views/ContentView.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"8477eaf561fc1af2cd5afff556a4c28874dd6ca2acc9528fc2574cb36e62061a"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeService.handleRendezvousEvent (cognitive 23): BridgeService.handleRendezvousEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, 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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ddaa9f40eb9ebafa8da22a308cd091df91b6757ed766b64c827c4912a84e6b"}},{"ruleId":"D2","level":"warning","message":{"text":"TextMessageView.body (cognitive 23): TextMessageView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"46995767eb0fa5b5acea9d4290f66328a2f319b709ac3a7f4a4fb0b38827c55c"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeGeometry.fillPolygon (cognitive 23): GlobeGeometry.fillPolygon has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (6 pts), loops 4, boolean chains 3 (nesting depth added 9). Of this number, 20 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":"bitchat/Views/Globe/GlobeGeometry.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"8114f2dde0141d4086c43316a4a0b119e4fffce532c56c9ae5c019882e5047f7"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.sendFilePrivate (cognitive 22): BLEService.sendFilePrivate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2, boolean chains 1, 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1569}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd6077e0730abe38d12582d8cefa3b84c39385f790d8c69868d4c05c6e45dcd"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeRenderer.drawCities (cognitive 22): GlobeRenderer.drawCities has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, 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":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a3bfa3c586ddbe0602aa8c55f3ffbdc77af356ff68dbea7fd60808cc2c77ac1"}},{"ruleId":"D2","level":"warning","message":{"text":"AnnounceV2Packet.decode (cognitive 22): AnnounceV2Packet.decode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, 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":"localPackages/BitFoundation/Sources/BitFoundation/AnnounceV2Packet.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"173dfbe2e5f342d0c2d1b7c2d90e7ad0f19ad5c0db5a97708298c54b5a3dda22"}},{"ruleId":"D2","level":"warning","message":{"text":"PeerListModel.buildRecentChatRows (cognitive 21): PeerListModel.buildRecentChatRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3, 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":"bitchat/App/PeerListModel.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"34db5d4219182734c79c6edb3da792624660f0c7ccd1b2e36ab5591dd0226d83"}},{"ruleId":"D2","level":"warning","message":{"text":"RelayController.decide (cognitive 21): RelayController.decide has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 3 (5 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":"bitchat/Services/RelayController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab203e0d712b5f7b763be086c637bf6734dcab318254c23989ed8a733004357e"}},{"ruleId":"D2","level":"warning","message":{"text":"VoiceRecordingViewModel.finish (cognitive 21): VoiceRecordingViewModel.finish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (5 pts), boolean chains 3, 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":"bitchat/ViewModels/VoiceRecordingViewModel.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa70a61bd37023fec307f82823fecb5fdd0af32b4935a20432b9a5bd09c16dea"}},{"ruleId":"D2","level":"warning","message":{"text":"FingerprintView.body (cognitive 21): FingerprintView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3 (6 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":"bitchat/Views/FingerprintView.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa6ec73ec13d9e2b8324bb34e68d42c1ad5a8fa4d92d42158c52374aa38bb99"}},{"ruleId":"D2","level":"warning","message":{"text":"ShareViewController.processShare (cognitive 20): ShareViewController.processShare has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 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":"bitchatShareExtension/ShareViewController.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb614fe23337c5beb3bfc912c0a75596d119b0fcf80b27fa578a594b683b1eb"}},{"ruleId":"D2","level":"warning","message":{"text":"VoiceBurstPacket.decode (cognitive 20): VoiceBurstPacket.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Protocols/VoiceBurstPacket.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5308ef82baf1a9b2286f1960ad24418f4ffb52e3d57dfaf5f88c5db60b38b00"}},{"ruleId":"D2","level":"warning","message":{"text":"CashuTokenDecoder.decodeV3 (cognitive 20): CashuTokenDecoder.decodeV3 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, 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":"bitchat/Services/CashuTokenDecoder.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b6a0654c135da2d913bdbbe65d11a087bb1e53ff5028d021cf5d82051da0f9"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandProcessor.process (cognitive 20): CommandProcessor.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, match/switch 2, 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":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd951278cfee979fcf596deb788ac1bcfd6adb6a80799329f1be18fb2b63c263"}},{"ruleId":"D2","level":"warning","message":{"text":"SharedContentPayload.validate (cognitive 20): SharedContentPayload.validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, 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":"bitchat/Services/SharedContentHandoff.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc7ad53f9daa3291e1b56e434e4f880c8fa5ca6e7a73bdc7c665a3b905f640c"}},{"ruleId":"D2","level":"warning","message":{"text":"GossipSyncManager.buildGcsPayload (cognitive 20): GossipSyncManager.buildGcsPayload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee907931a838fe09f31e7efa924c6c0d6fa39cb4a5034af0db569b8a519a30b"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGroupCoordinator.applyGroupState (cognitive 20): ChatGroupCoordinator.applyGroupState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 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":"bitchat/ViewModels/ChatGroupCoordinator.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee94280eedf956fe49d3c8d17d44613a5c62d192b81499a0735120236df782a"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEFanoutSelector.collapseDuplicateLinksPerPeer (cognitive 20): BLEFanoutSelector.collapseDuplicateLinksPerPeer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 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":"bitchat/Services/BLE/BLEFanoutSelector.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c2a391c5dd6ef4b6236adaec1af33a209c7b9f7227ceb9b8d71f629f418400"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEPrivateMediaReceiptStore.commitAccepted (cognitive 20): BLEPrivateMediaReceiptStore.commitAccepted has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08d2f1061a4dd79d93c73391a91c1b9ff720893cea259c81755b997933f1c9c"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseHandshakeState.readMessage (cognitive 19): NoiseHandshakeState.readMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (6 pts), ternaries 1 (3 pts), 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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc8c7c43a72607036b03683ca8126b8114d2d0dc2ae260552fa1f7dcf55cba2"}},{"ruleId":"D2","level":"warning","message":{"text":"Geohash.decodeCenter (cognitive 19): Geohash.decodeCenter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Geohash.decodeBounds) 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":"bitchat/Protocols/Geohash.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b595e367020deb4dd81d43bfa71929d7f75eda726522dad702bdf4134e7a999"}},{"ruleId":"D2","level":"warning","message":{"text":"Geohash.decodeBounds (cognitive 19): Geohash.decodeBounds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Geohash.decodeCenter) 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":"bitchat/Protocols/Geohash.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb3b10d9d71ec9191adf437eab9bfaafa7c8bbca7808987079d9eb64c34b56e0"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMediaTransferCoordinator.cleanupLocalFile (cognitive 19): ChatMediaTransferCoordinator.cleanupLocalFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, error handling 2 (4 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":1127}}}],"partialFingerprints":{"codehealthFindingId/v1":"633a58adda303b73c9a320177c422f88027fb7fdb5bd60d90fa0cfe8231d8461"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatTransportEventCoordinator.handleNoisePayload (cognitive 19): ChatTransportEventCoordinator.handleNoisePayload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (2 pts), 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":"bitchat/ViewModels/ChatTransportEventCoordinator.swift"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"8877bbd79bdc28ada8fa3fae9d90e1e5e9f783da61d61a1e5bd58ee65cd13c6d"}},{"ruleId":"D2","level":"warning","message":{"text":"GeoPresenceTracker.subscribeNostrEvent (cognitive 19): GeoPresenceTracker.subscribeNostrEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, 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":"bitchat/ViewModels/GeoPresenceTracker.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"912f91ee078ce0dcb0d6e3344d691be23ba592054f5bed02c47b0fd4b4072315"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentHeaderView.body (cognitive 19): ContentHeaderView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 6 (7 pts), boolean chains 2, match/switch 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":"bitchat/Views/ContentHeaderView.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"39cbade0389f7816435839fecc393a9bdbe28e7b3b55565a72a9ba20e26a755a"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.deliverTransportEvent (cognitive 19): BLEService.deliverTransportEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":3577}}}],"partialFingerprints":{"codehealthFindingId/v1":"be41e4e520d4a6e6a3efff11a2011c52566ed3c05919fb26122597d2c224e606"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.openCourierEnvelope (cognitive 19): BLEService.openCourierEnvelope has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":4626}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ac85c37731fc614feac641a522d97f2c46be6a5c08c93ae506c29324cd512d"}},{"ruleId":"D2","level":"warning","message":{"text":"CourierStore.merge (cognitive 19): CourierStore.merge has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, match/switch 1 (3 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":"bitchat/Services/Courier/CourierStore.swift"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"2941c1b93b5fe26262a4a4f06cd7aedcdbd68a39ecbc5c0e36bfad8d16e86976"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeService.classify (cognitive 19): BridgeService.classify has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb7dcafbe339d821fa510d54000f507acde674ade5dc09fdae5e9db98c7da03"}},{"ruleId":"D2","level":"warning","message":{"text":"ConversationStore.auditInvariants (cognitive 18): ConversationStore.auditInvariants has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (6 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":"bitchat/App/ConversationStore.swift"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8053361867457c35a341ef728d2a632edb0c62d057e5d7c2fc466d4b79f3c9"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseCipherState.markNonceAsSeen (cognitive 18): NoiseCipherState.markNonceAsSeen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts), boolean chains 1 (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":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9d7507c5f1e9bc43b9017f04ff27a766d7949e00e47e4eed78e768f7c98668"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrRelayManager.handleDisconnection (cognitive 18): NostrRelayManager.handleDisconnection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, 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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c0d2c990d4d666de57396632305d91536ed373e9d8e0ce2255785d78f58616"}},{"ruleId":"D2","level":"warning","message":{"text":"LocationNotesManager.subscribe (cognitive 18): LocationNotesManager.subscribe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, 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":"bitchat/Services/LocationNotesManager.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe526246203e2fa6d8fde096022474edd5dcf69edeb230b8c181b2ecfb7f37d"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMediaTransferCoordinator.sendVoiceNote (cognitive 18): ChatMediaTransferCoordinator.sendVoiceNote has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, 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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"23bbb66fb7840758671950f8afd137e939563bfc1567230b7746445a59266ba6"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMediaTransferCoordinator.sendImage (cognitive 18): ChatMediaTransferCoordinator.sendImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d3325acd2ff98ba510df3e037d32c86d6971b3fd4693c3ac161a42a3c3b447"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMessageFormatter.formatMessageHeader (cognitive 18): ChatMessageFormatter.formatMessageHeader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0f70f4291ec25c75c1484ec22674d7a24a472f3251f376533665bfdfdca9bf6"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatViewModel.panicClearAllData (cognitive 18): ChatViewModel.panicClearAllData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e35599549b23da1b10b417a51ef08df90fcb1165f6613dc91a5b5e9dccf6e9f"}},{"ruleId":"D2","level":"warning","message":{"text":"NoticesView.reconcileGeoSession (cognitive 18): NoticesView.reconcileGeoSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 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":"bitchat/Views/NoticesView.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"766a22c52bfea6b57d9e311b3a8ff521c75f4e12e22105b3b813a80bfadca8d5"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeRenderer.drawGeohashGrid (cognitive 18): GlobeRenderer.drawGeohashGrid has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (5 pts) (nesting depth added 8). Of this number, 14 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"3692f2fa70ba70f7d4264dd7882464a5358694e74848dd17bacbb6a4bc1470a1"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeTouchSurface.touchesMoved (cognitive 18): GlobeTouchSurface.touchesMoved has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 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":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf1b2a18caec8ad72576a26d74b74c65dcd5215ae2d92733d9ada4de7c98d4ad"}},{"ruleId":"D2","level":"warning","message":{"text":"MediaMessageView.body (cognitive 18): MediaMessageView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Media/MediaMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9815b16efa21a195bdcbf387e3bce0da073fb8e8adf073a91c0cb1232940839"}},{"ruleId":"D2","level":"warning","message":{"text":"NoiseSessionManager.scheduleOrdinaryResponderTimeoutLocked (cognitive 17): NoiseSessionManager.scheduleOrdinaryResponderTimeoutLocked has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 7, 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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdcb7927f0cf3931c893b432e8613660639421cc600455e09012a934ab3becfb"}},{"ruleId":"D2","level":"warning","message":{"text":"PrivateMediaMessageIdentity.stableID (cognitive 17): PrivateMediaMessageIdentity.stableID has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1, match/switch 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":"bitchat/Protocols/BitchatFilePacket.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"90bd1df6309d952d1d187995d2a60b882a14988af095b6f08a90e7abeae4dacf"}},{"ruleId":"D2","level":"warning","message":{"text":"LocationStateManager.resolveCompositeAdminName::step (cognitive 17): LocationStateManager.resolveCompositeAdminName::step has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/LocationStateManager.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a9f58e65e3416ede12cc629d067e542e0856fadda8439613d1f4e5caffd903"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrTransport.sendAckItem (cognitive 17): NostrTransport.sendAckItem 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":"bitchat/Services/NostrTransport.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c97d489f4bec8e4f43d61aa24c9356af61f494c787ec395493eb153aa32f41a"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentPeopleSheetView.body (cognitive 17): ContentPeopleSheetView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, 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":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5a1c96d22cda497ab351aaf0ccef062140e3afc49aaa69093520a03c7684bf"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.handleReceivedPacketOnQueue (cognitive 17): BLEService.handleReceivedPacketOnQueue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5931}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1bf5e73da97d42b21afdd5555ada86b1c47b6add5dddf5c8b48a5acfa5ce881"}},{"ruleId":"D2","level":"warning","message":{"text":"CourierStore.deposit (cognitive 17): CourierStore.deposit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, 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":"bitchat/Services/Courier/CourierStore.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5caff37c27e98bbe845c24c14379cdcfd3fddc2e8451341005183a62dd642ed7"}},{"ruleId":"D2","level":"warning","message":{"text":"AppRuntime.handleScenePhaseChange (cognitive 16): AppRuntime.handleScenePhaseChange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 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":"bitchat/App/AppRuntime.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec5e9ad8c7f89e56eac44668bee5fdee7db9c9fe7551c760fc9ae4f2e6b5ba8"}},{"ruleId":"D2","level":"warning","message":{"text":"Geohash.encode (cognitive 16): Geohash.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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":"bitchat/Protocols/Geohash.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a82bb3ac93fe177449fb63cd1d3ecd10a487b43288ca707a5331a4c1e091e3f"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrCarrierPacket.decode (cognitive 16): NostrCarrierPacket.decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, match/switch 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":"bitchat/Protocols/NostrCarrierPacket.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e0ebc37f7fdce0ce54df13b01768834039792e884422005598f31da44304e9"}},{"ruleId":"D2","level":"warning","message":{"text":"AnnouncementPacket.encode (cognitive 16): AnnouncementPacket.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 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":"bitchat/Protocols/Packets.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"906841027b16c01ad650edc2ca95081bfbd4f2a4958f780cbb5ca3b5a771eb2b"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandProcessor.handleEmote (cognitive 16): CommandProcessor.handleEmote has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (5 pts), match/switch 1 (3 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":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"25331ca04be54a9d7e2ed13bffd09cb4052150fd9b864a02ea7b4fc4cd02a3c3"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatLiveVoiceCoordinator.absorbFinalizedVoiceNote (cognitive 16): ChatLiveVoiceCoordinator.absorbFinalizedVoiceNote has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 2, match/switch 1 (nesting depth added 2). Of this number, 13 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, 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":"bitchat/ViewModels/ChatLiveVoiceCoordinator.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c5bff819777ec946d47f3afc1601db704391830af1b1b8aebb0225eb9f50297"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMessageFormatter.isSelfMessage (cognitive 16): ChatMessageFormatter.isSelfMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca081779a3490df9e0d6d51dc5e52803b355fdebb09efbf389220fd5abea7a23"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatViewModel.performPrivateChatClear::continueClear (cognitive 16): ChatViewModel.performPrivateChatClear::continueClear has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd8ed68d82fe2d353b5b288ff19401745c690b37d9ef0ed39592c66417fe47b"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatViewModel.isSelfSender (cognitive 16): ChatViewModel.isSelfSender has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1326}}}],"partialFingerprints":{"codehealthFindingId/v1":"698a07683225ad82890d24cf05bdc6057ea5077846b0d61cdfb8f088c579b84c"}},{"ruleId":"D2","level":"warning","message":{"text":"GeohashSubscriptionManager.switchLocationChannel (cognitive 16): GeohashSubscriptionManager.switchLocationChannel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (2 pts), boolean chains 1, 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":"bitchat/ViewModels/GeohashSubscriptionManager.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac20780dff4baa1524647e8b42e2cd0bdee40b6cac245b5cfb1c9083795dcc7"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrInboundPipeline.processGeohashGiftWrap (cognitive 16): NostrInboundPipeline.processGeohashGiftWrap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9cbe77fc55b148fd94e8233cea2f1ceeb10d1a6c4bfdb5652d8b3bee25ac29"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrInboundPipeline.findNoiseKey (cognitive 16): NostrInboundPipeline.findNoiseKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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":"bitchat/ViewModels/NostrInboundPipeline.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17c0b18ca85c6f7ee24e508dfbf74c4fa7d7eae6fb1c61ec8b7381de91d4c7e"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEConnectionScheduler.handleDiscovery (cognitive 16): BLEConnectionScheduler.handleDiscovery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEConnectionScheduler.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"f17be3566ffb7974d4c87c9f5ab69a3b517e101d8ddd2239904dca8b386d53f1"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEFileTransferHandler.storeIncomingFile (cognitive 16): BLEFileTransferHandler.storeIncomingFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEFileTransferHandler.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"af11546d14b822d30a05377c7e84423be7371c402a13c416454021c2e00d0bd3"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.privateMediaSendPolicy (cognitive 16): BLEService.privateMediaSendPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 2 (4 pts) (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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1174}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb2e12429f3a60edad3b054c4ae8d18bafa1928a31cadb357d0a169fd4c59d3b"}},{"ruleId":"D2","level":"warning","message":{"text":"BLEService.handleReceivedPacket (cognitive 16): BLEService.handleReceivedPacket has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5881}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a47f117fa0a5f52d9622bccc73f01f6536b06c78d1cace161236554fc6a8510"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeCourierService.handleDropEvent (cognitive 16): BridgeCourierService.handleDropEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 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":"bitchat/Services/Gateway/BridgeCourierService.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c6a7773cb4ab3dbebcdc3dc64d8ea757e087f9d57ebf770957f9957539cd2f"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupCrypto.openMessage (cognitive 16): GroupCrypto.openMessage has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Groups/GroupProtocol.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"2237bb27a974a38de5825e673eb766122d05e3ed0f0dd4235e4293da61930521"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobeRenderer.draw (cognitive 16): GlobeRenderer.draw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 3). Of this number, 15 points are the body\u0027s own statements and 1 belongs 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":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3554c281c9589a1f7240f0bcc8ed0ec975ef4202d06ae2f34655b49ba573d68"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ChatViewModel: TooManyMethods \u2014 372 methods, declared across 21 files: ViewModels/ChatViewModel.swift (154), Extensions/ChatViewModel\u002BPrivateChat.swift (24), ViewModels/ChatPeerIdentityCoordinator.swift (23), ViewModels/ChatPrivateConversationCoordinator.swift (23), \u002B17 more file(s). The bar is 30 methods; this is 342 over it, 12.40\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"2834860f68361ca7adcc199c144a8a3d9784f0e6e3163b24176ea1ab2880857f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BLEService: TooManyMethods \u2014 294 methods, declared across 3 files: BLE/BLEService.swift (266), BLE/BLEService\u002BLinkLayerCentralRole.swift (15), BLE/BLEService\u002BLinkLayerPeripheralRole.swift (13). The bar is 30 methods; this is 264 over it, 9.80\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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"d36487d125c29a54d8fb60e1437d1ee66da1010edc85f653353fbc524f10deed"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: BLE/BLEService.swift: FileTooLong \u2014 4145 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3645 over it, 8.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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b71c2d9f113ce7e8258b31f4a7641e6d7c0c199553ca4fc8f2b4f1170fc1ebd9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BLEService: ClassTooLong \u2014 1610 significant lines (blank, comment-only and punctuation-only lines excluded), 294 methods. The bar is 400 significant lines; this is 1210 over it, 4.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"65d8cea276b5c360230ccd46c6987b5427440c2ba35ae0fc29056f1567613b31"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ChatViewModel: ClassTooLong \u2014 1213 significant lines (blank, comment-only and punctuation-only lines excluded), 372 methods. The bar is 400 significant lines; this is 813 over it, 3.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"57adbe113632107615857f2b752a03c9044cda81ee42a6f6a9a36270ac0bb7a7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: TorManager.swift.arti_start: FunctionTooLong \u2014 arti_start runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9696a9b92c50a264ae8179ad1da73329a6f3208fbfe436fd9b25b95495815d2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: TorManager.swift.arti_stop: FunctionTooLong \u2014 arti_stop runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.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":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb46e5e2f9bfbb3a4e343a98f7c5eadecdebd16f1e1958a9fc911f8063e68dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: TorManager.swift.arti_is_running: FunctionTooLong \u2014 arti_is_running runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.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":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ba8039e058dc2e7ac458941fb76378b626e0668591ad695342fec25157daa1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: TorManager.swift.arti_bootstrap_progress: FunctionTooLong \u2014 arti_bootstrap_progress runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.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":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"614ee36657323caf9c8c777be305c62f9c7ee003020d4e954f49605f5c43f5d2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: TorManager.swift.arti_bootstrap_summary: FunctionTooLong \u2014 arti_bootstrap_summary runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.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":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbab386275af43136847284378fa98ff151f08b4977877fd6e74003b695f27e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ViewModels/ChatMediaTransferCoordinator.swift: FileTooLong \u2014 1300 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 800 over it, 2.60\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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e3e8a9077e245c3a4fb6bae8c77f82abe43f6516ebb6a5137cf74f8607ed22"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ViewModels/ChatViewModel.swift: FileTooLong \u2014 1300 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ChatViewModel (125-2362). The bar is 500 significant lines; this is 800 over it, 2.60\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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"915fe390c6342eb9613427852d024d917169be5cd7406c739ada66f99ea02509"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChatMessageFormatter.formatMessageAsText: MethodTooLong \u2014 formatMessageAsText runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f5a4cf7874d47eb2913edf7a6d41adbd493eb5e074c48e3c0acd857c3bb9fc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Nostr/NostrRelayManager.swift: FileTooLong \u2014 1148 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: NostrRelayManager (131-1652). The bar is 500 significant lines; this is 648 over it, 2.30\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0444fdfbff97ce90bea4b29b33bed8e43dc3741770cf21bb5b28e082f92e09"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentHeaderView.body: MethodTooLong \u2014 body runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentHeaderView.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"4941f521a4038ec4169760af9a0ed90e9521bc96ec14edd89fb86caf312044b0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NoiseSessionManager.handleIncomingHandshakeWithResult: MethodTooLong \u2014 handleIncomingHandshakeWithResult 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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4063ea568263297279fef40ce443d876ceb3c06721651c01f1788135380795"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NostrRelayManager: ClassTooLong \u2014 887 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 487 over it, 2.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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d4cfdf34207b44968313219e0779372a41c93d06d8f314ff3565c60089f5e14"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NoiseSessionManager: ClassTooLong \u2014 836 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 436 over it, 2.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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"500b3ce211e312bca9e8cf702a6d0e1dd77b3c46abe14764d68d1985613cb856"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NostrRelayManager: TooManyMethods \u2014 57 methods. The bar is 30 methods; this is 27 over it, 1.90\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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"2860f8166e57f02ecdc5e8d9c89b548cb836bbae2a9dd9e0f66d3237337bb9b3"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BLEPrivateMediaReceiptStore: ClassTooLong \u2014 752 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 352 over it, 1.88\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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6aa486e39a5b61a0c7fc9a3a7272c7dad1d1159edc2eb58196c50dd0fc1a07"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentView.body: MethodTooLong \u2014 body 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":"bitchat/Views/ContentView.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"868fcd12fcf8e7fc7b64ca785cfbe23a50e425dc827bd567fbc715dd866ec0c9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FingerprintView.body: MethodTooLong \u2014 body runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.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":"bitchat/Views/FingerprintView.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"f06f7500b05a31421be9ad0afc59cb69399c305ffaf2dd50d663c1c486c72f0a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Noise/NoiseSessionManager.swift: FileTooLong \u2014 855 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: NoiseSessionManager (48-1289). The bar is 500 significant lines; this is 355 over it, 1.71\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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4ff14b9229ee886a5f9d51d2f4e4efd27757d6911d324605b4f8186ba7adab"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NoiseEncryptionService: TooManyMethods \u2014 51 methods. The bar is 30 methods; this is 21 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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"86176df19084afbabd0596a79bcc7ddedb9a88ec26759e3ceae187100239bd16"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ChatMediaTransferCoordinator: TooManyMethods \u2014 49 methods. The bar is 30 methods; this is 19 over it, 1.63\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":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"908b890937f7be5ee90863839e8dd46ddd6f4d8c4e5f8d8086e1b62206c8f776"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AppInfoView.settingsContent: MethodTooLong \u2014 settingsContent 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":"bitchat/Views/AppInfoView.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a295fc4b0bbd2f4cca2fd5ffad8ab071ad481e0817a2f5b99cefc5a68639b15"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BLEService.sendFilePrivate: MethodTooLong \u2014 sendFilePrivate runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1569}}}],"partialFingerprints":{"codehealthFindingId/v1":"82857c5d7ba5308fd63ba1654bca04ffebe5f3372c99089f14ab540f067a1d9c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MessageOutboxStore: ClassTooLong \u2014 619 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 219 over it, 1.55\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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fc93b94f59eac37aaa7d997a11b428cbc88964c225ff8236893bba1d906d36"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MessageListView.body: MethodTooLong \u2014 body 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":"bitchat/Views/MessageListView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4356af84a6cdc0f883020aa20caae0ac9937f20d0b7cd5d353099947ca380ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: BLE/BLEPrivateMediaReceiptStore.swift: FileTooLong \u2014 759 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: BLEPrivateMediaReceiptStore (27-1143). The bar is 500 significant lines; this is 259 over it, 1.52\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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"789c52283cf5ad786b329678cc9aa39e53ef0dd3ffcbffb214816e53b2e5eb10"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SecureIdentityStateManager: TooManyMethods \u2014 43 methods. The bar is 30 methods; this is 13 over it, 1.43\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":"bitchat/Identity/SecureIdentityStateManager.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccaa0bae9d065b32a97a28488756af8b45ffb0fd61352df6b3b8e89508e0ae79"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BLEPrivateMediaReceiptStore.loadDurableStateIfNeeded: MethodTooLong \u2014 loadDurableStateIfNeeded runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d7a0c4c25c01ffe259ac572c4b0d1a5cc955b30d61c48e618a8cffb2787b74"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: KeychainManager: ClassTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 162 over it, 1.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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b8ca4c83f68c6cc113c8165a55585fe5096e6fe215782f6d5c946672b93b47"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ChatMediaTransferCoordinator: ClassTooLong \u2014 561 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 161 over it, 1.40\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa5f379e3cde3fd32aafef19bb035b6f072d753943989c74b2202cb8f4c37d1"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AppInfoView: ClassTooLong \u2014 545 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 145 over it, 1.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":"bitchat/Views/AppInfoView.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d945a60255ef8c271882742c1d2a5ace8eded8423d878d12e1f83df2a2cdaa0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentPeopleSheetView.body: MethodTooLong \u2014 body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8134b5716aec7617b0e3fbe1fb139044819ac5559e5e63fe4e16bfdd8ff78f2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MeshPeerList.body: MethodTooLong \u2014 body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/MeshPeerList.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b930fbbb4626e7ea0b848645ec95c4340dcb85a1422f53963e4f7437bd8a10"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NoiseSessionManager: TooManyMethods \u2014 39 methods. The bar is 30 methods; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e3ce883beb5695ca22a28b0fff7e2fb54fbf617d1d098c910609713f818c25"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChatViewModel.performPrivateChatClear: MethodTooLong \u2014 performPrivateChatClear 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"579f5e2b79c2558c920456ee0822505fa6b9c64bcc077c7a9c193b33374e6d86"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Courier/MessageOutboxStore.swift: FileTooLong \u2014 627 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MessageOutboxStore (25-898). The bar is 500 significant lines; this is 127 over it, 1.25\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"367de62dd659b9d27c183039452cc61c1b70653130e4939e8b5d835cbf41131d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NoiseEncryptionService: ClassTooLong \u2014 501 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 101 over it, 1.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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"c350ae10a395aa683b8611b4bdd1690d00c88daca96ef39bda7503aa19f17beb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GossipSyncManager: ClassTooLong \u2014 500 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 100 over it, 1.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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f0ddb0e7ed0e65d8c5cb1f981dcae725c0b2658631e8d865f8d6202007842a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BLEIncomingFileStore: ClassTooLong \u2014 499 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 99 over it, 1.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":"bitchat/Services/BLE/BLEIncomingFileStore.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"48fcf3b6a6d2b77a663b6dfcbf55e438421478989cd39d8a9cb77de8424b4c71"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BridgeService: ClassTooLong \u2014 484 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 84 over it, 1.21\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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3791a39c67451039e5062b0996b44f9ac0e2e244978ba92514876c85548cdcae"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LocationChannelsSheet: ClassTooLong \u2014 483 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 83 over it, 1.21\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":"bitchat/Views/LocationChannelsSheet.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f50565f225e19ea2f2022202de4756c630c5a9dc50e9661b4ad62ae7f1dda33"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/AppInfoView.swift: FileTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: AppInfoView (7-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":"bitchat/Views/AppInfoView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1e57398fff3c36244815532d810cb8eecb6f28709180474cab61afec712ebe"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConversationStore: 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":"bitchat/App/ConversationStore.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b2b375f21fd5f2da9015a72f09ed27776f3930a491ffccff625275d1462f59"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/KeychainManager.swift: FileTooLong \u2014 596 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: KeychainManager (62-962). The bar is 500 significant lines; this is 96 over it, 1.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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fd5e5dfbcfe5e09a9cff4d6e6ed4cfbb0ac851150b267d6fdbfdda3359d05b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/NoiseEncryptionService.swift: FileTooLong \u2014 594 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: NoiseEncryptionService (153-1101). The bar is 500 significant lines; this is 94 over it, 1.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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbcff10c8dd0b10d8ff185e2e39adb05f0b9d3e61ff697afb59a83d84dbba6f0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BLEAnnounceHandler.handle: MethodTooLong \u2014 handle 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":"bitchat/Services/BLE/BLEAnnounceHandler.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"beaa9f2407a3c5d25c0747a35389c74a1d4e64a046981d1df5390c460f5d06fd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConversationUIModel: TooManyMethods \u2014 35 methods. The bar is 30 methods; this is 5 over it, 1.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":"bitchat/App/ConversationUIModel.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a0f73049be7891878ff0feb71fbb27fafcaf01fb1a88da58e19c75ee4bfbf7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Globe/GlobeView.swift: FileTooLong \u2014 581 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 81 over it, 1.16\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Globe/GlobeView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5f7e894f52cc190255bdb0df1a5e709398db274cfe3c9690e08ca44c8cbe78"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MessageOutboxStore.save: MethodTooLong \u2014 save runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68f5ebb6b7ec1b4cdc1212b71d2bf711cbba85e7ce049cd8c95fd7c3dc1c7d5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BLEFileTransferHandler.storeIncomingFile: MethodTooLong \u2014 storeIncomingFile 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":"bitchat/Services/BLE/BLEFileTransferHandler.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf0000fed54566a51f9bad5fe2da5bcdb0e133b4725c200a6abad6b2f5c6341e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NostrProtocol: ClassTooLong \u2014 454 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 54 over it, 1.14\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Nostr/NostrProtocol.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"361b71a2a7e9b0866ed065850d61ad224bb50f5e8a264a89f983d4fef36b5dd9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LocationStateManager: 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":"bitchat/Services/LocationStateManager.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a08b1c9336b177b77ea5344701ab949efb1106398457bfa638572911a2358b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ViewModels/ChatPrivateConversationCoordinator.swift: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: ChatPrivateConversationCoordinator (238-951). The bar is 500 significant lines; this is 62 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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a64a6e1b0e8f10ce1f3d5cad3755d260894104c77a11ba2d80edc3d64bb3fe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Nostr/NostrProtocol.swift: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: NostrProtocol (18-768). The bar is 500 significant lines; this is 60 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":"bitchat/Nostr/NostrProtocol.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf33f827b9f0c75b10300bb8bec634972d21639d1ba29fe5f841f0a48c46b436"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: BLE/BLEIncomingFileStore.swift: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: BLEIncomingFileStore (96-876). The bar is 500 significant lines; this is 60 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":"bitchat/Services/BLE/BLEIncomingFileStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11f097e80ee5281bae270cb90398a66306164162dd44ed3fa5470ab0b42736b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BinaryProtocol.decodeCore: MethodTooLong \u2014 decodeCore 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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"15918aef5b6c6b06fdc8136299fa5d33b56207815bca0242c10d25fc92417f6b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Noise/NoiseProtocol.swift: FileTooLong \u2014 558 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 58 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"749db3d2d121805f92c8e504e46580b6e0325043202a535ec219aa43e0e2a5b5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ChatPrivateConversationCoordinator: ClassTooLong \u2014 442 significant lines (blank, comment-only and punctuation-only lines excluded), 21 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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cfeb14f28fd40bea8f76da2dbd91b1e98e2a2700ae11d99edf864048ea4e1fc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/NoticesView.swift: FileTooLong \u2014 551 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: NoticesView (18-567). The bar is 500 significant lines; this is 51 over it, 1.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/NoticesView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb219854865cdfcf65a866a5c9e74e7baa549deb9406aa7080254ce5a5248da"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChatViewModel.panicClearAllData: MethodTooLong \u2014 panicClearAllData 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b3d0532e69ed7e6b35fe79d554f3828a6639fe9742e6c551b2703ff62ab657a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: arti_bitchat::socks::handle_socks_connection: FunctionTooLong \u2014 arti_bitchat::socks::handle_socks_connection runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 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":"localPackages/Arti/arti-bitchat/src/socks.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"456d1336ce16502bc9f7d966a6bd290b18721c90076cb2e987142c25c5aa314e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: KeychainManager.deleteAllKeychainData: MethodTooLong \u2014 deleteAllKeychainData 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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"f415e0d995129c397819bcf57462b03cc8d5ba1d1e1feeca2101487b0e8d1fcb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MessageRouter: ClassTooLong \u2014 434 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 34 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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"7181d775b6a0bc85683a2e67985cd18cf69824dce3ebfe5aa4abab0fe73d2093"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GossipSyncManager: 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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"305fb6d7f706f294da07be5fa270bf04110c66c10a16f079f021ce2aa54682fd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/ContentSheetViews.swift: FileTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5510f246634817cf5b8577a6aa977deacd8b2e7c77fb277af9a7450cb5aa2b12"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MessageOutboxStore.retryDeferredLoad: MethodTooLong \u2014 retryDeferredLoad 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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44cc97f508c521c22d6fafb233f0903138c2eb6760e39471eb2f8520dacb17a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Sync/GossipSyncManager.swift: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: GossipSyncManager (6-816). The bar is 500 significant lines; this is 18 over it, 1.04\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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"612e9e83b6709d55ce86c91a406560cf831c07790776f96cdc13414a4123794f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BLEPrivateMediaReceiptStore: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"077b53a2510b454693f5a996c41bb75f8f353d88fa51b2f1b6e21c7786cf0562"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: KeychainManager: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"63297e60dbfd8607701b9ebd9572b21afcaa6adb9d555bb97e5788ea61d8cf00"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NostrTransport: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/NostrTransport.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5dd9e12b8181140d85bcb2a1561e7244e6c9a457de0d6041441119a8ca8335f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/LocationChannelsSheet.swift: FileTooLong \u2014 506 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: LocationChannelsSheet (8-671). The bar is 500 significant lines; this is 6 over it, 1.01\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/LocationChannelsSheet.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"087aa4daf031cecaac65ceaf88a20d8c0b464d82af081444a8cdf862b6cca4fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): bitchat/Protocols/Geohash.swift:76-97 | bitchat/Protocols/Geohash.swift:102-121 \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":"bitchat/Protocols/Geohash.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"10682f239ba0e574a23f5026075702718ee3a2e1583dd2a8ac4c72c409098cac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): bitchat/Services/VerificationService.swift:148-163 | bitchat/Services/VerificationService.swift:165-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":"bitchat/Services/VerificationService.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03daeff16ce646399086ea6f29f5a35dbda8bb8f067b7bf153875c8031802d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): bitchat/Services/Board/BoardStore.swift:357-367 | bitchat/Services/Courier/CourierStore.swift:618-628 | bitchat/Services/Courier/MessageOutboxStore.swift:887-897 | bitchat/Services/Gateway/BridgeDropDedupStore.swift:126-136 | bitchat/Services/Groups/GroupStore.swift:206-216 | bitchat/Services/NostrProcessedEventStore.swift:96-106 | bitchat/Services/Prekeys/PrekeyBundleStore.swift:205-215 | bitchat/Sync/GossipMessageArchive.swift:69-79 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Board/BoardStore.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2db7e05e3d6ba701895f810d7a7b71e1636ca258f43fc1b7f1eb542fc5684be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:572-607 | bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:609-638 \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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"2003a186c839ae2477f9959148e3b66c65fa55621a11e470aa8ecad880fbdbae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): bitchat/Services/NostrProcessedEventStore.swift:74-94 | bitchat/Sync/GossipMessageArchive.swift:37-57 \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":"bitchat/Services/NostrProcessedEventStore.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a03211d6778e1bb0ee2af38b83b2248ef015fafdf04a4e81114877dd69a8cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): bitchat/Views/Components/ConnectivityStatusBanner.swift:101-115 | bitchat/Views/Components/PanicWipeBlockedBanner.swift:27-41 \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":"bitchat/Views/Components/ConnectivityStatusBanner.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa47fd0bd87713e48cc0c2bbe2fabc503177123ccb9d45ae255f54dc94da795e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): bitchat/Nostr/NostrProtocol.swift:382-395 | bitchat/Nostr/NostrProtocol.swift:460-473 \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":"bitchat/Nostr/NostrProtocol.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3aef57dfeb10834f52cfe51d7a4ea160ea87fb5cb5ab38e5f7265f53f11145"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): bitchat/Nostr/NostrRelayManager.swift:1875-1882 | bitchat/Nostr/NostrRelayManager.swift:1885-1892 \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":"bitchat/Nostr/NostrRelayManager.swift"},"region":{"startLine":1875}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e426977f9b5d5664b4ff0024369cd6c650e4f370a6e93b139d48e05d6f445a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (67\u201371 lines \u00D7 2): bitchat/Noise/NoiseProtocol.swift:644-714 | bitchat/Noise/NoiseProtocol.swift:784-850 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Noise/NoiseProtocol.swift:644\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseProtocol.swift"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9ff7489734ba25826eed2c06b4ef936553847a541c946f083f7c5207f38c0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): bitchat/Views/Components/TextMessageView.swift:72-101 | bitchat/Views/Media/MediaMessageView.swift:64-92 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Views/Components/TextMessageView.swift:72\u0060 it begins part-way through the construct above it, so those exact 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.firstTextBaseline\u0060 in one and \u0060.center\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, \u0060bitchat/Views/Components/TextMessageView.swift:102\u0060 calls \u0060padding\u0060 and \u0060bitchat/Views/Media/MediaMessageView.swift:93\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":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b3c6aa949aa62c949971c64e3bfd1435dd36522434677db9ac293f3afa59ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): bitchat/Services/Courier/MessageOutboxStore.swift:331-358 | bitchat/Services/Courier/MessageOutboxStore.swift:374-401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"701f1a8b49bf3286d5507b92ee2c6711a5d670670669f366ae2878aece203e94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): bitchat/Services/Courier/MessageOutboxStore.swift:521-548 | bitchat/Services/Courier/MessageOutboxStore.swift:553-580 \u2014 both copies are in the same file, so extract the block 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, \u0060bitchat/Services/Courier/MessageOutboxStore.swift:551\u0060 calls \u0060corrupt\u0060, \u0060error\u0060 and \u0060bitchat/Services/Courier/MessageOutboxStore.swift:520\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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec8dd04190b282ad21e9a02c1cdb8f5712ca9f30c0860677b8711be30376381a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201326 lines \u00D7 2): bitchat/Services/Gateway/BridgeService.swift:534-549 | bitchat/Services/Gateway/GatewayService.swift:190-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 \u0060bitchat/Services/Gateway/BridgeService.swift:534\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"1993187ad54875bd5e8aebce98c93dab6f0e9fd698a088f51d243f7778e2f947"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201324 lines \u00D7 2): bitchat/Features/media/ImageUtils.swift:57-80 | bitchat/Features/media/ImageUtils.swift:140-158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Features/media/ImageUtils.swift:57\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":"bitchat/Features/media/ImageUtils.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"8907452e57b4020044198627bc9f504ad4cebc7c2c9764c17d28319e3f0d1566"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:34-54 | bitchat/ViewModels/ChatMessageFormatter.swift:430-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. The matched lines also transfer control out of the body holding them, 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b40d9fc9a4ac4d7e648a1974ba5755697e740533b2b343c426f6f51799965d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201321 lines \u00D7 2): bitchat/Nostr/NostrProtocol.swift:533-553 | bitchat/Nostr/NostrProtocol.swift:562-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 \u0060bitchat/Nostr/NostrProtocol.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":"bitchat/Nostr/NostrProtocol.swift"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9a9c0ff1e1b83b2e099d110f2591c08dfa76530cbdd4ea5527fc2c254ee146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201321 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:1865-1882 | bitchat/Services/BLE/BLEService.swift:2675-2695 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:1865\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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1865}}}],"partialFingerprints":{"codehealthFindingId/v1":"600dc6ccadeb2483dd7536d79835d9359383f007a631cf9ddcc4047024d11fe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): bitchat/Services/KeychainManager.swift:474-494 | bitchat/Services/KeychainManager.swift:614-634 \u2014 both copies are in the same file, so extract the block 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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52f162ce6a5ace7822f7a3379fe564943dbf11b0d76aeb29ae7c82575afb4cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): bitchat/Services/NoiseEncryptionService.swift:367-386 | bitchat/Services/NoiseEncryptionService.swift:391-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 \u0060bitchat/Services/NoiseEncryptionService.swift:367\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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"510f56f7d575188ba3447326d401c10043d63e6796174321182786cd3d52da1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): bitchat/Features/voice/PTTAudioCodec.swift:117-135 | bitchat/Features/voice/PTTAudioCodec.swift:158-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Features/voice/PTTAudioCodec.swift:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Features/voice/PTTAudioCodec.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"7560d064412df3198bb6db0daa43340fb8b5a4da63afb7d9fe09e5ee5eb6b80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): bitchat/ViewModels/ChatViewModel.swift:866-884 | bitchat/ViewModels/ChatViewModel.swift:896-914 \u2014 both copies are in the same file, so extract the block 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f8eb778bf00170a86bf2e8edca78a15e56147c297d1f8303c980e9769c98ee9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:1022-1039 | bitchat/Services/BLE/BLEService.swift:1045-1062 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:1022\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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"445cfeabaa72fae6b4077ea1bf3c49b1d4958f9e8f5c116e6c77389883b6978d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): bitchat/ViewModels/ChatMediaTransferCoordinator.swift:642-659 | bitchat/ViewModels/ChatMediaTransferCoordinator.swift:673-690 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMediaTransferCoordinator.swift:642\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"0952639ddc6ffacbdf24b24e12738e3fe0227e70ff9cea5e0dd8e332a71c240b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 3): bitchat/Services/PrivateChatManager.swift:106-118 | bitchat/Services/PrivateChatManager.swift:175-191 | bitchat/ViewModels/ChatTransportEventCoordinator.swift:395-409 \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":"bitchat/Services/PrivateChatManager.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d82e4c51a7ba2aae302a50d96f2fbf25cfa10f6d85a9202e7a7632c41a11a85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): bitchat/Noise/NoiseSession.swift:108-124 | bitchat/Noise/NoiseSession.swift:134-150 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Noise/NoiseSession.swift:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSession.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b34c8d861d3bc492599d73a0dacf1af9b18b317c58f4e1001ce697468a41c76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): bitchat/Protocols/Geohash.swift:77-93 | bitchat/Protocols/Geohash.swift:103-119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Protocols/Geohash.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d502572797f3525ce38dfdde7f4e57e4744e60fe9d92a0b8cb836a2484f0f07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:75-91 | bitchat/ViewModels/ChatMessageFormatter.swift:411-424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMessageFormatter.swift:75\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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f7697cb9910371e2d09247b5c3902fc5d7f0b45365119c0df981a78679a52db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): bitchat/Views/Globe/GeohashPickerView.swift:178-193 | bitchat/Views/Globe/GeohashPickerView.swift:195-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Views/Globe/GeohashPickerView.swift:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"bitchat/Views/Globe/GeohashPickerView.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa07721bc14595991d98408b8b69669010ec9c267e18c211eb77fa048c68df54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): bitchat/Services/BLE/BLEService\u002BLinkLayerCentralRole.swift:121-136 | bitchat/Services/BLE/BLEService\u002BLinkLayerPeripheralRole.swift:72-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 \u0060bitchat/Services/BLE/BLEService\u002BLinkLayerCentralRole.swift:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService\u002BLinkLayerCentralRole.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59fa62444c400cff982033efb6b7718e64cb51857795be09866ca8f92f38637"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:586-601 | bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:623-635 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:586\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":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa1a5294f3f5103b29b44e5c339e91654459717909da54fe9af6481bcbc4e8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): bitchat/Views/Components/TextMessageView.swift:44-59 | bitchat/Views/Media/MediaMessageView.swift:44-59 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f537ab6e1b93847af8b330f08503ac09ba6819d9dfdaae5781eb01c1986d2d80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:4032-4046 | bitchat/Services/BLE/BLEService.swift:5334-5348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:4032\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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":4032}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e421136b765aaceef315459c37d03e1465f9a62081fb85569ea4d234d1e487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): bitchat/Services/Gateway/BridgeDropDedupStore.swift:102-116 | bitchat/Services/NostrProcessedEventStore.swift:78-92 \u2014 before extracting anything, compare \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift\u0060 and \u0060bitchat/Services/NostrProcessedEventStore.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Gateway/BridgeDropDedupStore.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d34420d12cbef50b7a7b3f9f02bf576b0af97d22af0ac1d8c2101cea55b5ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): bitchat/Services/Gateway/BridgeService.swift:694-708 | bitchat/Services/Gateway/GatewayService.swift:365-379 \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 \u0060bitchat/Services/Gateway/BridgeService.swift:694\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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e03fe2df0a9a2968dea15cff426c09f51364f0d2a2e819dde8cf3a716270df4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): bitchat/ViewModels/ChatViewModelBootstrapper.swift:343-357 | bitchat/ViewModels/ChatViewModelBootstrapper.swift:423-433 \u2014 both copies are in the same file, so extract the block 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":"bitchat/ViewModels/ChatViewModelBootstrapper.swift"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa79139a4216987b69a942eb82f443bbdcb5140df6a83cd22f19b7539617a19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): bitchat/Services/BLE/BLEService.swift:1627-1640 | bitchat/Services/BLE/BLEService.swift:1644-1657 | bitchat/Services/BLE/BLEService.swift:1672-1685 | bitchat/Services/BLE/BLEService.swift:1691-1704 \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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"6428529c75d2453d40228cd71bfd0424352576f05a685fdd4c99f50a38a79fc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): bitchat/Services/KeychainManager.swift:409-422 | bitchat/Services/KeychainManager.swift:569-582 \u2014 both copies are in the same file, so extract the block 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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"da71ff469eb7a7d97cb53f1facf616f7a6f10f6a771aeefc5ad7cf712f97f3ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): bitchat/Services/NoiseEncryptionService.swift:116-129 | bitchat/Services/NoiseEncryptionService.swift:131-144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"04972009c2e87d0606b91198f6f449983eeef610e30f42e090f7335401ec21c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): localPackages/BitFoundation/Sources/BitFoundation/BinaryEncodingUtils.swift:124-137 | localPackages/BitFoundation/Sources/BitFoundation/BinaryEncodingUtils.swift:143-156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060maxLength\u0060 to \u0060Int = 255\u0060 in one and \u0060Int = 65535\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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryEncodingUtils.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"8caf146707defd3c65780cd7661b8a5f63a838b7d9caa3a78ccfd978b20e8bb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201313 lines \u00D7 3): bitchat/Services/MessageRouter.swift:666-678 | bitchat/Services/MessageRouter.swift:725-731 | bitchat/Services/MessageRouter.swift:762-768 \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 \u0060bitchat/Services/MessageRouter.swift:666\u0060 it begins part-way through the construct above it, so those exact 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, \u0060bitchat/Services/MessageRouter.swift:732\u0060 calls \u0060insert\u0060, \u0060PeerMessageKey\u0060 and \u0060bitchat/Services/MessageRouter.swift:769\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":"bitchat/Services/MessageRouter.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"1592fb31d4c19548b6b74135fb523b95e0297d8dec115dcfc35803d3d34630f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift:411-423 | bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift:455-467 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0906613446ba0e1a0678b03ffff37957eb59828db96635c5f651f3609a95ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): bitchat/Views/FingerprintView.swift:134-146 | bitchat/Views/FingerprintView.swift:168-179 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Views/FingerprintView.swift:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/FingerprintView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"26a3e7d97dd819bd1799bd21295187346b281863df700155f0577cb32574d8d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): bitchat/Services/MessageFormattingEngine.swift:220-231 | bitchat/ViewModels/ChatMessageFormatter.swift:75-84 | bitchat/ViewModels/ChatMessageFormatter.swift:411-420 \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 \u0060bitchat/Services/MessageFormattingEngine.swift:220\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"9496518f3baff503fb820b239fc97256e6468205240555d497d38036f3810e06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): bitchat/Services/Courier/CourierStore.swift:605-616 | bitchat/Services/Courier/MessageOutboxStore.swift:874-885 \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":"bitchat/Services/Courier/CourierStore.swift"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd6936e494d6e7372ffb2a5641e08c5e580fc82727b79f0b907a432aa0a178fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): bitchat/Services/Gateway/BridgeService.swift:590-600 | bitchat/Services/Gateway/GatewayService.swift:271-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Gateway/BridgeService.swift:590\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"222d91dd81e9b68145a483c4d7c5828d8b266f2b92cf800f16495464304c9f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:573-584 | bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:610-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 \u0060bitchat/ViewModels/ChatPrivateConversationCoordinator.swift:573\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatPrivateConversationCoordinator.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"87dea57322b259a5fe53ac37ec9287609694df278d7e2a5c4c982fd8e808bc67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): bitchat/Views/Components/ConnectivityStatusBanner.swift:104-115 | bitchat/Views/Components/PanicWipeBlockedBanner.swift:30-41 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Views/Components/ConnectivityStatusBanner.swift:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Components/ConnectivityStatusBanner.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"0181fb2a5dfca8301fda88e6ee40d4a44f866f55eaadd48fa1cc07bfb781771d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): bitchat/Views/GroupChatList.swift:50-61 | bitchat/Views/RecentChatList.swift:59-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Views/GroupChatList.swift:50\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":"bitchat/Views/GroupChatList.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"41425192206d38f40ef6b0e5f7ed2b05f2a53c510f1347915df83192cb31b3e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 8): bitchat/Services/Board/BoardStore.swift:357-367 | bitchat/Services/Courier/CourierStore.swift:618-628 | bitchat/Services/Courier/MessageOutboxStore.swift:887-897 | bitchat/Services/Gateway/BridgeDropDedupStore.swift:126-136 | bitchat/Services/Groups/GroupStore.swift:206-216 | bitchat/Services/NostrProcessedEventStore.swift:96-106 | bitchat/Services/Prekeys/PrekeyBundleStore.swift:205-215 | bitchat/Sync/GossipMessageArchive.swift:69-79 \u2014 before extracting anything, compare \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift\u0060 and \u0060bitchat/Services/NostrProcessedEventStore.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Board/BoardStore.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c409f409e19b6e52585ed61c3d3ebe223178996648067b253d7e9b0bec94c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): bitchat/Sync/GossipSyncManager.swift:455-465 | bitchat/Sync/GossipSyncManager.swift:493-503 | bitchat/Sync/GossipSyncManager.swift:507-517 | bitchat/Sync/GossipSyncManager.swift:539-549 \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 \u0060bitchat/Sync/GossipSyncManager.swift:455\u0060 it begins part-way through the construct above it, so those exact 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, \u0060bitchat/Sync/GossipSyncManager.swift:473\u0060 calls \u0060decodeFragmentIdFilter\u0060 and \u0060bitchat/Sync/GossipSyncManager.swift:506\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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bd3d091fa9c28a68e6c762ba8dc6561ff68be337d8d9822441dd16170f59eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): bitchat/Services/Gateway/BridgeDropDedupStore.swift:101-111 | bitchat/Services/NostrProcessedEventStore.swift:77-87 | bitchat/Sync/GossipMessageArchive.swift:40-50 \u2014 before extracting anything, compare \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift\u0060 and \u0060bitchat/Services/NostrProcessedEventStore.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Gateway/BridgeDropDedupStore.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda6d35f5f350d23a2d5c72e12ea8f3be4db57f8d639a41355e8c213c105e5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): bitchat/Nostr/NostrEmbeddedBitChat.swift:22-32 | bitchat/Nostr/NostrEmbeddedBitChat.swift:45-55 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Nostr/NostrEmbeddedBitChat.swift:22\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":"bitchat/Nostr/NostrEmbeddedBitChat.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0068a4e3c2f6622236cda72a8f292771da060984b06f21d165e21e4e9f7c854e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): bitchat/Nostr/NostrEmbeddedBitChat.swift:67-77 | bitchat/Nostr/NostrEmbeddedBitChat.swift:90-100 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Nostr/NostrEmbeddedBitChat.swift:67\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":"bitchat/Nostr/NostrEmbeddedBitChat.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"53aaf4e846a1a5f765641eacdd8d266da30f0a8249e7b6493c5a9d18d93aba68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:4445-4455 | bitchat/Services/BLE/BLEService.swift:4493-4503 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:4445\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":4445}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb367aa8fd2073310fa570bfc9ae950beeff213ca2f914faf48f5aaad135e0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): bitchat/Services/Board/BoardStore.swift:323-333 | bitchat/Sync/GossipMessageArchive.swift:44-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Board/BoardStore.swift:323\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Board/BoardStore.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"d458f7b30656e6199385415070761fe74886752df2dc2deb5142fd9cab7f3297"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:150-160 | bitchat/ViewModels/ChatMessageFormatter.swift:271-280 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMessageFormatter.swift:150\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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d06ca59b52fbacc7d78daa7a22afc9d7643fac724909a0ed8f136730d69ca4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:217-227 | bitchat/ViewModels/ChatMessageFormatter.swift:330-340 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMessageFormatter.swift:217\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1e0043396b3d179826d27b95e0e0e06b59d23b91853041689e408204ec91fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): bitchat/Views/ContentSheetViews.swift:286-296 | bitchat/Views/ContentView.swift:437-445 \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 \u0060bitchat/Views/ContentSheetViews.swift:286\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"4035b9e50feb1f2526c0e7dc2ac5dde2c5ac5b7025a89cb560928cf1a8d9a3ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): bitchat/Sync/GossipSyncManager.swift:456-465 | bitchat/Sync/GossipSyncManager.swift:479-489 | bitchat/Sync/GossipSyncManager.swift:494-503 | bitchat/Sync/GossipSyncManager.swift:508-517 \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 \u0060bitchat/Sync/GossipSyncManager.swift:456\u0060 it begins part-way through the construct above it, so those exact 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, \u0060bitchat/Sync/GossipSyncManager.swift:473\u0060 calls \u0060decodeFragmentIdFilter\u0060 and \u0060bitchat/Sync/GossipSyncManager.swift:492\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":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"328de1a92bc5d2065c0428306502e57b9b11934c1604e6c2e4a7b34d3e0a8718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): bitchat/Noise/NoiseSessionManager.swift:231-240 | bitchat/Noise/NoiseSessionManager.swift:279-288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060bitchat/Noise/NoiseSessionManager.swift:241\u0060 calls \u0060cancelSuppressedInitiationRecoveryLocked\u0060 and \u0060bitchat/Noise/NoiseSessionManager.swift:289\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":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6d4dbe6fb0c4cca41208ec6b36116adc8ee06033da44a15cfa6728c043f97b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): bitchat/Nostr/XChaCha20Poly1305Compat.swift:21-30 | bitchat/Nostr/XChaCha20Poly1305Compat.swift:37-46 \u2014 both copies are in the same file, so extract the block 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":"bitchat/Nostr/XChaCha20Poly1305Compat.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"46bf1048a65f6ac4175d5e22e64f6ebab298791441edf4e7bbe02461d75fdaaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:2908-2918 | bitchat/Services/BLE/BLEService.swift:6607-6616 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:2908\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, \u0060bitchat/Services/BLE/BLEService.swift:6617\u0060 calls \u0060ingest\u0060 and \u0060bitchat/Services/BLE/BLEService.swift:2919\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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":2908}}}],"partialFingerprints":{"codehealthFindingId/v1":"3235ad249861e9abb4ce1406049679425695ca5833376f725adb092310678a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): bitchat/Services/VerificationService.swift:149-158 | bitchat/Services/VerificationService.swift:166-173 \u2014 both copies are in the same file, so extract the block 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":"bitchat/Services/VerificationService.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df11f32149293d68445b6b1d0161a759588b10e9c3f699b6d84e9f74a56ab92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): bitchat/ViewModels/ChatGroupCoordinator.swift:191-200 | bitchat/ViewModels/ChatGroupCoordinator.swift:267-276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatGroupCoordinator.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3533118ed05f3a1967154888db9188aa513cf31259ccb85c08c4f3b2181575"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift:199-208 | localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift:232-241 \u2014 both copies are in the same file, so extract the block 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":"localPackages/BitFoundation/Sources/BitFoundation/BinaryProtocol.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"a69d06f019f8431765fe963f6a11f552e3bd9c0e2a706c6b9110daea467ea3ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): bitchat/Services/Courier/CourierStore.swift:476-484 | bitchat/Services/Gateway/BridgeDropDedupStore.swift:110-118 | bitchat/Services/NostrProcessedEventStore.swift:86-94 \u2014 before extracting anything, compare \u0060bitchat/Services/Gateway/BridgeDropDedupStore.swift\u0060 and \u0060bitchat/Services/NostrProcessedEventStore.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Courier/CourierStore.swift:476\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":"bitchat/Services/Courier/CourierStore.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"e499d2a096358fdcec69d94b8340ebd29aec5dcd11f6f981fb8bb0d9f7629f60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): bitchat/App/PeerListModel.swift:384-392 | bitchat/ViewModels/ChatViewModel.swift:1884-1891 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/App/PeerListModel.swift:384\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"bitchat/App/PeerListModel.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ac57374a407237b68ec079cd53f1bce4b9c8d7219e75a785a7707a5503705f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift:218-229 | bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift:299-307 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift:218\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":"bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"2487e05990802a0fe5279dc9f862877138d7713783e60a022d031ff106c35c45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): bitchat/Services/Board/BoardStore.swift:328-336 | bitchat/Services/Groups/GroupStore.swift:179-187 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/Board/BoardStore.swift:328\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":"bitchat/Services/Board/BoardStore.swift"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42b364d1d53d66c0bb6bce1cf22aadafa2d85bd79bc2a6f717d8beb765943ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): bitchat/Services/Courier/MessageOutboxStore.swift:824-833 | bitchat/Services/MessageRouter.swift:529-538 \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":"bitchat/Services/Courier/MessageOutboxStore.swift"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2eaa59fb2354e4bede351c8b253099471038953b918bbe85646133c0f070bb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): bitchat/Services/Gateway/BridgeService.swift:654-660 | bitchat/Services/Gateway/GatewayService.swift:335-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 \u0060bitchat/Services/Gateway/BridgeService.swift:654\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f114df1c763a42db092be6207c21e5780c622d42f03f96a18292eb1eb3a915"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): bitchat/ViewModels/ChatMediaTransferCoordinator.swift:607-614 | bitchat/ViewModels/ChatMediaTransferCoordinator.swift:617-625 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMediaTransferCoordinator.swift:617\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef628f046059fa034b38e33b45ae00f8a8bfcb146595d1b1ad0d86aceda0937f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): bitchat/ViewModels/ChatMediaTransferCoordinator.swift:631-639 | bitchat/ViewModels/ChatMediaTransferCoordinator.swift:662-670 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMediaTransferCoordinator.swift:631\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatMediaTransferCoordinator.swift"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84ec16d8de868d8835499f0723130c34222eead282857d0dc04d19be3890360"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:50-58 | bitchat/ViewModels/ChatMessageFormatter.swift:377-385 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/ViewModels/ChatMessageFormatter.swift:50\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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"efdd4d7e99fac55049ba69e9f4fa74854c0dc9a54f87dbd1bb85e65ef1fb67e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): bitchat/Services/MessageFormattingEngine.swift:319-326 | bitchat/ViewModels/ChatMessageFormatter.swift:150-157 | bitchat/ViewModels/ChatMessageFormatter.swift:271-278 \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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b709e92a375056d1f707679aa622483ac8336434076e8189de6f51d99bd086c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20138 lines \u00D7 3): localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:327-334 | localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:336-343 | localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:345-349 \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 \u0060localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:345\u0060 it does not close everything it opens, so those exact 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":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"43aca30c8e41b21c799a787668cc86f01b0ac22b3d1e84f40a696dec54de077e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:289-295 | localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift:300-306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/BitFoundation/Sources/BitFoundation/BitchatMessage.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"737a86d7eeb1d69c716cbace31e76b063071848b29214872e22e927b159d789d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): bitchat/Services/BLE/BLEService.swift:5083-5089 | bitchat/Services/BLE/BLEService.swift:5137-5143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/BLE/BLEService.swift:5083\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":5083}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e8c306ce6d75e0fc66f693b2703ef8ba877c07d73800331c36f89ea5737c1a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/Services/CommandProcessor.swift:458-462 | bitchat/Services/CommandProcessor.swift:485-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"4db2afde2292719c731a588fe2e2952dd0a11259c4fcdfb876b27dea9755b104"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/Services/Gateway/BridgeService.swift:573-577 | bitchat/Services/Gateway/GatewayService.swift:250-254 \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":"bitchat/Services/Gateway/BridgeService.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5044701cc6af7fd31f3261604abf7c33f8eb3f2814b373b2e6fe9a783357c1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/Services/MessageFormattingEngine.swift:191-196 | bitchat/ViewModels/ChatMessageFormatter.swift:352-356 \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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ddfe87336595372384820dc5d805bdb8873e81e15b29bb001248e727ffede6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): bitchat/Services/MessageFormattingEngine.swift:310-315 | bitchat/ViewModels/ChatMessageFormatter.swift:162-167 \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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ea3583bffe426f4d72306ef5e18b933799ab7f06cc23b1fa019d3122d11cef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:118-124 | bitchat/ViewModels/ChatMessageFormatter.swift:127-133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060bitchat/ViewModels/ChatMessageFormatter.swift:125\u0060 calls \u0060matches\u0060, \u0060NSRange\u0060 and \u0060bitchat/ViewModels/ChatMessageFormatter.swift:134\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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3afc3f11240edcfe231d7ce5a3ae59d2df7c0b78308bc3bd92994ddde6fe98d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/ViewModels/ChatMessageFormatter.swift:342-346 | bitchat/ViewModels/ChatMessageFormatter.swift:354-358 \u2014 both copies are in the same file, so extract the block 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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d03fb56488bf720cd492ef6edaadfbb7fb928e76148438d294744e59bec5b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/ViewModels/VoiceRecordingViewModel.swift:203-207 | bitchat/ViewModels/VoiceRecordingViewModel.swift:213-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/VoiceRecordingViewModel.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cbec2afce5462fdce0468b79a8606e18e7349ff40faae165a8ff06c695c794"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/Views/Image Viewers/ImagePreviewView.swift:50-54 | bitchat/Views/Image Viewers/ImagePreviewView.swift:59-63 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Image Viewers/ImagePreviewView.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cd7f46fab1498039fb566021ed772ba7eae28e1eee09d8f41a7b4698f46518"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): localPackages/BitFoundation/Sources/BitFoundation/CourierEnvelope.swift:130-141 | localPackages/BitFoundation/Sources/BitFoundation/PrekeyBundle.swift:131-142 \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 \u0060localPackages/BitFoundation/Sources/BitFoundation/CourierEnvelope.swift:130\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/BitFoundation/Sources/BitFoundation/CourierEnvelope.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"33238cf7d535eba2b902f8525e7028b37f102dacb59b3e2df6754184b4fd9e79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): bitchat/Services/KeychainManager.swift:448-452 | bitchat/Services/KeychainManager.swift:506-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060bitchat/Services/KeychainManager.swift:448\u0060 it begins part-way through the construct above it, so those exact 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, \u0060bitchat/Services/KeychainManager.swift:512\u0060 calls \u0060warning\u0060, \u0060otherError\u0060 and \u0060bitchat/Services/KeychainManager.swift:454\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":"bitchat/Services/KeychainManager.swift"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9bb6b3e0ad7f560b52c7a0596c2435d2e569c3f5b05098bc4512dc76b644a77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): localPackages/Arti/arti-bitchat/src/lib.rs:76-87 | localPackages/Arti/arti-bitchat/src/lib.rs:128-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060localPackages/Arti/arti-bitchat/src/lib.rs:76\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/Arti/arti-bitchat/src/lib.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9645b20891c812714c18d2a27edebfcb22bca910845fc7f4e368bf919859d0"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: BitLogger: BitLogger: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6578827827d442f526394068e9335854b269bdf70ffcd12ce9a36c1632281221"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ChatViewModel (LCOM4 32): ChatViewModel\u0027s methods fall into 32 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 32 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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"bebb7ba8a79a32d33a24b9ddaffa00a8d39506373627d5baf1e64a55889c2a97"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Data (LCOM4 14): Data\u0027s methods fall into 14 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 14 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":"bitchat/Nostr/XChaCha20Poly1305Compat.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"c143e0af2e161ec9f85ad665351f8313f21e7842836f498abc3fcba84f7c5837"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: VerificationService (LCOM4 7): VerificationService\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":"bitchat/Services/VerificationService.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"01514a63f132084653631bc6c46ba1d6619fba590d1b773533a6f59563a4f96e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ChatNostrCoordinator (LCOM4 6): ChatNostrCoordinator\u0027s methods fall into 6 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 6 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":"bitchat/ViewModels/ChatNostrCoordinator.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cce8082e70007f24b3defba5ae9b08082c0dbb4c6ed931869fc17d390cd476d"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 6): String\u0027s methods fall into 6 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 6 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":"bitchat/Utils/String\u002BDJB2.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3f589de75c09df0423e1be36ebbbe2e2fa364601f0f3b36eee663f26acbe64"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: garbagePayloadsNeverCrash: 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":"bitchatTests/CashuTokenDecoderTests.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"15dba6e36de94bdb8139c90debf797b9ef738b88df24f1c66b70543d16a69eb3"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: stateNamingTheStoredCreatorWithAnotherSigningKeyIsRejected: 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":"bitchatTests/ChatGroupCoordinatorContextTests.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd7bd61aa639e366e62958f7c48840c6dda4efd8875622122d03b15f7217478"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: nonCreatorRosterOmittingUsDoesNotDeleteTheGroup: 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":"bitchatTests/ChatGroupCoordinatorContextTests.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"2952d0ef12ff3a15d8005494a42bccee3440e29752936b7bfa4cd81b6c462f54"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: staleCreatorStateIsRejectedIncludingStaleRemoval: 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":"bitchatTests/ChatGroupCoordinatorContextTests.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fabf78e2b552cce6951a4c6c2bf9658717560f72f32c2fa3416415067f9c6cd"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: concurrentMixedOperations: 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":"bitchatTests/MessageDeduplicationServiceTests.swift"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"a66afd8bb4aa5ddeccf104766552797d06f04157fd07c6f5752e4b920b796867"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptionFailsWithWrongRecipient: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f9e3d75c9390c8d21f2662b4ef9599e79cd5619358bd318ebca47c8f1fa55d1"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptRejectsAlternateInnerTagShapes: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa92e0292d0656e66c7dde09257c13716e52e0183bfc8a31307739e10905f30"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptRejectsOversizedCiphertextBeforeDecoding: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5f9b08c94ba487a58b9911257d5852616fe13f0fe8b1c1d064d10575b9c528"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptDoesNotMisinterpretStandardNIP44Payload: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"c41007c334ec6a264e06788c688381c3e08d861ad56d96577169727bb5814a0c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptRejectsWrongOuterKind: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ec436557c06f0a179d34b54b4ddf3bc688a71c04604207027e70db6c854911"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptRejectsInvalidSealSignature: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"79edec322179fc2d3c01db29c8862688b8ffd8a5fcda7418cb06cdc9e9dbdb33"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: decryptRejectsSealRumorPubkeyMismatch: 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":"bitchatTests/NostrProtocolTests.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c6a8b7a789eda4fd4e1c038edf1c6ee0c6edceeb909524afcca7293c9e45e70"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: verificationViews_renderCoreBranches: 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":"bitchatTests/ViewSmokeTests.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff1020e4eadd17c12df25a30c368fd91221e72d2a6c95b0a0c35dc6524a0d9db"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: deinitReleasesSessionAndStopsPlayback: 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":"bitchatTests/VoiceNotePlaybackControllerTests.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8915f961bfe2602baa1a1aed8e19a21e823587e770c7c01ad3c327de7e8265b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: prepareFailureCleansUpAndAllowsTheNextRecording: 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":"bitchatTests/VoiceRecorderTests.swift"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"eedc729bba12a541272f714ad8ed83db9e91eed256eecad80f7321b40bd0eabb"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: recordFailureCleansUpAndAllowsTheNextRecording: 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":"bitchatTests/VoiceRecorderTests.swift"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8996eb43f6e491f5067ac3d1bf6b53b3d964e9356bf920d42c1ba48aa411c9b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: simplePrivateMessage: 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":"bitchatTests/EndToEnd/PrivateChatE2ETests.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe437827834a167af112c8eb476421efe5e1984ecbb8e93efce9240fefe6ee42"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: privateMessageNotReceivedByOthers: 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":"bitchatTests/EndToEnd/PrivateChatE2ETests.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4aef75ee8762b4b782b867b634b568d4cfdd283c8e27d606bb148cc52abc58"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: privateMessageRelay: 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":"bitchatTests/EndToEnd/PrivateChatE2ETests.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f58e167c6bfb69949755bf783d2c0c0a8d8704b7b00abc45db982f47a11a66"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: privateMessageThroughput: 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":"bitchatTests/EndToEnd/PrivateChatE2ETests.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e416e05f9a20f6eff7de9f1a932b76f6451e3385f18a0a826c0f4a0e6153b6"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: largePrivateMessage: 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":"bitchatTests/EndToEnd/PrivateChatE2ETests.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cded3a59aeff879453c4878dadda78cbc6836bff2412283ef8abdbdf2eb5b09"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: approvedLegacySendCancelledBeforeDeferredAdmissionDoesNotTransmit: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"067bf39f5c364e29b81a60995b16abc23aabca7be293dc6b884f58a21b15dc35"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: approvedLegacySendDeletedBeforeDeferredAdmissionDoesNotTransmit: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"8449cce2e02c108f86dcc6cffa12506f09381c341f40aed164077546cd772b88"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: canonical0x20EncryptedFileIsAcceptedAcrossV1OuterPacket: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4954def9d4d1c491586aa860e2d0a63fecc51a4b090cb3129dd51ed0a08290"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: privateJPEGIsOpaqueBeforeFragmentationAndDelivers: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":1089}}}],"partialFingerprints":{"codehealthFindingId/v1":"018e9ccb9b300da4a97fbaca4f2ea9a2cad700ba1f6c5b1156e1b8d80e467cdd"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: finalizedPrivateM4AIsOpaqueBeforeFragmentationAndDelivers: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":1104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5374a553e7692ce5eeee2c6e161cf59f0cf8fe53670d8fcb7234390dc8bc4b78"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: privateMediaAboveOrdinaryNoiseLimitUsesV2OuterPacketAndDelivers: 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":"bitchatTests/EndToEnd/PrivateMediaEndToEndTests.swift"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9436a7a382d49ce07653d84b31ce77378c9e57f4469feab486a501e7e90792cb"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: simplePublicMessage: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d9d72873f7f339b6763e211b557080026827e32645eff052dcc58354278f97"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: multiRecipientBroadcast: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ef30a80d28edcae7d0a32b2fe01175219bc0ff06d1bac82420b9e32444a178"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messageRelayChain: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"260dca6263e0acd87f8221f84ce14acb1562bf4fd4a3052e13c5921e9dd87012"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: multiHopRelay: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b0ccaea7e6ba9f0497e03041292c94e475a5e700fbe59b0a7fdae0a9f15c96"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: ttlDecrement: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4788bfe92225a4498f47b51c670a47aac204ff692636f9a359ad21237e2a5b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: zeroTTLNotRelayed: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f386d24d2139ad463f8e8998f6865beb0dd9338155629c96dc9630f30f40d71"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: duplicateMessagePrevention: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"f768bd79ee2de3b91b6f01cfc434e7e832e7357633a1d15ae08e7cb3b122ce65"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: duplicateContentAsNewMessageNotPrevented: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"8edb14f2464acc1b9ef6a84fea84e02c73363617fbafea5e79c635b2cabb62b7"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: meshTopologyBroadcast: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd2a2f3c8148a05984f35c7f93ef0f32576648dce4a9671905035920ca90d32"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: partialMeshRelay: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9e993f077237dbe1a560af65c5a5cd6f8fd2f0f2c62057bd1c872c6ca75fba"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: highVolumeMessaging: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab993f97b3ad8d8f0ff0fa191f398cc528e29f8950223a8380b921cf1f897f0"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: largeMessageBroadcast: 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":"bitchatTests/EndToEnd/PublicChatE2ETests.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"938bcf95346e1f8d284c40d5635cf593ee0f80ac18737a6236bbca4a56f2c29f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: dynamicTopologyChanges: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3104cdfa37827b93b36293bbf24ef838fbb9d72df7f5e4f415327a8e28a30a40"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: encryptedAndUnencryptedMix: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"373ebc980e6586e42ec85a48f9954be338bb05b2c4b66a83ff73144d883be6d2"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messageDeliveryUnderChurn: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a000ebaedb95354b414e0078fe075736aa839ddcc7182b9435cff96b7d7ef891"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: peerPresenceTrackingAndReconnection: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"a927c7f79f88e07e5981bf1cb543763da5db0378710a758f54f6778016ac45b4"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: largeScaleNetwork: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"bba1d17bfeed098f8912ab8780a681ff5de16a3d84dbfd84d78f9170b0306462"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: highLoadScenario: 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":"bitchatTests/Integration/IntegrationTests.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3c4e855da00692862fbf0333a7681cbd3a78c05f8da4fbd7824267ee5bf1a68"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testGeochatPeopleListColors: 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":"bitchatTests/Performance/PerformanceBaselineTests\u002BGeochat.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d17ded995b83113c0ce0bd560e84ab4b5a15c8ea9f7c8817d38ba62a9742475"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testGeochatFormatNewMessages: 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":"bitchatTests/Performance/PerformanceBaselineTests\u002BGeochat.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53a345d45bb0ebf851f203566c05ee5905af7e43de50ed9c0b0490a74e6de14"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: preflightRejectsMalformedPayload: 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":"bitchatTests/Services/BLEAnnounceHandlingPolicyTests.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"448bf5c25268eccbc3ece09e3e9051577c3104779e12642781c040714afcc5db"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: preflightRejectsSelfAnnounceAfterSenderMatches: 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":"bitchatTests/Services/BLEAnnounceHandlingPolicyTests.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b21fac81172c929e35313c6b6868b5d7ddadedb915db248141a7ff0180b3c50"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: selfEchoIsDropped: 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":"bitchatTests/Services/BLEPublicMessageHandlerTests.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"847e2bdf231b0fda7d24c3369a418aad15937b83dd237b3ef50b96b6dd64a73f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: staleBroadcastIsDropped: 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":"bitchatTests/Services/BLEPublicMessageHandlerTests.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"a574d96ee4acfbbd1644704872e38ab110de78668d888809f3569129ca2cdf71"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: concurrentReadReceiptEnqueue: 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":"bitchatTests/Services/NostrTransportTests.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"24eea960ac73453912c6c37e8447c3af7f1a7cf19e8288b9776c5246a464f00c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: mockKeychain_canSimulateReadErrors: 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":"localPackages/BitFoundation/Tests/BitFoundationTests/KeychainErrorHandlingTests.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"497428c9f64dfd116eaf65b1f5479da18e892b47d11da5ad73ed130307c1b807"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: mockKeychain_canSimulateSaveErrors: 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":"localPackages/BitFoundation/Tests/BitFoundationTests/KeychainErrorHandlingTests.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2271c61713b3fdaa600618f444d29d52c4d31c90dffb5f2ec3b142118096f8e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: mockKeychain_returnsItemNotFoundForMissingKey: 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":"localPackages/BitFoundation/Tests/BitFoundationTests/KeychainErrorHandlingTests.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54c901485bc113a1424e9b67a59640b6a1247877a3f5bd9f31b014633e9718b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/ViewModels/ChatMessageFormatter.swift: bitchat/ViewModels/ChatMessageFormatter.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in ChatMessageFormatter.formatMessageAsText at line 31. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/ViewModels/ChatMessageFormatter.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":"bitchat/ViewModels/ChatMessageFormatter.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f99f5e2ee129d95acaeaa266bd1c1e5bb6e000254d23d351bdc0a507cf5ec6d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Services/BLE/BLEService.swift: bitchat/Services/BLE/BLEService.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in BLEService.sendOnAllLinks at line 2261. 4 of those changes were fix/bug commits, and the other 9 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Services/BLE/BLEService.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":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":2261}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4098bb38ce2ac550ee7f533a99b5d26a8c84ba2b7c818f74baa2b143a05f40"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/ContentView.swift: bitchat/Views/ContentView.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ContentView.body at line 229. 2 of those changes were fix/bug commits, and the other 5 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/ContentView.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":"bitchat/Views/ContentView.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce47edbb916143ddde4c075a525d41315bafeba366934dd66953a8e4a4b83d9b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/MessageListView.swift: bitchat/Views/MessageListView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in MessageListView.body at line 98. 1 of those changes was a fix/bug commit, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/MessageListView.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":"bitchat/Views/MessageListView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"60aaf3f26738b413d21a59d1d88a7175a5faa69bbbbff9150b388c68315b86fe"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/ContentSheetViews.swift: bitchat/Views/ContentSheetViews.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ContentPeopleSheetView.body at line 125. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/ContentSheetViews.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":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02b96b42fe2be909296303fc06f50865b68726817f4e01cbc53fd479a48322b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/App/PeerListModel.swift: bitchat/App/PeerListModel.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in PeerListModel.refresh 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/App/PeerListModel.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":"bitchat/App/PeerListModel.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2c79f45a1c9197c05b0e90be91f1832bf05b9e9f3f1d1638ccb4a1b5d918ba"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/ContentHeaderView.swift: bitchat/Views/ContentHeaderView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ContentHeaderView.body at line 43. 1 of those changes was a fix/bug commit, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/ContentHeaderView.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":"bitchat/Views/ContentHeaderView.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fdadf7f9285774843bcef07078e10f0a06c31d9f98a5552402ef9540e9a136a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/Components/TextMessageView.swift: bitchat/Views/Components/TextMessageView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in TextMessageView.body at line 35. 1 of those changes was a fix/bug commit, and the other 2 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/Components/TextMessageView.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":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce474c6550bba1a2fdd9aed2783ee3f3e4f06ff4358b7fabfe051d091869d8d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Services/CommandProcessor.swift: bitchat/Services/CommandProcessor.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in CommandProcessor.handleBlock at line 302. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Services/CommandProcessor.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":"bitchat/Services/CommandProcessor.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"3111a2b9fd50239f1b8b67046db1b5f09e44aa4f7410f41c0d74b9403507cbbf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/GeohashPeopleList.swift: bitchat/Views/GeohashPeopleList.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GeohashPeopleList.body at line 34. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/GeohashPeopleList.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":"bitchat/Views/GeohashPeopleList.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce36384e9a8c11c10899259080f3bf95dd13c17ab0efeb84361f61c35d127bb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: bitchat/Views/Media/MediaMessageView.swift: bitchat/Views/Media/MediaMessageView.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MediaMessageView.body at line 35. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 02:55:00 \u002B02:00\u0027 --until=\u00272026-10-25 02:55:00 \u002B02:00\u0027 --full-history --no-merges -- bitchat/Views/Media/MediaMessageView.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":"bitchat/Views/Media/MediaMessageView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"718896638674735e75f51d5ec433eedcd76532fb32a67bcbe247994d34e2967c"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 80 significant file(s) lose their only recent owner: bitchat/Noise/NoiseSessionManager.swift, bitchat/Services/Gateway/BridgeService.swift, bitchat/Services/BLE/BLEPrivateMediaReceiptStore.swift, bitchat/ViewModels/ChatPrivateConversationCoordinator.swift, bitchat/App/ConversationStore.swift, bitchat/Services/Courier/MessageOutboxStore.swift, bitchat/Views/NoticesView.swift, bitchat/ViewModels/ChatGroupCoordinator.swift (\u002B72 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"736fed980a114a3c18e4c9ebf7cd3e45aea4348000aec073d691165400f3b964"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (83 single-owned of 241 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 241 of the 318 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: bitchat/Services/BLE/MimeType.swift, bitchat/Models/ReadReceipt.swift, bitchat/Services/ComposerDraftStore.swift."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(#1434): negotiate an explicit per-peer fragment limit so a future"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":2012}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4c60b43dcf7c63faed9b0629274198ef4213c87420aa943952b8b9b329b505e"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 6.0/10. The most over is \u0060(repository root)\u0060 (74008 LoC, 677 module-visible types across 27 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6dc36d526d558956de0f1673dc8b59b1ca5e90fb49c114a846da8b88176dc301"},"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":"d333565f8410d5fc2e3f490d29a8393449dbb38776e25918b8477df9639e8c74"},"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":"74e6d71c88f2358a1228f1be4a5a543cdc88e6c83a99fa4667ae7ede133a7ab8"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"1480114a18648420d983e4d1f650c479255315939e69b5cbdfde0b30a1457dcc"},"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":"e3d8328d499d48dec0767a20cff1d6a867160fb9dabd5f9bbba71be8a37c66cc"},"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":"3e433e969412014a486b814f023b8d0dbc4bfb074e7f88c401e3ca7b02032cff"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ba680a2064f97da86b37abec0d8d179722da11a7d88d792d527e2ddac31a6d66"},"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":"dcdc7991a8ed7ad2695c37c3aa96f03d68ce7ec5e2b167916d3e9d15b862f381"},"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":"7576ca2725e43fbaa79722bc14423f911397e9eac95764bdcfe81c97f5ec11e5"},"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":"766b91298dfaa22f878d3113419f4744fab3261fc7cc30082f9ca385ea1844fa"},"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":"4f5e3045dbc409f20825a795a9d8f90819126d15397b607846529152a65c65e9"},"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":"2e5c88911c762cdcad0684372de562f64f669b13bcaf9321fe4ea08f51e5fa50"},"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":"8eed8d3b19719e8ee168396f76d2ff3a634b275088fcd0c793a2b484ce2f57aa"},"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":"dbf3d95854d34b782300ab9cbb404746ac2f0a6b855b34d12409560b40830979"},"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":"26fbbc8d67193994b53016c2b28a8453610c5fc2577f39add110ef488046db9e"},"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":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 7 of 241 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 241 of the 318 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: bitchat/Services/BLE/MimeType.swift, bitchat/Views/Image Viewers/ImagePreviewView.swift, bitchat/Nostr/Bech32.swift, bitchat/Noise/NoiseRateLimiter.swift, bitchat/Models/ReadReceipt.swift, bitchat/Sync/RequestSyncManager.swift, bitchat/Views/Image Viewers/ImagePickerView.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/MimeType.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26b75a9793facff28f538890905bf04664920c3aadd04cacee5093e2e4bc827"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Image Viewers/ImagePreviewView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d1b5e536207f5bb07c68c065192b734168273cb63392eaf0c17377c188d6aa8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Nostr/Bech32.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e68e8a9b29e7a6c04abd77b0d7337c9c02ad3ed06a9d4e4698dd962137a92c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseRateLimiter.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b47a09414fd7a09ef8fd4a791067870c2ce2a53811a6b1f9a1c2db82f7d6f9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Models/ReadReceipt.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7338b1b09623054017406f4655fdf57d251c5105e3de0dbb034c3d42efa8a157"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Sync/RequestSyncManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a315202604a11fd5081b4474e858c34c913e26e7d8348d18bf4ac352488dbf"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/Image Viewers/ImagePickerView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dd4b0c29a5d11094bd2bb8d01f714bf79bcda39d69d2823c4c80f2aead89501"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: ContentView.swift \u2194 ShareViewController.swift: \u0060bitchat/Views/ContentView.swift\u0060 (context bitchat) and \u0060bitchatShareExtension/ShareViewController.swift\u0060 (context bitchatShareExtension) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 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) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060bcb21f21\u0060 Require review before importing shared content (#1430); \u0060d01538a2\u0060 Fix Localizations (#684); \u0060a7d5b2d7\u0060 Centralize remaining magic numbers; finalize logging hygiene across U\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38fe8d40f6686c81383323659b970aaa2429c9356f80f4d33c8621cae2dd0cbd"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: BitchatApp.swift \u2194 ShareViewController.swift: \u0060bitchat/BitchatApp.swift\u0060 (context bitchat) and \u0060bitchatShareExtension/ShareViewController.swift\u0060 (context bitchatShareExtension) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 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) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060bcb21f21\u0060 Require review before importing shared content (#1430); \u00607c4bde59\u0060 Xcode Configuration files: \u0060.xcconfigs\u0060 \u002B Remove \u0060xcodegen\u0060 (#608); \u0060a7d5b2d7\u0060 Centralize remaining magic numbers; finalize logging hygiene across U\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/BitchatApp.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ab4523d03731ca810d5512b71efa1842caf4da86d4afcb0481c64705081c3c"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: ChatViewModel.swift \u2194 ShareViewController.swift: \u0060bitchat/ViewModels/ChatViewModel.swift\u0060 (context bitchat) and \u0060bitchatShareExtension/ShareViewController.swift\u0060 (context bitchatShareExtension) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 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) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u0060bcb21f21\u0060 Require review before importing shared content (#1430); \u0060d01538a2\u0060 Fix Localizations (#684); \u0060a7d5b2d7\u0060 Centralize remaining magic numbers; finalize logging hygiene across U\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"525d051d59f1d3618907993a98bc58f13fd3bdbd96c41f85633ca2c5b76e8e92"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: NoiseSession.swift \u2194 NoiseEncryptionService.swift: \u0060bitchat/Noise/NoiseSession.swift\u0060 and \u0060bitchat/Services/NoiseEncryptionService.swift\u0060 change together 67% of the time (16 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are \u006003c357f0\u0060 PeerID 11/n: \u0060Noise\u0060 types use \u0060PeerID\u0060 \u002B create separate files (#750); \u006000ff5fd3\u0060 Refine panic mode to regenerate identities immediately (#624); \u0060347ce5ec\u0060 Modularization: Extract SecureLogger into a separate module (#600) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSession.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5dacd7968e9d5f87483bec2c440f3248a3ca244339a6fb6b3c8997f61d37def"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: ContentView.swift \u2192 BitchatPeer.swift, GeohashPeopleList.swift, MeshPeerList.swift: \u0060bitchat/Views/ContentView.swift\u0060 changes together with 3 other files \u2014 \u0060bitchat/Models/BitchatPeer.swift\u0060, \u0060bitchat/Views/GeohashPeopleList.swift\u0060, \u0060bitchat/Views/MeshPeerList.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Views/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44efe2477c3a1093f2f9ea7859825eb933f8177472b19c7770c53c42ad47c133"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: BLEService.swift \u2194 UnifiedPeerService.swift: \u0060bitchat/Services/BLE/BLEService.swift\u0060 and \u0060bitchat/Services/UnifiedPeerService.swift\u0060 change together 59% of the time (13 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are \u0060ad4103ba\u0060 Refactor Nostr ID Bridge \u0026 Keychain Helper (#796) (at that commit the file was still \u0060bitchat/Services/BLEService.swift\u0060); \u006010e3f574\u0060 PeerID 16/n: BitchatPeer / PeerInfo / TransportPeer (#755) (at that commit the file was still \u0060bitchat/Services/BLEService.swift\u0060); \u0060f86ae5e2\u0060 PeerID 14/n: \u0060Transport\u0060 and its dependents (#753) (at that commit the file was still \u0060bitchat/Services/BLEService.swift\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"19653cdc5fa2c3c0c3c5752e43db106b3e5f4c65205f7851a03c91c9c50b17b6"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0c1d806a78ee975e98031e0eb0b99c816b2af68d03e53c021daa554377160dbb"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"02daaefd1f7fefdb2c33bdd1c080527e5e21c42a88cf1d88c8c99d610c3b1709"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cb0570a32b741274e497aa89bc8bf7a66e1606285a4f0ca3cd27d7c4ae95706e"},"taxa":[{"id":"CICD-SEC-4","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":"4f1e7684f8281bd255ddef97105c7055c2ebae06964c8745716b83e174debe83"}},{"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":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: NoiseSession.processHandshakeMessage: \u0060NoiseSession.processHandshakeMessage\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSession.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"766338e7fa76069292dc5b4b7a0042d7d315063bbdd28cac19aa702e424f661d"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: NoiseSessionManager.handleIncomingHandshakeWithResult: \u0060NoiseSessionManager.handleIncomingHandshakeWithResult\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Noise/NoiseSessionManager.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"e269c35dcf68d51995fde6c9048fa20c57a185057c294d49f2038b353dc1f6c0"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: NoiseEncryptionService.handleSessionEstablished: \u0060NoiseEncryptionService.handleSessionEstablished\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0257d53d24a826975d7d88e55011be307a789e0ef1b0114bf2696bb5b06427"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: PTTCaptureEngine.handleInterruption: \u0060PTTCaptureEngine.handleInterruption\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Features/voice/PTTCaptureEngine.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"06cabab93ad7548a3a20590631201358c4f4ea894c0a7b011024829068e431f8"}},{"ruleId":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: BLEService.onEngine: \u0060BLEService.onEngine\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Services/BLE/BLEService.swift"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"734a19fa9ce8c1b7c490b8100b0e1cebb6b4863d6a3a2cf23ba498acf517821e"}},{"ruleId":"ED4","level":"error","message":{"text":"Dual write (no outbox): GossipSyncManager._onPublicPacketSeen: \u0060GossipSyncManager._onPublicPacketSeen\u0060 performs two independent DURABLE writes \u2014 \u0060messages\u0060 (a persistence store) via \u0060insert\u0060 and \u0060fragments\u0060 (a persistence store) via \u0060insert\u0060 \u2014 in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bitchat/Sync/GossipSyncManager.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2845535f9077168a8fa9a37504f74cbf285f497c107cab66ce04298bdaeb3090"}},{"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":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 6 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/arti-provenance.yml"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!key.isEmpty \u0026\u0026 key == post.authorSigningKey\u0060 appears character-identically in 2 files \u2014 bitchat/App/AppRuntime.swift, bitchat/Services/Board/BoardManager.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":"bitchat/App/AppRuntime.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1339216a9cce1f9157055542de0b708c18f4a3ec976988dccc2fd9a05d69ac"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060NSClassFromString(\u0022XCTestCase\u0022) != nil || env[\u0022XCTestConfigurationFilePath\u0022] != nil || env[\u0022XCTestBundlePath\u0022] != nil || env[\u0022GITHUB_ACTIONS\u2026\u0060 appears character-identically in 3 files \u2014 bitchat/Services/LocationStateManager.swift, bitchat/Services/NotificationService.swift, bitchat/Services/TestEnvironment.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":"bitchat/Services/LocationStateManager.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a7bdfd5d0f11943a800acd9949c4b8f5f39e778dbcf22db958b49edb1305a9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060content.contains(\u0022://\u0022) || content.contains(\u0022www.\u0022) || content.contains(\u0022http\u0022)\u0060 appears character-identically in 2 files \u2014 bitchat/Services/MessageFormattingEngine.swift, bitchat/ViewModels/ChatMessageFormatter.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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"879a55cd181da0306176ff0bdd2346a959624c5defa5ba51c2c35ea3b1d13552"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060content.lowercased().contains(\u0022ln\u0022) || content.lowercased().contains(\u0022lightning:\u0022)\u0060 appears character-identically in 2 files \u2014 bitchat/Services/MessageFormattingEngine.swift, bitchat/ViewModels/ChatMessageFormatter.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":"bitchat/Services/MessageFormattingEngine.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac9c81b7a665b80a0dab436ec0ad360b65c80b12e122bcd3cc1ad79283dbb2c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060event.kind == NostrProtocol.EventKind.ephemeralEvent.rawValue || event.kind == NostrProtocol.EventKind.geohashPresence.rawValue\u0060 appears character-identically in 2 files \u2014 bitchat/ViewModels/GeoPresenceTracker.swift, bitchat/ViewModels/NostrInboundPipeline.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":"bitchat/ViewModels/GeoPresenceTracker.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32ad66e81b70693012e330b9b9f3e15adaa9aea891af292598fa4951be1fb37"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060includingVoiceAlert \u0026\u0026 voiceRecordingVM.showAlert\u0060 appears character-identically in 2 files \u2014 bitchat/Views/ContentSheetViews.swift, bitchat/Views/ContentView.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":"bitchat/Views/ContentSheetViews.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec1f99d68e93b28a56b18cb6d41a6fba007f0c9e1ba7d59384a492fc57706ef"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060message.isPrivate \u0026\u0026 conversationUIModel.isSentByCurrentUser(message)\u0060 appears character-identically in 2 files \u2014 bitchat/Views/Components/TextMessageView.swift, bitchat/Views/Media/MediaMessageView.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":"bitchat/Views/Components/TextMessageView.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c83e5baa6843f721b9930221f1467b5e09abb8da54016075041f663440804f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060order.count \u003E capacity || payloadBytes \u003E byteBudget\u0060 appears character-identically in 2 files \u2014 bitchat/Services/BLE/BLEDirectedRelaySpool.swift, bitchat/Sync/GossipSyncManager.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":"bitchat/Services/BLE/BLEDirectedRelaySpool.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf0482a65cc55c732b25f51467573cc9cd48a86bc0dd31d1dfe38064cc0be37"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060packet.type == MessageType.announce.rawValue \u0026\u0026 packet.ttl == directAnnounceTTL\u0060 appears character-identically in 2 files \u2014 bitchat/Services/BLE/BLEIngressLinkRegistry.swift, bitchat/Services/BLE/BLEOutboundLinkPlanner.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":"bitchat/Services/BLE/BLEIngressLinkRegistry.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b62c5c7259c0f8623f0d1e22f7e13a612ffb4f1a038c01567f827a1f5cf67c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060peerID == localPeerID \u0026\u0026 packet.ttl != 0\u0060 appears character-identically in 2 files \u2014 bitchat/Services/BLE/BLEFileTransferPolicy.swift, bitchat/Services/BLE/BLEPublicMessagePolicy.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":"bitchat/Services/BLE/BLEFileTransferPolicy.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"820ecf88b114800b03dd612f536755aeb811c19edeef57cbef3f37c1f7dcb4e3"}},{"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":"localPackages/Arti/Sources/TorManager.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"46cd029ed8c83b5dbfed73e8e34022c5e41b3d9fc9ef4ff953e64338945ebf57"}},{"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":"bitchat/ViewModels/ChatViewModel.swift"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20a34692a458b4cc6cb2d0660cb170f7dc5d2d0212f9e56db3c0bac536c27ae"}},{"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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e102f20065bd59bbf91936cd1574942daa338ae32c0ced615a08a17105fca0e"}},{"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":"bitchat/Services/NoiseEncryptionService.swift"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"11a580d3b943cfe66c6806d840a54416318a12e851721a5b11ab156cf90d6f02"}},{"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":"bitchat/Services/Groups/GroupProtocol.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e311c36aaca696e5017183fcbfee7477bad4046791353252fd26f7527c6db1"}},{"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":"bitchat/Nostr/GeoRelayDirectory.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"76fdd33ad71e136f87e59cc49e72c30d71a4a72dd4c3ea496018f5fa6e4befc2"}},{"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":"bitchat/Models/BitchatMessage\u002BMedia.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"43823f8745d57de8baaa744e28f7824dfd37d7b0d9b972cfa5edfe26a42ea5d5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060migrateFileProtectionIfNeeded\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":"bitchat/Services/BLE/BLEIncomingFileStore.swift"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"03141295235fa068f08e1cc9841f3bea39ddfa7d778ae73b92ced2f873f13ed3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060arti_bootstrap_summary\u0060 turns every \u0060Err\u0060 into \u0060-1\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"localPackages/Arti/arti-bitchat/src/lib.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"605eb73140ff3a8c9ff8b11decf64c699428eff1ee47bd9f500b4b93de05eeea"}}],"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-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"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":22,"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."]}]}