{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"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":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"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":"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":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"RPCServer.handleSend (cyclomatic 84): RPCServer.handleSend has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSendHandlers.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"891e9cfad5a52e678946655fcec1545874ccb64cd6979c5cee6b83f7b445f16b"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handleLine (cyclomatic 58): RPCServer.handleLine has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BDispatch.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"286f6d256fd440b71a78e39e666405feb19ed1f45390b3078bd980bf42e4612a"}},{"ruleId":"D1","level":"warning","message":{"text":"SendCommand.run (cyclomatic 30): SendCommand.run has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b1787207ae828004e3d6aa763011050c3c97d5d16716f07197ddcde5907b66"}},{"ruleId":"D1","level":"warning","message":{"text":"SendRichCommand.run (cyclomatic 26): SendRichCommand.run has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendRichCommand.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"892d5e24340239e279f2d833ec688525edb30871d6e8a5a4f5bf969f880040a2"}},{"ruleId":"D1","level":"warning","message":{"text":"SendAttachmentCommand.run (cyclomatic 25): SendAttachmentCommand.run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd79e33bc2346885ca415af94d1178525b65b62ee2dd4608fffe61bb05041657"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handleSendRich (cyclomatic 23): RPCServer.handleSendRich has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeMessageHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4a3a716b05725211c4f05b22eed1053bd901f6bc287704dd29dd65ba9addd2"}},{"ruleId":"D1","level":"warning","message":{"text":"PollKeyedArchiveResolver.resolveValue (cyclomatic 22): PollKeyedArchiveResolver.resolveValue has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PollKeyedArchiveResolver.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"af28eee9d860745393250d0ecf38cbdbae22c8482c9a6c7a34d863b4ae6a641d"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handlePollSend (cyclomatic 22): RPCServer.handlePollSend has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BPollHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"d620d98f6ac01bfe5b7f282875a15efbdfa4ecca7c36398887cb78dc0af7dcf9"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.sendViaBridge (cyclomatic 22): RPCServer.sendViaBridge has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSupport.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74372e1e285c901f892f1299ccfe378344b3aba435eb246243bc3ee4c3638d6"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusCommand.run (cyclomatic 22): StatusCommand.run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StatusCommand.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fc7f6ea2d908f4f94561b1adcc3e5a0085e2a1727616fef6884d75c19bdfac"}},{"ruleId":"D1","level":"warning","message":{"text":"MessagePollDecoder.decode (cyclomatic 21): MessagePollDecoder.decode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagePollDecoder.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3df90c9bb991f235a606c3c0548907fb24092bf2eb711ed62f6de269d9c7b6"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handlePollVoteMutation (cyclomatic 21): RPCServer.handlePollVoteMutation has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BPollHandlers.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a156a8753395c6bdf580bb0c14a5c65a69325eaae425a48546c8f6023dbddb"}},{"ruleId":"D1","level":"warning","message":{"text":"LaunchCommand.run (cyclomatic 21): LaunchCommand.run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/LaunchCommand.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced76cbcbd7c71d9841f4ee197f135f736e2c078a0208295fd494cc91812f9ab"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handleSendSticker (cyclomatic 20): RPCServer.handleSendSticker has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BStickerHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"4577826919e561e06cd396660bb47c161bae0e27c8611c10842c0ee38623d9c2"}},{"ruleId":"D1","level":"warning","message":{"text":"WatchCommand.run (cyclomatic 20): WatchCommand.run 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":"Sources/imsg/Commands/WatchCommand.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"14796b7b9123bb8a7f4d09906f72495cbf7bb0a3de4f0417f42c4df06fcf2331"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageRowSelection.init (cyclomatic 19): MessageRowSelection.init has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessageRows.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7162a2e0670ac9aae09b3adc0142c17534abfc2631c379416b836727d1d4bdd"}},{"ruleId":"D1","level":"warning","message":{"text":"RichLinkPreparer.preparedImage (cyclomatic 19): RichLinkPreparer.preparedImage has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RichLinkPreparer.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8553a3d6f57c8f5cf4480bfe528ebd423c0eeea079e1e3921d814fc9b69b9a"}},{"ruleId":"D1","level":"warning","message":{"text":"StickerSendTarget.resolve (cyclomatic 19): StickerSendTarget.resolve has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/StickerSendTarget.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d3d75912117bed93f62a30470f7e5b2e8d65d5fa937eb745062ad317ac30b3"}},{"ruleId":"D1","level":"warning","message":{"text":"SendRichCommand.enrichedSentMessageResponse (cyclomatic 19): SendRichCommand.enrichedSentMessageResponse has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendRichCommand\u002BSupport.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"505f055d9e57eee786116e668c484306935ba51363775c8b17b71af134575b63"}},{"ruleId":"D1","level":"warning","message":{"text":"WatchState.pollMutations (cyclomatic 18): WatchState.pollMutations has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageWatcher.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c3d9d36498e3d48ef1113d10920b3149c7f72931e3814d9d47a944f5c749714"}},{"ruleId":"D1","level":"warning","message":{"text":"StickerAssetPreparer.inspectImage (cyclomatic 18): StickerAssetPreparer.inspectImage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"26796c6d46d7efcfc36d2717eaf7694fb8fe81a5b2977662ef6cda18096fa83c"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageStore.decodeMessageRow (cyclomatic 17): MessageStore.decodeMessageRow has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f233477a3065f46e8a2c9e4f398c388b929d26152d4cb1d62bfa73c3cd9ebb"}},{"ruleId":"D1","level":"warning","message":{"text":"StickerAssetPreparer.readValidatedBytes (cyclomatic 17): StickerAssetPreparer.readValidatedBytes has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"61724fa7918312ad898a6852bd84fe57884ac9aa6fb261169049e38ce15d2fa0"}},{"ruleId":"D1","level":"warning","message":{"text":"StickerAssetPreparer.stageValidatedBytes (cyclomatic 17): StickerAssetPreparer.stageValidatedBytes has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1784f4bf6309fa537777e65d3c09057e0963cd24b1afa4bcc9e62fdc8bb4ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handleWatchSubscribe (cyclomatic 17): RPCServer.handleWatchSubscribe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BWatchHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1712e6a1897a1b1aa3208c642fe929d0a716d0dd8066c1697df38b0744b08057"}},{"ruleId":"D1","level":"warning","message":{"text":"SentMessageVerifier.resolveSentMessageCandidate (cyclomatic 17): SentMessageVerifier.resolveSentMessageCandidate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/SentMessageVerifier.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"766c43b1c1b78ca53d3c6793d1998621f82f75bfbe7fa9759f4818898b199c43"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCRequestParser.parse (cyclomatic 16): RPCRequestParser.parse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCRequestParser.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"3221fb187e418669c1291db95f5e87cf691aefb82da2fc86b9929d1322f88ec7"}},{"ruleId":"D1","level":"warning","message":{"text":"RPCServer.handleBridgeEventsSubscribe (cyclomatic 16): RPCServer.handleBridgeEventsSubscribe 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":"Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"930fb06a50d63ecb4e964b705ce136ae4f5a1bda0dde67f9137ea0e6f3ef86b1"}},{"ruleId":"D1","level":"warning","message":{"text":"StickerCommand.run (cyclomatic 16): StickerCommand.run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StickerCommand.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35c43bb0c9548232163997b0f3303cf7cab3e2c64fcd2d9f1f5b23a85f3e711"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleSend (cognitive 115): RPCServer.handleSend has cognitive complexity 115 (threshold 15). Drivers by points: if/else 37 (60 pts), boolean chains 37, ternaries 7 (9 pts), error handling 4 (7 pts), match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSendHandlers.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fe2d09c6a0c80435c72940e9c445d2fcbcabfdc1f0ad1d416bf4b571b36e3ec"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusCommand.run (cognitive 43): StatusCommand.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (8 pts), loops 2 (7 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StatusCommand.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1e0b2f490c3741ce49f8067b82240d5d217f445f18a31d55478a91a24a8292"}},{"ruleId":"D2","level":"warning","message":{"text":"SendAttachmentCommand.run (cognitive 36): SendAttachmentCommand.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, error handling 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0b6672450da55dcd365f8ea9c3e8611aa4d80bc8f07fe8f3fa7e005c2d48d5"}},{"ruleId":"D2","level":"warning","message":{"text":"SendCommand.run (cognitive 36): SendCommand.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 13, match/switch 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"b262f893ce51a9a12fd0221f141b2a8e0207b6597e5fbf3cd3320eb3285d7ece"}},{"ruleId":"D2","level":"warning","message":{"text":"WatchCommand.run (cognitive 35): WatchCommand.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (7 pts), ternaries 5 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 14). Of this number, 34 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/WatchCommand.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2d54574f4cf1014ec8283cb6b4467895e0f6ab89f1fb40296786da58112666"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.sendViaBridge (cognitive 34): RPCServer.sendViaBridge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 3 (7 pts), boolean chains 3, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSupport.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"796c37aae075844b4e7da80dc5e98d65dc1a68b00914510ea6959f64933993ee"}},{"ruleId":"D2","level":"warning","message":{"text":"SendRichCommand.run (cognitive 32): SendRichCommand.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 5 (8 pts), boolean chains 7, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendRichCommand.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"d65944b91cd189a0dac006945cab60ea2cb1d2e9367019927b84812735f4ea3d"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handlePollSend (cognitive 30): RPCServer.handlePollSend has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, ternaries 3 (5 pts), error handling 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BPollHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6cafcf048db82f76fe05116b1dbc950bc57b858b4bf9d632147bf25f0795afa"}},{"ruleId":"D2","level":"warning","message":{"text":"LaunchCommand.run (cognitive 29): LaunchCommand.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 3, error handling 1, match/switch 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/LaunchCommand.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb15c8a4fe97fb4c09b0e1599b88d8736bb53566835a10eada0d9c7b91ad4528"}},{"ruleId":"D2","level":"warning","message":{"text":"PollKeyedArchiveResolver.resolveValue (cognitive 28): PollKeyedArchiveResolver.resolveValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PollKeyedArchiveResolver.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91e8739e4193ab7db2e6a20c03a7361e784a02582bfa2cedac18f048abd0076"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleLine (cognitive 27): RPCServer.handleLine has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 6, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BDispatch.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"a367e03d55ba90955435584fffeb327a5058e869d7cf54025fbb5ebc0d6bf5e0"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMCompletionGenerator.generate (cognitive 27): LLMCompletionGenerator.generate has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 4 (8 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"f99bb275e1cf6d02c6ce97078a6d6ff9d43e0f297ae9b4ca1721d1b49f27e5b8"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handlePollVoteMutation (cognitive 25): RPCServer.handlePollVoteMutation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BPollHandlers.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c51813039d52d23b508b33bb1cb0ee67f8db40b3d09d1c5365f4743acd7eb5"}},{"ruleId":"D2","level":"warning","message":{"text":"SentMessageVerifier.resolveSentMessageCandidate (cognitive 25): SentMessageVerifier.resolveSentMessageCandidate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/SentMessageVerifier.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"519b921d995029a5ddad71f93eb4472a9e27f0d244094c0697beafe1a03cecc5"}},{"ruleId":"D2","level":"warning","message":{"text":"AttachmentDisplay.swift.pollDisplayText (cognitive 25): AttachmentDisplay.swift.pollDisplayText has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 1 (3 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/AttachmentDisplay.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"478acf2c87edc3a3f03805b422f5d42481604903f192315efa0bfb2c3fb507b0"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleSendRich (cognitive 24): RPCServer.handleSendRich has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeMessageHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6d077eb42a7d80f6d6ddd81391741157c3d81b6b004a41a239df7dff5ecd821"}},{"ruleId":"D2","level":"warning","message":{"text":"StickerSendTarget.resolve (cognitive 24): StickerSendTarget.resolve has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/StickerSendTarget.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"7941988c2fe01274830cb7ae00ed6f846b6c10d9ff3a759da6be2150a5091fd7"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoryCommand.run (cognitive 24): HistoryCommand.run has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (8 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/HistoryCommand.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"68570d77f37f1fa80160ec87b34761d84e44ae3db416ad856f2024c5c3e8e0a3"}},{"ruleId":"D2","level":"warning","message":{"text":"SendRichCommand.enrichedSentMessageResponse (cognitive 24): SendRichCommand.enrichedSentMessageResponse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendRichCommand\u002BSupport.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f21a649fce8aa2543a831791021c4db34a0e036ceb48c60a48b5bc61a7407e"}},{"ruleId":"D2","level":"warning","message":{"text":"MessagePollDecoder.decode (cognitive 23): MessagePollDecoder.decode has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 6 (7 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagePollDecoder.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb9ca625ed9cd227e106dc7173085a1fd652c1e88e6a3a8fa11c91df089e4ed"}},{"ruleId":"D2","level":"warning","message":{"text":"WatchState.pollMutations (cognitive 23): WatchState.pollMutations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageWatcher.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06f7b0b25f6addb294e4de934a3c992240c81ea0e76f92087d44f6bbadd4cd1"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleSendSticker (cognitive 23): RPCServer.handleSendSticker has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, error handling 2, match/switch 1 (2 pts) (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":"Sources/imsg/RPCServer\u002BStickerHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"78dd41e1f796480c402665d51d55100da770e6463a56130135723302fe54825a"}},{"ruleId":"D2","level":"warning","message":{"text":"WatchState.poll (cognitive 22): WatchState.poll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (6 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageWatcher.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"d200254ceb3876956e071d719ea63cc04e7bf563af482f17c1ccdffc91d51b69"}},{"ruleId":"D2","level":"warning","message":{"text":"AddressBookContacts.childDelegateSourceIdentifiers (cognitive 21): AddressBookContacts.childDelegateSourceIdentifiers has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (8 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":"Sources/IMsgCore/AddressBookAccountSources.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"1448f31856b415a6545cc17321dee342b0aa088bc8b2b5ee3a03b0299ef6d480"}},{"ruleId":"D2","level":"warning","message":{"text":"StickerAssetPreparer.inspectImage (cognitive 21): StickerAssetPreparer.inspectImage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c357815b7b26388ce74d9f2a1172f4a7e8c60f5f2cbf9e91c75dd80d08e7c8"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCRequestParser.parse (cognitive 21): RPCRequestParser.parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCRequestParser.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f15674062387d942f15e538dc205cc8435ed43f2baf1f0727ea1801c0c0d2d1"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStore.decodeMessageRow (cognitive 20): MessageStore.decodeMessageRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f768f06cccbb6d3299fafebb06b4f3e498c11e90237f64a95c968ef240d5b2"}},{"ruleId":"D2","level":"warning","message":{"text":"PollCommand.runVote (cognitive 20): PollCommand.runVote has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (7 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/PollCommand.swift"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdafcaeba2701936da369acb9693dbd25e43a2984c1c231e2143e8089418acb"}},{"ruleId":"D2","level":"warning","message":{"text":"ContactResolver.snapshot (cognitive 19): ContactResolver.snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/ContactCatalog.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"47efbc697cd1da68ec861fd7842bb5eefb5011e4637f95de611a3df6d61a32b5"}},{"ruleId":"D2","level":"warning","message":{"text":"StatsCommand.printSummary (cognitive 19): StatsCommand.printSummary has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 7 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StatsCommand.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d16b4e2fdcef65e3d120ecaa45abb06b2ea6aa1e030a270b8813920dd7f38e4"}},{"ruleId":"D2","level":"warning","message":{"text":"IMsgBridgeClient.invokeV2 (cognitive 18): IMsgBridgeClient.invokeV2 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (6 pts), error handling 3 (5 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/IMsgBridgeClient.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"e281c97eb86f29880e1bd7d682379bfeeb95ee201a6d0e784587d6ab0358a660"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageRowSelection.init (cognitive 18): MessageRowSelection.init has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 18. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessageRows.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b24dec19b653091fcd408d92ea0008e39b44f93401e3dbc45aae0802acf6e4"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStore.listChats (cognitive 18): MessageStore.listChats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChats.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf0792998b20a909ebe5514925d004875fb15e30b1bb24dad7465f3c15e3cf7f"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStore.searchMessages (cognitive 18): MessageStore.searchMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSearch.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"4acab559102560359f9715654ae3c90d35172650d6f63653f5c399fdb5c40617"}},{"ruleId":"D2","level":"warning","message":{"text":"StickerAssetPreparer.stageValidatedBytes (cognitive 18): StickerAssetPreparer.stageValidatedBytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e9847dc955db4d1f125e92b56003abb6376c36a5f1871f61a307b415bdf9a1"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleSendMultipart (cognitive 18): RPCServer.handleSendMultipart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BMultipartHandler.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19af42f33a5d322aae3e9b7d4799efd8a84528c312b47bb089498bf06caeacf"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCServer.handleTyping (cognitive 18): RPCServer.handleTyping has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BTypingHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"748924f56a240d5ff8d258fd73c69c6caae44d48ec8f78e26458742d31bc2825"}},{"ruleId":"D2","level":"warning","message":{"text":"RichLinkPreparer.preparedImage (cognitive 18): RichLinkPreparer.preparedImage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 16, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RichLinkPreparer.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1748e25bf2e8f7a4935fa8821887c20ac9aa8cf51107c113af91b4d62a17745"}},{"ruleId":"D2","level":"warning","message":{"text":"StickerCommand.run (cognitive 18): StickerCommand.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 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":"Sources/imsg/Commands/StickerCommand.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da5ace68291781863ab6316211f7be4612486998a7ada2fa52f3f6552aa4729"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStore.enrichMessagesWithTrailingURLPreviews (cognitive 17): MessageStore.enrichMessagesWithTrailingURLPreviews has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BURLPreviews.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"1206f637d8f490c0aec47fc7b98f10b9af243a1c4b98613cd1b6bb5fe763036f"}},{"ruleId":"D2","level":"warning","message":{"text":"PollFacts.collect (cognitive 17): PollFacts.collect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PollFacts.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"187185842f6fdf5334dded716203d201d869510718afb24c24d9bc8fd8083ade"}},{"ruleId":"D2","level":"warning","message":{"text":"StickerAssetPreparer.readValidatedBytes (cognitive 17): StickerAssetPreparer.readValidatedBytes has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (5 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/StickerAsset.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"456d6f7be33449eaec36f794ac7f1890d1c35dbc5750d58daef84a601e9d457c"}},{"ruleId":"D2","level":"warning","message":{"text":"HelpPrinter.renderCommand (cognitive 17): HelpPrinter.renderCommand has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 4, ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/HelpPrinter.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"f164cc50e9345c978faaf07ec0070581ba3ae7225884bc3ee2228813b9640ec0"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCDatabaseResourceOwner.require (cognitive 17): RPCDatabaseResourceOwner.require has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCDatabaseResources.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea4ec777b648a32adee253a0dd5505d33048532bdfe6e26eab07cd95df738f5"}},{"ruleId":"D2","level":"warning","message":{"text":"AddressBookContacts.load (cognitive 16): AddressBookContacts.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, error handling 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/AddressBookContacts.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80cd6bd61be78d5f0c5c42af82ff19991ba1b517b616be06c9dfc13fcb1f652"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageStore.coalesceURLPreviewMessages (cognitive 16): MessageStore.coalesceURLPreviewMessages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BURLPreviews.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"db5fc3793647b617ead272a35b9b9706991c2b0d59e39b266c94a31a92fc8267"}},{"ruleId":"D2","level":"warning","message":{"text":"TypedStreamParser.decodeString (cognitive 16): TypedStreamParser.decodeString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/TypedStreamParser.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72feffb04c6f9b496f754c7f82e0e4521724898a757e40da0de7e22c7058333"}},{"ruleId":"D2","level":"warning","message":{"text":"TypingIndicator.lookupChat (cognitive 16): TypingIndicator.lookupChat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/TypingIndicator.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"b764b7b11d594e6019db6b57d21a448c3d1b61557cde12e19626f090abd7e748"}},{"ruleId":"D2","level":"warning","message":{"text":"RPCMethodDescriptor.isUsable (cognitive 16): RPCMethodDescriptor.isUsable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCMethodDescriptors.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6b14371a3786338941476244bb23a6fe7dd3ff1e0f5d250b4c512e8b1494d13"}},{"ruleId":"D2","level":"warning","message":{"text":"PollCaptionStatus.verifyCaption (cognitive 16): PollCaptionStatus.verifyCaption has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), match/switch 1 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/PollCaptionStatus.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ddba6111d417c31427d0e05b9999e7d6fc02dd88cb512b8a206d6a8e4ecf754"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MessageStore: TooManyMethods \u2014 120 methods, declared across 24 files: IMsgCore/MessageStore\u002BMessages.swift (15), IMsgCore/MessageStore\u002BStats.swift (12), IMsgCore/MessageStore\u002BSentMessages.swift (11), IMsgCore/MessageStore\u002BHelpers.swift (10), \u002B20 more file(s). The bar is 30 methods; this is 90 over it, 4.00\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfabe7cc7d7137e1faa167f5cafd1de5660f47391d707ec13f3a7f00138c7b9d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RPCServer: TooManyMethods \u2014 71 methods, declared across 22 files: imsg/RPCServer\u002BBridgeMessageHandlers.swift (12), imsg/RPCServer\u002BChatHandlers.swift (10), imsg/RPCServer\u002BBridgeMessageSupport.swift (7), imsg/RPCServer.swift (5), \u002B18 more file(s). The bar is 30 methods; this is 41 over it, 2.37\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ca153ea9b08dc97c0e92ee3bcde624e507be8bf028793906f9a91968587aee9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RPCServer.handleSend: MethodTooLong \u2014 handleSend runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSendHandlers.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"60104af4ddd67f59472294c473e08a0d889a48d8ee4b79252fbdb090cfa22e19"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RPCServer.handleLine: MethodTooLong \u2014 handleLine runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BDispatch.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec08ec344ca2addfdce1289dbd59a574ce4e186d3ba5a744039f4d643bd478e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RPCServer.handleWatchSubscribe: MethodTooLong \u2014 handleWatchSubscribe runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BWatchHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"20e91bd1802cd0a05f78b857d10cff51463d8d915ebba8b907a5b3ef4f62ecf7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReactCommand.sendReaction: MethodTooLong \u2014 sendReaction runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/ReactCommand.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a55a0ddb0030eddec7ba60f845303351888c49f81fa8394baabd69e1caad7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (61 shared lines): Sources/imsg/RPCServer.swift:79-150 | Sources/imsg/RPCServer.swift:152-220 \u2014 These two members are variants of one another: 61 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4f1bd57968d392901ac06fe48b808e285d06beba3c00cdd1d703280fb841ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): Sources/imsg/Commands/BridgeAttachmentCommand.swift:32-121 | Sources/imsg/Commands/BridgeChatCommands.swift:169-180 | Sources/imsg/Commands/BridgeChatCommands.swift:201-212 | Sources/imsg/Commands/BridgeMessagingCommands.swift:37-84 | Sources/imsg/Commands/BridgeMessagingCommands.swift:113-133 | Sources/imsg/Commands/BridgeMessagingCommands.swift:157-172 | Sources/imsg/Commands/BridgeMessagingCommands.swift:195-209 | Sources/imsg/Commands/BridgeMessagingCommands.swift:232-243 | Sources/imsg/Commands/StickerCommand.swift:53-154 \u2014 These 9 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 9 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 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"5694b256ade2b788c8a2a7fd12d833975361a6836a4ac9ea7b489aaaa44cb863"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Sources/imsg/Commands/BridgeAttachmentCommand.swift:32-121 | Sources/imsg/Commands/BridgeChatCommands.swift:124-146 | Sources/imsg/Commands/NamePhotoCommand.swift:41-87 | Sources/imsg/Commands/SendRichCommand.swift:55-175 | Sources/imsg/Commands/StickerCommand.swift:53-154 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab45cb2e40c52f02644e794465f73b325df4bfbba76096fba7615405c2278e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Sources/IMsgCore/Message\u002BInitializers.swift:5-46 | Sources/IMsgCore/Message\u002BInitializers.swift:48-105 | Sources/IMsgCore/Models.swift:175-225 | Sources/IMsgCore/Models.swift:227-291 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/Message\u002BInitializers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"95396b8f2781f2c740b3c0d3fa2beb669678da4bc4b8017907bf2b563b70f416"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Sources/imsg/RPCServer\u002BChatHandlers.swift:155-187 | Sources/imsg/RPCServer\u002BSendHandlers.swift:27-286 | Sources/imsg/RPCServer\u002BTypingHandlers.swift:5-58 | Sources/imsg/RPCServer\u002BTypingHandlers.swift:62-89 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"70223ba851b4fc9c7de03794927362f1da820dddc43391d9b877d8cd6c5a91db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:38-88 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:90-138 \u2014 These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f2a819ea253f6226571dbebc40f1f8e5bd3a7dd139955d8d0799992f872c52"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): Sources/imsg/RPCServer\u002BMessagesAfterHandlers.swift:5-78 | Sources/imsg/RPCServer\u002BReadHandlers.swift:64-115 \u2014 These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BMessagesAfterHandlers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f64427dd3a61a04b1b11858084a92cd7d5c5bca2d95c22c13f89205436a5881"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (61 corresponding lines): Sources/IMsgCore/MessageStore\u002BMessages.swift:15-75 | Sources/IMsgCore/MessageStore\u002BSearch.swift:76-143 \u2014 These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ebf601ec8e3009f6d85fcf76930be34af57ed186b9f9075b14097eb4076e98d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Sources/IMsgCore/MessageStore\u002BChats.swift:204-221 | Sources/IMsgCore/MessageStore\u002BChats.swift:296-314 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChats.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9897476e2462adb649d65553b6d5fb71773ddffc47666948941846bf9cc9cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Sources/IMsgCore/MessageStore\u002BStats.swift:211-232 | Sources/IMsgCore/MessageStore\u002BStats.swift:352-375 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BStats.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"f352b13617a20541f61a39830855b3bbe2758ff540ae6deb0aa3c16823db488f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/imsg/RPCParameters.swift:65-79 | Sources/imsg/RPCParameters.swift:81-95 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCParameters.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8356ff551f7178195fe39958a42f2d767005948f39a1d33c5618b0d13dbf065"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Sources/imsg/RPCServer\u002BChatHandlers.swift:65-80 | Sources/imsg/RPCServer\u002BChatHandlers.swift:107-122 | Sources/imsg/RPCServer\u002BChatHandlers.swift:124-139 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e75aa0a18863f000a21c4d1e0d4c46fcd51d0b053c838b0ccea3bf97316780c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Sources/imsg/Commands/CompletionsCommand.swift:125-134 | Sources/imsg/HelpPrinter.swift:79-89 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ca6f8d4caf3f565fa690a462e308e453aafaccbdbc8f381144b9f46eb8a8f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/imsg/Commands/BridgeChatCommands.swift:234-242 | Sources/imsg/Commands/BridgeChatCommands.swift:262-270 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeChatCommands.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e77c082d08158c375a727bb55be24b7625e14a46b1635fd13eb4c3a67f3858"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Sources/IMsgCore/Models.swift:15-35 | Sources/IMsgCore/Models.swift:48-66 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/Models.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2bda2f5febeddab9b0dd1c43ee41a639e89e531555fad2650b3c6d45548479"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 7\u002B corresponding lines): Sources/imsg/RPCServer\u002BBridgeMessageHandlers.swift:324-336 | Sources/imsg/RPCServer\u002BBridgeMessageHandlers.swift:338-347 | Sources/imsg/RPCServer\u002BChatHandlers.swift:49-55 | Sources/imsg/RPCServer\u002BChatHandlers.swift:57-63 | Sources/imsg/RPCServer\u002BChatHandlers.swift:141-147 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeMessageHandlers.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"419edc898d203233184c62cd5443ea67ebce884bbb1a1d7b009129500a36c9d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Sources/IMsgCore/PollFacts.swift:182-193 | Sources/IMsgCore/PollFacts.swift:195-208 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PollFacts.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a45dff3621905738f24b3ac34ff4e8f5fe3e95e83bd7806c7f6a01bf85411ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Sources/imsg/RPCServer\u002BBridgeMessageSupport.swift:229-246 | Sources/imsg/RPCServer\u002BBridgeMessageSupport.swift:248-265 | Sources/imsg/RPCServer\u002BStickerHandlers.swift:111-126 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeMessageSupport.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"670d120bcbfaafcb756c3c5fb06f9a26e5c1345b1d70750b77677cbfa333d49b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Sources/IMsgCore/MessagePolls.swift:58-74 | Sources/IMsgCore/Models.swift:89-103 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagePolls.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f538ea54f379c86abc7a6ff0364e7ad56a60abc69479674b221033e0ed46c2e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Sources/IMsgCore/BridgeFailureClassifier.swift:4-19 | Sources/IMsgCore/BridgeFailureClassifier.swift:21-34 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/BridgeFailureClassifier.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ebd3800c1e1b3e32a9ba64f70e365839ee0577fe245d1ced799c20ac44a0331"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:177-189 | Sources/IMsgCore/TypingIndicator.swift:283-296 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed16e65409f6562aa4fba2411d0d764873351623cd7fa73b78af70ad04dd1535"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 7\u002B corresponding lines): Sources/imsg/RPCParameters.swift:18-24 | Sources/imsg/RPCParameters.swift:26-32 | Sources/imsg/RPCParameters.swift:34-40 | Sources/imsg/RPCParameters.swift:42-52 | Sources/imsg/RPCParameters.swift:54-63 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCParameters.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"318651a14cb758b09ea161bbc2119dd38ff5e3eee9a82279e7aa63d4d3aed306"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/imsg/Commands/CompletionsCommand.swift:136-145 | Sources/imsg/Commands/CompletionsCommand.swift:195-202 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"6005d433cd813978ee5ea153974bdb6ef351403cd14749d7143e12b497d08ea8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): Sources/IMsgCore/MessagePollDecoder.swift:106-112 | Sources/IMsgCore/MessageStore\u002BHelpers.swift:73-79 | Sources/imsg/Commands/PollCommand.swift:346-351 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagePollDecoder.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e35b32124c7341cbd7c9c29fb28209c059bdab20394b88d5ec62d3b97b32a3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Sources/IMsgCore/MessagesLauncher.swift:95-112 | Sources/IMsgCore/MessagesLauncher.swift:130-142 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagesLauncher.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"9548a4955aaf6ff75651c2fafdb5d874cc1f5e99a1bfb7d3d99d958643d4df66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:191-199 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:201-209 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddcfa445f334311ad99dac9e7828e3e1e6ee4dc9731da22842e4f6f209e70ac2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Sources/IMsgCore/MessageStore\u002BPolls.swift:73-80 | Sources/IMsgCore/MessageStore\u002BPolls.swift:85-92 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BPolls.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc55dbfa5d8a10c8fd10bf083ed15884268e4353beb99ddd2a75d264ae25958"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/imsg/RPCServer\u002BBridgeMessageSupport.swift:87-90 | Sources/imsg/StickerSendTarget.swift:98-101 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeMessageSupport.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"0910e9e064b3eda09e1580ec203535af0173ede88bb181a8483009525adb9728"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Sources/IMsgCore/MessageStore\u002BMessageRows.swift:182-184 | Sources/imsg/Commands/CompletionsCommand.swift:204-206 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessageRows.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dae27e41b2b2d7dd15908d2920e169f723998a96b1ea9e74ca92a97d2985a19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Sources/IMsgCore/ContactCatalog.swift:239-242 | Sources/IMsgCore/MessageStore\u002BStats.swift:82-85 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/ContactCatalog.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e4869d9674cd81ed4b2f7ad6f68a582edaf88e93803aba133b96300552c543"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201335 lines \u00D7 2): Sources/IMsgCore/Message\u002BInitializers.swift:20-46 | Sources/IMsgCore/Message\u002BInitializers.swift:71-105 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/Message\u002BInitializers.swift:20\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 before the matched lines, \u0060Sources/IMsgCore/Message\u002BInitializers.swift:19\u0060 calls \u0060ReactionMetadata\u0060 and \u0060Sources/IMsgCore/Message\u002BInitializers.swift:70\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/Message\u002BInitializers.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"0423c453d0d5a66e82ad46c4a4282a8f168183cae0c0400eef23dc8b00ba685b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201326 lines \u00D7 2): Sources/IMsgCore/Message\u002BInitializers.swift:48-73 | Sources/IMsgCore/Models.swift:227-251 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/Message\u002BInitializers.swift:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/Message\u002BInitializers.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eb3f8a6af576f30f12bd5a0245a52d4b2509ae402199f51e7a1b7bd380406b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Sources/imsg/RPCServer.swift:104-128 | Sources/imsg/RPCServer.swift:174-198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer.swift:104\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"536235f20b5365fb0ccf1313b5c58e1ece2cf127e21f1be09dfd22f63a860570"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:47-69 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:98-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"708cacad16c0225d9466a3ecec3723f0d6a1339747d45ac3867449d4cb270d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Sources/imsg/Commands/ReadCommand.swift:54-75 | Sources/imsg/Commands/TypingCommand.swift:69-90 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/ReadCommand.swift:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/imsg/Commands/TypingCommand.swift:65\u0060 calls \u0060parseStopFlag\u0060, \u0060option\u0060 and \u0060Sources/imsg/Commands/ReadCommand.swift:52\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/ReadCommand.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c1ea01a6b437cc5e4e6c62303cef7c1c967765a613d874681f58a2ca0d6d2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BMessages.swift:24-44 | Sources/IMsgCore/MessageStore\u002BMessages.swift:145-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift:24\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b219dde9bc9696296ec280cbd373cb5a76bbc155ba93d0a6c3791f4e71b56b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Sources/imsg/RPCServer.swift:130-150 | Sources/imsg/RPCServer.swift:200-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer.swift:130\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"f685b59d2e2306db4400fc932dfde10ab51b629b0d73903946df9181aabb62a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Sources/imsg/RPCServer\u002BTypingHandlers.swift:11-30 | Sources/imsg/RPCServer\u002BTypingHandlers.swift:65-84 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BTypingHandlers.swift:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BTypingHandlers.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"7848f9340c7b672d9ca6f23fffd989f6967ae227d42db069b05f2c916bdd364a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/imsg/Commands/HistoryCommand.swift:100-118 | Sources/imsg/Commands/WatchCommand.swift:144-162 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/HistoryCommand.swift:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/HistoryCommand.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6d2541582de8c87da9c5007c3938894570a1c2263236f7cea89816c0c981a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Sources/IMsgCore/Message\u002BInitializers.swift:5-22 | Sources/IMsgCore/Models.swift:175-191 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/Message\u002BInitializers.swift:5\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/Message\u002BInitializers.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c2e304627e58c59460d8d4f021c8f2dc2bae66346e4e083a0c81c121922dae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BMessages.swift:37-54 | Sources/IMsgCore/MessageStore\u002BSearch.swift:104-121 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift:37\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/IMsgCore/MessageStore\u002BSearch.swift:103\u0060 calls \u0060messageSearchMatches\u0060 and \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift:36\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda006e0630be06aff6875b220ade8441c7740dc9321e269afb549a97044a05e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): Sources/imsg/RPCServer.swift:83-99 | Sources/imsg/RPCServer.swift:157-171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/imsg/RPCServer.swift:156\u0060 calls \u0060MessageStore\u0060 and \u0060Sources/imsg/RPCServer.swift:82\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"83cdd14d4696eb5f8d0ebf2fe3ede45461888c61d16deb85f1b392e2e7730577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/imsg/Commands/StickerCommand.swift:128-143 | Sources/imsg/RPCServer\u002BStickerHandlers.swift:81-96 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StickerCommand.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b8bb38d3d109b900b0cea269ab60105ab694b099499f1c8fb4b5f02df78efa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift:116-130 | Sources/imsg/RPCServer\u002BWatchHandlers.swift:127-140 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift:116\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"964421267060c916d599c27da9249ca3e971f471c3254518882ec75b0b4caa29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BMessageConstruction.swift:47-59 | Sources/IMsgCore/MessageStore\u002BMessages.swift:310-322 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessageConstruction.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"70c159f3b3578ceb1e9d9c506af5e8c0b4b28fe29d533e14e98ac6a4bfdf80d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/imsg/Commands/BridgeIntroCommands.swift:63-75 | Sources/imsg/Commands/HistoryCommand.swift:87-99 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/BridgeIntroCommands.swift:63\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeIntroCommands.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2041927f72d7eecc51ca5103d5b34804b93a97a7fb4beca2510e98c228b19525"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): Sources/imsg/RPCServer\u002BChatHandlers.swift:163-172 | Sources/imsg/RPCServer\u002BSendHandlers.swift:116-127 | Sources/imsg/RPCServer\u002BTypingHandlers.swift:13-24 | Sources/imsg/RPCServer\u002BTypingHandlers.swift:67-78 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BSendHandlers.swift:116\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb750c7f418543aabd3a35060ec2c8ff75d7ec423deae1b91140733bb911c9c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BMessages.swift:242-252 | Sources/IMsgCore/MessageStore\u002BURLPreviews.swift:101-112 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift:242\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde522e1652b0a4a11a4bec012eaf2a344e0e27c289c260f65919714437c5d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Sources/IMsgCore/PollFacts.swift:71-82 | Sources/IMsgCore/PollPayloadScan.swift:137-147 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/PollFacts.swift:71\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PollFacts.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1204c3233ef662be703f2dbd95cc50180f9c78ae519e3b6e66659258031552a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/IMsgCore/IMsgBridgeClient.swift:240-250 | Sources/IMsgCore/IMsgBridgeClient.swift:279-289 | Sources/IMsgCore/IMsgBridgeClient.swift:312-322 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/IMsgBridgeClient.swift:240\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/IMsgBridgeClient.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df978455aa650b72a6e86fca228b3291fafcb8b9917aaeae96652a9bdc3331d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Sources/imsg/Commands/CompletionsCommand.swift:182-191 | Sources/imsg/HelpPrinter.swift:93-103 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/HelpPrinter.swift:93\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"a087b7c42c16bb1ea2f83eb5bd22500378140b6cbcbaac63350cd232e883dc66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/imsg/OutputModels.swift:60-70 | Sources/imsg/OutputModels.swift:326-336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/OutputModels.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15d0fc08151c48dbd537fdddee0a3647202fd6aee1575b7db4ffa8f4f20fa3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:211-220 | Sources/IMsgCore/TypingIndicator.swift:314-323 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa96e6660619cc73e5781387ffb8495e7c541cc4a927f7f20622bc1f2fc56d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Sources/imsg/Commands/ReadCommand.swift:49-58 | Sources/imsg/Commands/SendCommand.swift:69-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/ReadCommand.swift:49\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/ReadCommand.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ba438fc499c5a9e743e54445476deffce43d8103e88434ad63b616cf0db88b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/imsg/Commands/SendCommand.swift:160-169 | Sources/imsg/RPCServer\u002BSendHandlers.swift:163-172 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/SendCommand.swift:160\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/imsg/Commands/SendCommand.swift:158\u0060 calls \u0060flag\u0060 and \u0060Sources/imsg/RPCServer\u002BSendHandlers.swift:161\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc31140a5310cbd0486c8324b857caed0f05024b399a4fcb4289d5d9b97822d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift:47-57 | Sources/imsg/RPCServer\u002BWatchHandlers.swift:43-52 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BBridgeEventHandlers.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"50887fc05276d245556de3286017f84f1b5110ea1d6109c0c45e4e68eed364c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/imsg/RPCServer\u002BChatHandlers.swift:108-117 | Sources/imsg/RPCServer\u002BChatHandlers.swift:125-134 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BChatHandlers.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":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d00b67d66d692ae815844b63ac57f1e273bc678c1fabcb61a533d4d12566aef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 9): Sources/imsg/Commands/BridgeAttachmentCommand.swift:46-51 | Sources/imsg/Commands/BridgeChatCommands.swift:170-175 | Sources/imsg/Commands/BridgeChatCommands.swift:202-207 | Sources/imsg/Commands/BridgeMessagingCommands.swift:45-53 | Sources/imsg/Commands/BridgeMessagingCommands.swift:114-122 | Sources/imsg/Commands/BridgeMessagingCommands.swift:158-163 | Sources/imsg/Commands/BridgeMessagingCommands.swift:196-201 | Sources/imsg/Commands/BridgeMessagingCommands.swift:233-238 | Sources/imsg/Commands/StickerCommand.swift:86-91 \u2014 there are 9 copies across 4 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 9 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/imsg/Commands/BridgeMessagingCommands.swift:54\u0060 calls \u0060flag\u0060 and \u0060Sources/imsg/Commands/BridgeMessagingCommands.swift:123\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"da435494f0603d6c878dafd07e09c9df4113dddf50d1b1a2707bc759da5a459d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 5): Sources/imsg/Commands/BridgeAttachmentCommand.swift:32-38 | Sources/imsg/Commands/BridgeChatCommands.swift:124-130 | Sources/imsg/Commands/NamePhotoCommand.swift:41-47 | Sources/imsg/Commands/SendRichCommand.swift:55-63 | Sources/imsg/Commands/StickerCommand.swift:53-59 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/BridgeAttachmentCommand.swift:32\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b18badfaf74913ebf5b0e2afae410eb901dee4285b72b95607fe3163bbea647d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/imsg/Commands/CompletionsCommand.swift:446-454 | Sources/imsg/HelpPrinter.swift:67-74 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/CompletionsCommand.swift:446\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde3dbd707bfe57ec07d4b075fd707633e1615b18ec5d8817b8781bab41deede"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/imsg/Commands/HistoryCommand.swift:58-65 | Sources/imsg/Commands/WatchCommand.swift:99-106 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/imsg/Commands/WatchCommand.swift:98\u0060 calls \u0060flag\u0060 and \u0060Sources/imsg/Commands/HistoryCommand.swift:57\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/HistoryCommand.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dc7145643f680b57e1b4409db1668f04fec4d95a39e7b08e6c5ee0f2c14f4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/imsg/Commands/ReadCommand.swift:45-52 | Sources/imsg/Commands/TypingCommand.swift:57-64 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/ReadCommand.swift:45\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/imsg/Commands/TypingCommand.swift:65\u0060 calls \u0060parseStopFlag\u0060, \u0060option\u0060 and \u0060Sources/imsg/Commands/ReadCommand.swift:54\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/ReadCommand.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc5f0449d4bbfaf1dbe2b429389d6fe547966e78e3283ccf24f5b001792aa66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/imsg/RPCServer\u002BChatHandlers.swift:38-45 | Sources/imsg/RPCServer\u002BSendHandlers.swift:212-219 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BChatHandlers.swift:38\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6844839007b7e46b8f451d23517e488c899ed85c9703d209027b5baa07ecb2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BSentMessages.swift:75-88 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:126-138 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/MessageStore\u002BSentMessages.swift:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BSentMessages.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdf81478a8268d2637f1eee333765b12729525406925ea7c5a21db1ce4d393e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/imsg/RPCServer\u002BSendHandlers.swift:210-216 | Sources/imsg/RPCServer\u002BStickerHandlers.swift:99-105 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSendHandlers.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a8cd389d1d1758029693090b1004cbf70597825f6781465f91e211f0daabb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/IMsgCore/MessageStore\u002BChats.swift:301-311 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:77-87 | Sources/IMsgCore/MessageStore\u002BSentMessages.swift:127-137 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/IMsgCore/MessageStore\u002BChats.swift:301\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChats.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d01501b11f7744ea5c3e85420f56b6fad8bb1842d0e123484f362582689e44f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/imsg/Commands/BridgeChatCommands.swift:234-239 | Sources/imsg/Commands/BridgeChatCommands.swift:262-267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/Commands/BridgeChatCommands.swift:234\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeChatCommands.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"66601388c02abffe8bef68928cadbd11313a15935e43bc20c1ec55857a256e67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): Sources/imsg/RPCServer\u002BReadHandlers.swift:65-70 | Sources/imsg/RPCServer\u002BWatchHandlers.swift:6-10 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/imsg/RPCServer\u002BReadHandlers.swift:65\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BReadHandlers.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"8020d4c33976f8f7d2a746272a803191a71581b1c732223fef4bc3ec4c528e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/imsg/RPCServer\u002BReadHandlers.swift:83-88 | Sources/imsg/RPCServer\u002BWatchHandlers.swift:20-25 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BReadHandlers.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"09e353490df2c24c1ed272676a3a14653ddea3007aa2e1db38dca98ce2fdc3a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/imsg/RPCServer\u002BChatHandlers.swift:66-70 | Sources/imsg/RPCServer\u002BChatHandlers.swift:108-112 | Sources/imsg/RPCServer\u002BChatHandlers.swift:125-129 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BChatHandlers.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02a49eeaba34bbb1a498c3805768b5be17535b4f0ad9eed1d5b6852df5528fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/imsg/Commands/CompletionsCommand.swift:101-105 | Sources/imsg/Commands/CompletionsCommand.swift:117-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf05d2bf63fc93d1bbfaf12559a0fc640209a9fd6b5b48443d7020115aa679e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/IMsgCore/MessagesLauncherCommands.swift:9-17 | Sources/IMsgCore/MessagesLauncherStub.swift:53-59 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagesLauncherCommands.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f3afabbfab8a875d858d79dc8dc29e08e6d9c0c4cfeec6f1759b3ae04f4d830"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BChatBackground.swift:73-77 | Sources/IMsgCore/MessageStore\u002BServiceAvailability.swift:81-85 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChatBackground.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"8586ffc058240a5f8e059f18f32b93c2f993360f06054b1c0f496e5426dfde8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/IMsgCore/MessageStore\u002BAttachments.swift:47-51 | Sources/IMsgCore/MessageStore\u002BHistoryMetadata.swift:34-38 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BAttachments.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a9fc1685d45f792f030c2f17f91dbc8184004786ea8a1478456cf6025f5143"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: IMsgCore: IMsgCore: abstractness 0.01, instability 0.00, distance 0.99 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1291fc2a7092b4dbf2bb3d9034768999c9bb50205c1d77a71de141ad92e08b90"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: bridgeClientKeepsExplicitTimeoutInvokeSignature: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/IMsgBridgeProtocolTests.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0a63b690e156c5f6bb2fee4b678e529a30b141d83df0c5206b337b49a7cf21d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messagesLauncherKeepsLegacyCommandSignatureAndAllowsExplicitTimeout: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/IMsgBridgeProtocolTests.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca77c1d032b3020ee734eb66935d7f11cd1c03a14b42230c15b18b9799826435"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messagesLauncherPreservesNoArgumentFunctionReferences: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/IMsgBridgeProtocolTests.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1a5a88823783d4b3dc5181c1f85eadff71cd43d0d1114dcfede0bd9f6d2c9f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: launcherPreservesNoArgumentFunctionReferences: 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":"TestsLinux/LinuxReadCoreTests.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de5c88666ebab3fbfbe44fa8f0462d50494b7843c73a3e1d93a71489143509f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: imCoreBridgeIsNotAvailableWithoutDylib: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/IMCoreBridgeTests.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a963118f16c7e0bc8c4217e5b366cb82e4971555024aff0751a7278d63b9416"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messagesLauncherIsNotReadyWithoutInjection: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/IMCoreBridgeTests.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6281095f622520d136c9c25c0b079c6646da58c85051bc149f1c42fb042899"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messageStoreResolvesOriginalPollVoteOptionTextFromSlashUpdateRows: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/MessageStorePollVoteTests.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"921fb3de65abfaeb9e2785965018eab834366cfa1267359a0eda9d331f758e66"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: messageStoreResolvesOriginalPollVoteOptionTextFromPartPrefixedUpdateRows: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/IMsgCoreTests/MessageStorePollVoteTests.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc2c4ad44146e6f32cbcb613fa6bedf65858f9f7f970332238d4c3bc1933121d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: historyCommandRunsWithAttachmentsNonJson: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/ChatHistoryCommandTests.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"370951d6282bdf4e00d8705ad92ad776f01a0bc94fca70ba3c01e3ae3ee850da"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: chatsCommandRunsWithPlainOutput: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/ChatHistoryCommandTests.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6632d8d3bb461fd7d7d65d329d41b054b32d639bc90e6a4599361c879015733"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: richLinkPreparerRejectsUnsafeURLs: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/RichLinkPreparerTests.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"b495c07b8da813e1285e33b3d149f0c99cc8721464c8b8de8598a7fb8f86c340"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: watchCommandDatabaseErrorCancelsBridgeAndPropagates: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/WatchCommandBridgeTests.swift"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f29f91f305a7bfb08c8d0fbdc598da68ca716c2b6a56e60851f89765936a248"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: watchCommandCancellationStopsDatabaseAndBridgeStreams: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/WatchCommandBridgeTests.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc1ede79f89050f94fc429b06516a3ea28a75c705b84619cd3acac3742ac03c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: watchCommandRunsWithStubStream: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/WatchCommandTests.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6032169ff8a416ed922a8c358f387ab412757d67274824f4718c3377cf3de11"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: watchCommandStopsBridgeStreamWhenDatabaseStreamEnds: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/imsgTests/WatchCommandTests.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e695764fb746c2cd87a6fb91eeaddfe170ea16e22fe68699ac6effbb830b551"}},{"ruleId":"D13","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":"24ca40962b4b5ca25bcc92472f397522fefffa32400ed1ea0b1c8a61f7a1f3c5"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/RPCServer\u002BSendHandlers.swift: Sources/imsg/RPCServer\u002BSendHandlers.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in RPCServer.handleSend at line 27. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/RPCServer\u002BSendHandlers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BSendHandlers.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"99309ef7c58a57debaa8ff1ed9d92fae8420755c0f3862df920cc715debcedae"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/IMsgCore/MessageStore\u002BMessages.swift: Sources/IMsgCore/MessageStore\u002BMessages.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MessageStore.decodeMessageRow at line 365. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BMessages.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f67a0e878e292c20d79a0d9900dc79777666e8b1889cd191c1f62258cf467b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/SendCommand.swift: Sources/imsg/Commands/SendCommand.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in SendCommand.run at line 43. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/SendCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ce195b15a22a4a7f73044f957055a7181fcb4dfff8ccfb90b2fbfefef068d75"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/RPCServer\u002BDispatch.swift: Sources/imsg/RPCServer\u002BDispatch.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in RPCServer.handleLine at line 5. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/RPCServer\u002BDispatch.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BDispatch.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"14fa10f20cc1210e317214fed54970165022c9e6f467d1b312691f0b2082418f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/IMsgCore/MessageStore\u002BMessageRows.swift: Sources/IMsgCore/MessageStore\u002BMessageRows.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MessageRowSelection.init at line 109. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BMessageRows.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessageRows.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bdc04d2c12efdffab27284a18dde4a2518cf459cd731c34792c332a7a9ccd36"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/SentMessageVerifier.swift: Sources/imsg/SentMessageVerifier.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SentMessageVerifier.resolveSentMessageCandidate at line 83. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/SentMessageVerifier.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/SentMessageVerifier.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea86479c8f7988c50f800de348cefe0f19f172763d23078c1744b469dfec17c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/StatusCommand.swift: Sources/imsg/Commands/StatusCommand.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in StatusCommand.run at line 36. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/StatusCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StatusCommand.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa3217a66bb8c9d4968bdb06646539e12d4dda68a0088a4ac8886a1e5a3271f0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/LaunchCommand.swift: Sources/imsg/Commands/LaunchCommand.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in LaunchCommand.run at line 74. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/LaunchCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/LaunchCommand.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"375428b816cb695fb174ba081b3e269c168204df1e1a2eee3b00f254dd4099fd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/WatchCommand.swift: Sources/imsg/Commands/WatchCommand.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in WatchCommand.run at line 58. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/WatchCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/WatchCommand.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"d658e29f76a16d2c6323266d00c3c548b53ee21464ee2d67e26d8d8c707c7b38"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/BridgeAttachmentCommand.swift: Sources/imsg/Commands/BridgeAttachmentCommand.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in SendAttachmentCommand.run at line 32. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/BridgeAttachmentCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeAttachmentCommand.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"2deb9649d6fe0f7311f1e6a87b133b49a2054d69dff3566d868e44ffcce0edba"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/imsg/Commands/StickerCommand.swift: Sources/imsg/Commands/StickerCommand.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in StickerCommand.run at line 53. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/StickerCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/StickerCommand.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"963d0e2bc8f0a7673dbba75ac9c3861be83e7c5250f7fad98b14260339b5bbc9"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageSender.swift: Sources/IMsgCore/MessageSender.swift changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is MessageSender.sendResolvingRoute at line 100), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: verify recovered and tracked send receipts (#399)\u201D; \u201Cfix: format AppleScript error numbers with ASCII signs (#395)\u201D; \u201Cfix(send): verify iMessage sends in unified chats (#373)\u201D; \u201Cfix: make native audio messages playable inline\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageSender.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageSender.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3f82fec47eb07804040e509bb6ded449d441f4d07b23013c55ed369013beae"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BChats.swift: Sources/IMsgCore/MessageStore\u002BChats.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is MessageStore.listChats at line 164), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: read custom reactions from their emoji column (#396)\u201D; \u201Cfix: navigate directly to standard tapback conversations (#317)\u201D; \u201Cfix: preserve message query cardinality and event boundaries (#263)\u201D; \u201Cfix: show chat-name fallbacks and Contacts diagnostics (#252)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BChats.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChats.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd067c1835318a6e4212723a6a04d22632f23c2d35f361da4623f087369a3abd"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessagesLauncher.swift: Sources/IMsgCore/MessagesLauncher.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is MessagesLauncher.sendCommandSync at line 313), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: preserve no-argument launcher function references (#305)\u201D; \u201Cfix: replace stale injected helpers after CLI upgrades (#301)\u201D; \u201Cfix: make bridge launch readiness timeout configurable\u201D; \u201Cfix: serialize Messages bridge launches across processes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessagesLauncher.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagesLauncher.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b7221deb846651eadb591abccaf1dadd96c1d02735f8ff7ac1d4cd4bd9dc761"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BHistoryMetadata.swift: Sources/IMsgCore/MessageStore\u002BHistoryMetadata.swift changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is MessageStore.reactions at line 55), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: read custom reactions from their emoji column (#396)\u201D; \u201Cfix: report the local account as sender for outgoing messages (#358)\u201D; \u201Cfix: unify poll and reaction state resolution (#268)\u201D; \u201Cfix: preserve message query cardinality and event boundaries (#263)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BHistoryMetadata.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BHistoryMetadata.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bef1cf25c3ed249f15a97a93fa741c43fcb54ad5291254680c7999a9f2fe288"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BReactions.swift: Sources/IMsgCore/MessageStore\u002BReactions.swift changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is MessageStore.applyReactionRow at line 107), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: read custom reactions from their emoji column (#396)\u201D; \u201Cfix: report the local account as sender for outgoing messages (#358)\u201D; \u201Cfix: unify poll and reaction state resolution (#268)\u201D; \u201Cfix: preserve message query cardinality and event boundaries (#263)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BReactions.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BReactions.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce7be91dd4a22832609553d3b7c3424b44e40e894ae43b83aabfdfe2116b2ca"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BQueries.swift: Sources/IMsgCore/MessageStore\u002BQueries.swift changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is ChatMessagesQuery.init at line 18), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: report the local account as sender for outgoing messages (#358)\u201D; \u201Cfix: verify canonically equivalent sent text (#321)\u201D; \u201Cfix: preserve distant date query bounds without integer overflow (#299)\u201D; \u201Cfix: preserve message query cardinality and event boundaries (#263)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BQueries.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BQueries.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d9165eca255e0fa195d51aee9aca2e6ccd59869ee754853e54330a7862a3dd"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/imsg/Commands/BridgeIntroCommands.swift: Sources/imsg/Commands/BridgeIntroCommands.swift changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is SearchCommand.run at line 34), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: validate CLI selectors and durations before work (#259)\u201D; \u201Cfix: resolve Contacts over SSH with Full Disk Access (#255)\u201D; \u201Cfix: do not prompt Contacts for headless nickname --local (#248)\u201D; \u201Cfix: show chat-name fallbacks and Contacts diagnostics (#252)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/BridgeIntroCommands.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/BridgeIntroCommands.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e5790905eb07ae601b95600a94b86eff0a0ff1219fa4432bfdf4f456dcb1aea"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BHelpers.swift: Sources/IMsgCore/MessageStore\u002BHelpers.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is MessageStore.decodeReaction at line 90), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: read custom reactions from their emoji column (#396)\u201D; \u201Cfix: report the local account as sender for outgoing messages (#358)\u201D; \u201Cfix: preserve distant date query bounds without integer overflow (#299)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BHelpers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BHelpers.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36e9fd1379efe670d4d0ef1655eb89845e1873d334c51b9466a9c412aeab450"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/imsg/RPCServer.swift: Sources/imsg/RPCServer.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 2 (its worst body is RPCServer.respond at line 226), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: make native audio messages playable inline\u201D; \u201Cfix: verify sends against the resolved delivery route (#269)\u201D; \u201Cfix: report poll caption delivery separately\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/RPCServer.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5a7b3b0f67f8e6682531d0e1f8bfc66c1c46bfba676ac5bc96f87456beac72"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/MessageStore\u002BReactionEvents.swift: Sources/IMsgCore/MessageStore\u002BReactionEvents.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is MessageStore.reactionEventsAfter at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: read custom reactions from their emoji column (#396)\u201D; \u201Cfix: report the local account as sender for outgoing messages (#358)\u201D; \u201Cfix: preserve message query cardinality and event boundaries (#263)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/MessageStore\u002BReactionEvents.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BReactionEvents.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bdb9bcfafdad5d42341e6d46e5f482d9682b769fd965c1edeeab01d5e302c0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/IMsgCore/ContactResolver.swift: Sources/IMsgCore/ContactResolver.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 6 (its worst body is ContactResolver.create at line 113), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: harden message mutations and contact lookups\u201D; \u201Cfix: keep watch delivery responsive during Contacts refreshes (#308)\u201D; \u201Cfix: resolve Contacts over SSH with Full Disk Access (#255)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/IMsgCore/ContactResolver.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/ContactResolver.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a67261be16ccfd0a2932e8174cf4b0b3ae1c76dcefd08404d1eeed82d89334"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/imsg/Commands/ReactCommand.swift: Sources/imsg/Commands/ReactCommand.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is ReactCommand.run at line 46), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: navigate directly to standard tapback conversations (#317)\u201D; \u201Cfix: confirm outgoing standard tapbacks before reporting success (#312)\u201D; \u201Cfix: validate CLI selectors and durations before work (#259)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/Commands/ReactCommand.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/ReactCommand.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d4997b5586c4c8718c9601e28df51ed064af6f9490e8c8b164f75c8cf15c2c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/imsg/CommandRouter.swift: Sources/imsg/CommandRouter.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is CommandRouter.run at line 67), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cbuild(deps): fix phone normalization denial of service and refresh toolchains (#313)\u201D; \u201Cfix: verify sends against the resolved delivery route (#269)\u201D; \u201Cfix: validate CLI selectors and durations before work (#259)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 00:16:33 -08:00\u0027 --until=\u00272026-11-14 00:16:33 -08:00\u0027 --full-history --no-merges -- Sources/imsg/CommandRouter.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/CommandRouter.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd652c5c6f2af79ffcfc2d6fc6f15682b758879650730c4c3082609a6dbe78a"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: Sources/IMsgCore/ContactCatalog.swift, Sources/IMsgCore/MessageWatcher.swift, Sources/imsg/RPCServer\u002BWatchHandlers.swift, Sources/IMsgCore/AddressBookContacts.swift, Sources/imsg/RPCDatabaseResources.swift, Sources/imsg/RPCServer\u002BRuntime.swift, Sources/imsg/RPCServer\u002BStatusHandlers.swift, Sources/IMsgCore/AppleScriptSendTransport.swift (\u002B3 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1ee08f7621d2338703cc157487c7ae72e37ba08679ffeb56f33fcd66e5abba3a"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060Package.swift\u0060 makes this repository a deployable product (line 9)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Package.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cb68a1ee6c4cb93e1c9ac7b48b28011c2bc672548de5c6ade44fdf2c34c979"}},{"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":"dd65e2f04abdf477e5d882fff12a00d1ee228e0a527014aeb9b4139224ebe812"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: MessageStore\u002BHelpers.swift \u2194 MessageStore\u002BMessages.swift: \u0060Sources/IMsgCore/MessageStore\u002BHelpers.swift\u0060 and \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift\u0060 change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u00609070f71a\u0060 fix: read custom reactions from their emoji column (#396); \u00602f8fc81d\u0060 fix: report the local account as sender for outgoing messages (#358); \u006092459eca\u0060 fix: preserve distant date query bounds without integer overflow (#299) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BHelpers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2429a897e9a18db49337413b9c21dacfb5287a18b42add8c2d5a0c693836a630"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: MessageStore\u002BMessages.swift \u2194 OutputModels.swift: \u0060Sources/IMsgCore/MessageStore\u002BMessages.swift\u0060 and \u0060Sources/imsg/OutputModels.swift\u0060 change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 7 shared commits counted here, the most recent 3 are \u00601c516094\u0060 fix: coalesce URL preview split sends; \u006053792fa8\u0060 feat: expose message balloon bundle metadata; \u0060dc94c36d\u0060 feat: emit reply_to_text and reply_to_sender for threaded replies \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BMessages.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f457cd66518bc1befdc3148cc9257e948f752823c1999613d982694451b473f6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: SendCommand.swift \u2194 RPCServer.swift: \u0060Sources/imsg/Commands/SendCommand.swift\u0060 and \u0060Sources/imsg/RPCServer.swift\u0060 change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060abddb402\u0060 fix: detect Tahoe group send ghost rows; \u00601b27e3b1\u0060 refactor: centralize stdout writing (#49); \u006005c97e51\u0060 chore: drop private api send mode \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7cef822a03f11b57efc4300c7b4fdcba7eb888f9a5ebcc22920a03a978ac4bb"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","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":"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":"61d9c64c1de88e7edb9c757178d6ec3103868cef4ae7e825aeeac5d15e61fb7d"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!signature.options.isEmpty || !signature.flags.isEmpty\u0060 appears character-identically in 2 files \u2014 Sources/imsg/Commands/CompletionsCommand.swift, Sources/imsg/HelpPrinter.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/CompletionsCommand.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de1a9ab9d32c85dc8b1ba64bc6ce1324850ad139c0d23db2a736b608a6f4441"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060input.hasChatTarget \u0026\u0026 resolvedTarget.preferredIdentifier == nil\u0060 appears character-identically in 2 files \u2014 Sources/imsg/Commands/SendCommand.swift, Sources/imsg/RPCServer\u002BSendHandlers.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"3afcef79b0af10c9a79a88ab9f8fe6a2ada4ea3ed0fecfe5412a6243f75dc3b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060service == .auto \u0026\u0026 effectiveService == .sms\u0060 appears character-identically in 2 files \u2014 Sources/imsg/Commands/SendCommand.swift, Sources/imsg/RPCServer\u002BSendHandlers.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/SendCommand.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacf18ca0cf94da2a9f0f12783f097210208a26621918e6ccafcd2ee85636773"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RPCServer\u002BStatusHandlers.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0b9d470024926e1c9963836f7bcd980503fc1f0f2f5c337fca96aafca68887"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RichLinkPreparer.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"73699ebc721da8a9ae02fbda58f3a2c4a4f36521178dac3c0fb00dfedfda9004"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/RichLinkPreparer.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"851643f1a3bc46904aded1ef22ddff977e86bb6b12a2af5ad6477db0c7fea2f1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/imsg/Commands/WatchCommand.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"2005bf1ead04e479f6c42616671d96ae7b94b6667ee943710a5a927ebdd086c9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/AttachmentResolver.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e806d312c564bf51799c550459dd80dacf6983812a61f0c2b5cee3bbce3d0bf"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/ContactCatalog.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"325c2111e7996da7c5681a51f5ff34ab7477d35197651b237d66efd99b52e619"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BAttachments.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"6144d3c97ca7f6351fe8c3c1ebfce92f16a26a89e44e4944aedcef73c8c49870"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagesLauncher.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"217bd98269b758432291279064614775074a15a90bca15288fd1238729f2d2a9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessagesLauncher.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4cb861c710bf80677658a300895ac9d3b22e33ff8c2368cf8ee00b1f41cd2c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/PhoneNumberNormalizer.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"94467f0e789884bc7103362b0d8e0837602e4af2896cab3eff619194ee90209d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060childDelegateSourceIdentifiers\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/AddressBookAccountSources.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"0daec9e320ccec250378ba5046885fa1e3d6da47e9489526f980dc441449d91e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060chatBackgroundColumns\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BChatBackground.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8ac98497a34caea231abe5217d28c42155f0a04e48004eb155a6e63b3aebde"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060withConnectionColumns\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/IMsgCore/MessageStore\u002BServiceAvailability.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0241b4a5176b6fdd83528dee2d82df6356fd53c19c43ad3acd1990c5edcb03"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"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/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-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-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":6,"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."]}]}